update java resteasy sample

This commit is contained in:
wing328 2017-04-24 17:12:00 +08:00
parent 640b16b58a
commit e4608745b0
95 changed files with 7214 additions and 2979 deletions

View File

@ -1,21 +1,21 @@
*.class *.class
# Mobile Tools for Java (J2ME) # Mobile Tools for Java (J2ME)
.mtj.tmp/ .mtj.tmp/
# Package Files # # Package Files #
*.jar *.jar
*.war *.war
*.ear *.ear
# exclude jar for gradle wrapper # exclude jar for gradle wrapper
!gradle/wrapper/*.jar !gradle/wrapper/*.jar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid* hs_err_pid*
# build files # build files
**/target **/target
target target
.gradle .gradle
build build

View File

@ -1,17 +1,17 @@
# #
# Generated by: https://github.com/swagger-api/swagger-codegen.git # Generated by: https://github.com/swagger-api/swagger-codegen.git
# #
language: java language: java
jdk: jdk:
- oraclejdk8 - oraclejdk8
- oraclejdk7 - oraclejdk7
before_install: before_install:
# ensure gradlew has proper permission # ensure gradlew has proper permission
- chmod a+x ./gradlew - chmod a+x ./gradlew
script: script:
# test using maven # test using maven
- mvn test - mvn test
# uncomment below to test using gradle # uncomment below to test using gradle
# - gradle test # - gradle test
# uncomment below to test using sbt # uncomment below to test using sbt
# - sbt test # - sbt test

View File

@ -82,7 +82,7 @@ if(hasProperty('target') && target == 'android') {
install { install {
repositories.mavenInstaller { repositories.mavenInstaller {
pom.artifactId = 'swagger-java-client' pom.artifactId = 'swagger-petstore-resteasy'
} }
} }

View File

@ -1,7 +1,7 @@
lazy val root = (project in file(".")). lazy val root = (project in file(".")).
settings( settings(
organization := "io.swagger", organization := "io.swagger",
name := "swagger-java-client", name := "swagger-petstore-resteasy",
version := "1.0.0", version := "1.0.0",
scalaVersion := "2.11.4", scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"), scalacOptions ++= Seq("-feature"),

View File

@ -0,0 +1,11 @@
# AdditionalPropertiesClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapProperty** | **Map<String, String>** | | [optional]
**mapOfMapProperty** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]

View File

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

View File

@ -0,0 +1,9 @@
# AnimalFarm
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@ -0,0 +1,10 @@
# ArrayOfArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayArrayNumber** | [**List<List<BigDecimal>>**](List.md) | | [optional]

View File

@ -0,0 +1,10 @@
# ArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arrayNumber** | [**List<BigDecimal>**](BigDecimal.md) | | [optional]

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,10 @@
# ClassModel
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**propertyClass** | **String** | | [optional]

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,38 @@
# EnumTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
<a name="EnumStringEnum"></a>
## Enum: EnumStringEnum
Name | Value
---- | -----
UPPER | &quot;UPPER&quot;
LOWER | &quot;lower&quot;
EMPTY | &quot;&quot;
<a name="EnumIntegerEnum"></a>
## Enum: EnumIntegerEnum
Name | Value
---- | -----
NUMBER_1 | 1
NUMBER_MINUS_1 | -1
<a name="EnumNumberEnum"></a>
## Enum: EnumNumberEnum
Name | Value
---- | -----
NUMBER_1_DOT_1 | 1.1
NUMBER_MINUS_1_DOT_2 | -1.2

View File

@ -0,0 +1,193 @@
# FakeApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \&quot;client\&quot; model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
<a name="testClientModel"></a>
# **testClientModel**
> Client testClientModel(body)
To test \&quot;client\&quot; model
To test \&quot;client\&quot; model
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeApi;
FakeApi apiInstance = new FakeApi();
Client body = new Client(); // Client | client model
try {
Client result = apiInstance.testClientModel(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testClientModel");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
### Return type
[**Client**](Client.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
<a name="testEndpointParameters"></a>
# **testEndpointParameters**
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.FakeApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: http_basic_test
HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
http_basic_test.setUsername("YOUR USERNAME");
http_basic_test.setPassword("YOUR PASSWORD");
FakeApi apiInstance = new FakeApi();
BigDecimal number = new BigDecimal(); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
byte[] _byte = B; // byte[] | None
Integer integer = 56; // Integer | None
Integer int32 = 56; // Integer | None
Long int64 = 789L; // Long | None
Float _float = 3.4F; // Float | None
String string = "string_example"; // String | None
byte[] binary = B; // byte[] | None
LocalDate date = new LocalDate(); // LocalDate | None
DateTime dateTime = new DateTime(); // DateTime | None
String password = "password_example"; // String | None
String paramCallback = "paramCallback_example"; // String | None
try {
apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEndpointParameters");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **BigDecimal**| None |
**_double** | **Double**| None |
**patternWithoutDelimiter** | **String**| None |
**_byte** | **byte[]**| None |
**integer** | **Integer**| None | [optional]
**int32** | **Integer**| None | [optional]
**int64** | **Long**| None | [optional]
**_float** | **Float**| None | [optional]
**string** | **String**| None | [optional]
**binary** | **byte[]**| None | [optional]
**date** | **LocalDate**| None | [optional]
**dateTime** | **DateTime**| None | [optional]
**password** | **String**| None | [optional]
**paramCallback** | **String**| None | [optional]
### Return type
null (empty response body)
### Authorization
[http_basic_test](../README.md#http_basic_test)
### HTTP request headers
- **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
<a name="testEnumParameters"></a>
# **testEnumParameters**
> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble)
To test enum parameters
To test enum parameters
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeApi;
FakeApi apiInstance = new FakeApi();
List<String> enumFormStringArray = Arrays.asList("enumFormStringArray_example"); // List<String> | Form parameter enum test (string array)
String enumFormString = "-efg"; // String | Form parameter enum test (string)
List<String> enumHeaderStringArray = Arrays.asList("enumHeaderStringArray_example"); // List<String> | Header parameter enum test (string array)
String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
List<String> enumQueryStringArray = Arrays.asList("enumQueryStringArray_example"); // List<String> | Query parameter enum test (string array)
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
try {
apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEnumParameters");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enumFormStringArray** | [**List&lt;String&gt;**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
**enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumHeaderStringArray** | [**List&lt;String&gt;**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryStringArray** | [**List&lt;String&gt;**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: */*
- **Accept**: */*

View File

@ -0,0 +1,22 @@
# FormatTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Integer** | | [optional]
**int32** | **Integer** | | [optional]
**int64** | **Long** | | [optional]
**number** | [**BigDecimal**](BigDecimal.md) | |
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | |
**binary** | **byte[]** | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |

View File

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

View File

@ -0,0 +1,19 @@
# MapTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mapMapOfString** | [**Map&lt;String, Map&lt;String, String&gt;&gt;**](Map.md) | | [optional]
**mapOfEnumString** | [**Map&lt;String, InnerEnum&gt;**](#Map&lt;String, InnerEnum&gt;) | | [optional]
<a name="Map<String, InnerEnum>"></a>
## Enum: Map&lt;String, InnerEnum&gt;
Name | Value
---- | -----
UPPER | &quot;UPPER&quot;
LOWER | &quot;lower&quot;

View File

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

View File

@ -0,0 +1,11 @@
# Model200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional]
**propertyClass** | **String** | | [optional]

View File

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

View File

@ -0,0 +1,10 @@
# ModelReturn
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_return** | **Integer** | | [optional]

View File

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

View File

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

View File

@ -1,24 +1,24 @@
# Order # Order
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional] **id** | **Long** | | [optional]
**petId** | **Long** | | [optional] **petId** | **Long** | | [optional]
**quantity** | **Integer** | | [optional] **quantity** | **Integer** | | [optional]
**shipDate** | [**DateTime**](DateTime.md) | | [optional] **shipDate** | [**DateTime**](DateTime.md) | | [optional]
**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] **status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional]
**complete** | **Boolean** | | [optional] **complete** | **Boolean** | | [optional]
<a name="StatusEnum"></a> <a name="StatusEnum"></a>
## Enum: StatusEnum ## Enum: StatusEnum
Name | Value Name | Value
---- | ----- ---- | -----
PLACED | &quot;placed&quot; PLACED | &quot;placed&quot;
APPROVED | &quot;approved&quot; APPROVED | &quot;approved&quot;
DELIVERED | &quot;delivered&quot; DELIVERED | &quot;delivered&quot;

View File

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

View File

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

View File

@ -1,448 +1,448 @@
# PetApi # PetApi
All URIs are relative to *http://petstore.swagger.io/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**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 [**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 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
<a name="addPet"></a> <a name="addPet"></a>
# **addPet** # **addPet**
> addPet(body) > addPet(body)
Add a new pet to the store Add a new pet to the store
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi; //import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth // Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
try { try {
apiInstance.addPet(body); apiInstance.addPet(body);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet"); System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="deletePet"></a> <a name="deletePet"></a>
# **deletePet** # **deletePet**
> deletePet(petId, apiKey) > deletePet(petId, apiKey)
Deletes a pet Deletes a pet
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi; //import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth // Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | Pet id to delete Long petId = 789L; // Long | Pet id to delete
String apiKey = "apiKey_example"; // String | String apiKey = "apiKey_example"; // String |
try { try {
apiInstance.deletePet(petId, apiKey); apiInstance.deletePet(petId, apiKey);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#deletePet"); System.err.println("Exception when calling PetApi#deletePet");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**petId** | **Long**| Pet id to delete | **petId** | **Long**| Pet id to delete |
**apiKey** | **String**| | [optional] **apiKey** | **String**| | [optional]
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="findPetsByStatus"></a> <a name="findPetsByStatus"></a>
# **findPetsByStatus** # **findPetsByStatus**
> List&lt;Pet&gt; findPetsByStatus(status) > List&lt;Pet&gt; findPetsByStatus(status)
Finds Pets by status Finds Pets by status
Multiple status values can be provided with comma separated strings Multiple status values can be provided with comma separated strings
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi; //import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth // Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
List<String> status = Arrays.asList("status_example"); // List<String> | Status values that need to be considered for filter List<String> status = Arrays.asList("status_example"); // List<String> | Status values that need to be considered for filter
try { try {
List<Pet> result = apiInstance.findPetsByStatus(status); List<Pet> result = apiInstance.findPetsByStatus(status);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#findPetsByStatus"); System.err.println("Exception when calling PetApi#findPetsByStatus");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**status** | [**List&lt;String&gt;**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] **status** | [**List&lt;String&gt;**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
### Return type ### Return type
[**List&lt;Pet&gt;**](Pet.md) [**List&lt;Pet&gt;**](Pet.md)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="findPetsByTags"></a> <a name="findPetsByTags"></a>
# **findPetsByTags** # **findPetsByTags**
> List&lt;Pet&gt; findPetsByTags(tags) > List&lt;Pet&gt; findPetsByTags(tags)
Finds Pets by tags Finds Pets by tags
Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi; //import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth // Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
List<String> tags = Arrays.asList("tags_example"); // List<String> | Tags to filter by List<String> tags = Arrays.asList("tags_example"); // List<String> | Tags to filter by
try { try {
List<Pet> result = apiInstance.findPetsByTags(tags); List<Pet> result = apiInstance.findPetsByTags(tags);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#findPetsByTags"); System.err.println("Exception when calling PetApi#findPetsByTags");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by | **tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by |
### Return type ### Return type
[**List&lt;Pet&gt;**](Pet.md) [**List&lt;Pet&gt;**](Pet.md)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="getPetById"></a> <a name="getPetById"></a>
# **getPetById** # **getPetById**
> Pet getPetById(petId) > Pet getPetById(petId)
Find pet by ID Find pet by ID
Returns a single pet Returns a single pet
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi; //import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key // Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR 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) // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token"); //api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet to return Long petId = 789L; // Long | ID of pet to return
try { try {
Pet result = apiInstance.getPetById(petId); Pet result = apiInstance.getPetById(petId);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#getPetById"); System.err.println("Exception when calling PetApi#getPetById");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet to return | **petId** | **Long**| ID of pet to return |
### Return type ### Return type
[**Pet**](Pet.md) [**Pet**](Pet.md)
### Authorization ### Authorization
[api_key](../README.md#api_key) [api_key](../README.md#api_key)
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="updatePet"></a> <a name="updatePet"></a>
# **updatePet** # **updatePet**
> updatePet(body) > updatePet(body)
Update an existing pet Update an existing pet
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi; //import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth // Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
try { try {
apiInstance.updatePet(body); apiInstance.updatePet(body);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Exception when calling PetApi#updatePet");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="updatePetWithForm"></a> <a name="updatePetWithForm"></a>
# **updatePetWithForm** # **updatePetWithForm**
> updatePetWithForm(petId, name, status) > updatePetWithForm(petId, name, status)
Updates a pet in the store with form data Updates a pet in the store with form data
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi; //import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth // Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet that needs to be updated Long petId = 789L; // Long | ID of pet that needs to be updated
String name = "name_example"; // String | Updated name of the pet String name = "name_example"; // String | Updated name of the pet
String status = "status_example"; // String | Updated status of the pet String status = "status_example"; // String | Updated status of the pet
try { try {
apiInstance.updatePetWithForm(petId, name, status); apiInstance.updatePetWithForm(petId, name, status);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePetWithForm"); System.err.println("Exception when calling PetApi#updatePetWithForm");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet that needs to be updated | **petId** | **Long**| ID of pet that needs to be updated |
**name** | **String**| Updated name of the pet | [optional] **name** | **String**| Updated name of the pet | [optional]
**status** | **String**| Updated status of the pet | [optional] **status** | **String**| Updated status of the pet | [optional]
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="uploadFile"></a> <a name="uploadFile"></a>
# **uploadFile** # **uploadFile**
> ModelApiResponse uploadFile(petId, additionalMetadata, file) > ModelApiResponse uploadFile(petId, additionalMetadata, file)
uploads an image uploads an image
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi; //import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth // Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(); PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet to update Long petId = 789L; // Long | ID of pet to update
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
File file = new File("/path/to/file.txt"); // File | file to upload File file = new File("/path/to/file.txt"); // File | file to upload
try { try {
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFile"); System.err.println("Exception when calling PetApi#uploadFile");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet to update | **petId** | **Long**| ID of pet to update |
**additionalMetadata** | **String**| Additional data to pass to server | [optional] **additionalMetadata** | **String**| Additional data to pass to server | [optional]
**file** | **File**| file to upload | [optional] **file** | **File**| file to upload | [optional]
### Return type ### Return type
[**ModelApiResponse**](ModelApiResponse.md) [**ModelApiResponse**](ModelApiResponse.md)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP request headers ### HTTP request headers
- **Content-Type**: multipart/form-data - **Content-Type**: multipart/form-data
- **Accept**: application/json - **Accept**: application/json

View File

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

View File

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

View File

@ -1,197 +1,197 @@
# StoreApi # StoreApi
All URIs are relative to *http://petstore.swagger.io/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
<a name="deleteOrder"></a> <a name="deleteOrder"></a>
# **deleteOrder** # **deleteOrder**
> deleteOrder(orderId) > deleteOrder(orderId)
Delete purchase order by ID Delete purchase order by ID
For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.StoreApi; //import io.swagger.client.api.StoreApi;
StoreApi apiInstance = new StoreApi(); StoreApi apiInstance = new StoreApi();
Long orderId = 789L; // Long | ID of the order that needs to be deleted String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
try { try {
apiInstance.deleteOrder(orderId); apiInstance.deleteOrder(orderId);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling StoreApi#deleteOrder"); System.err.println("Exception when calling StoreApi#deleteOrder");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**orderId** | **Long**| ID of the order that needs to be deleted | **orderId** | **String**| ID of the order that needs to be deleted |
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="getInventory"></a> <a name="getInventory"></a>
# **getInventory** # **getInventory**
> Map&lt;String, Integer&gt; getInventory() > Map&lt;String, Integer&gt; getInventory()
Returns pet inventories by status Returns pet inventories by status
Returns a map of status codes to quantities Returns a map of status codes to quantities
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiClient; //import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.Configuration; //import io.swagger.client.Configuration;
//import io.swagger.client.auth.*; //import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi; //import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key // Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR 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) // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token"); //api_key.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi(); StoreApi apiInstance = new StoreApi();
try { try {
Map<String, Integer> result = apiInstance.getInventory(); Map<String, Integer> result = apiInstance.getInventory();
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling StoreApi#getInventory"); System.err.println("Exception when calling StoreApi#getInventory");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
This endpoint does not need any parameter. This endpoint does not need any parameter.
### Return type ### Return type
[**Map&lt;String, Integer&gt;**](Map.md) [**Map&lt;String, Integer&gt;**](Map.md)
### Authorization ### Authorization
[api_key](../README.md#api_key) [api_key](../README.md#api_key)
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/json
<a name="getOrderById"></a> <a name="getOrderById"></a>
# **getOrderById** # **getOrderById**
> Order getOrderById(orderId) > Order getOrderById(orderId)
Find purchase order by ID Find purchase order by ID
For valid response try integer IDs with value &gt;&#x3D; 1 and &lt;&#x3D; 10. Other values will generated exceptions For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.StoreApi; //import io.swagger.client.api.StoreApi;
StoreApi apiInstance = new StoreApi(); StoreApi apiInstance = new StoreApi();
Long orderId = 789L; // Long | ID of pet that needs to be fetched Long orderId = 789L; // Long | ID of pet that needs to be fetched
try { try {
Order result = apiInstance.getOrderById(orderId); Order result = apiInstance.getOrderById(orderId);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling StoreApi#getOrderById"); System.err.println("Exception when calling StoreApi#getOrderById");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**orderId** | **Long**| ID of pet that needs to be fetched | **orderId** | **Long**| ID of pet that needs to be fetched |
### Return type ### Return type
[**Order**](Order.md) [**Order**](Order.md)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="placeOrder"></a> <a name="placeOrder"></a>
# **placeOrder** # **placeOrder**
> Order placeOrder(body) > Order placeOrder(body)
Place an order for a pet Place an order for a pet
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.StoreApi; //import io.swagger.client.api.StoreApi;
StoreApi apiInstance = new StoreApi(); StoreApi apiInstance = new StoreApi();
Order body = new Order(); // Order | order placed for purchasing the pet Order body = new Order(); // Order | order placed for purchasing the pet
try { try {
Order result = apiInstance.placeOrder(body); Order result = apiInstance.placeOrder(body);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder"); System.err.println("Exception when calling StoreApi#placeOrder");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet | **body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type ### Return type
[**Order**](Order.md) [**Order**](Order.md)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json

View File

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

View File

@ -1,17 +1,17 @@
# User # User
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional] **id** | **Long** | | [optional]
**username** | **String** | | [optional] **username** | **String** | | [optional]
**firstName** | **String** | | [optional] **firstName** | **String** | | [optional]
**lastName** | **String** | | [optional] **lastName** | **String** | | [optional]
**email** | **String** | | [optional] **email** | **String** | | [optional]
**password** | **String** | | [optional] **password** | **String** | | [optional]
**phone** | **String** | | [optional] **phone** | **String** | | [optional]
**userStatus** | **Integer** | User Status | [optional] **userStatus** | **Integer** | User Status | [optional]

View File

@ -1,370 +1,370 @@
# UserApi # UserApi
All URIs are relative to *http://petstore.swagger.io/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**createUser**](UserApi.md#createUser) | **POST** /user | Create user [**createUser**](UserApi.md#createUser) | **POST** /user | Create user
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array [**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 [**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system [**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 [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
<a name="createUser"></a> <a name="createUser"></a>
# **createUser** # **createUser**
> createUser(body) > createUser(body)
Create user Create user
This can only be done by the logged in user. This can only be done by the logged in user.
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.UserApi; //import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
User body = new User(); // User | Created user object User body = new User(); // User | Created user object
try { try {
apiInstance.createUser(body); apiInstance.createUser(body);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser"); System.err.println("Exception when calling UserApi#createUser");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object | **body** | [**User**](User.md)| Created user object |
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="createUsersWithArrayInput"></a> <a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput** # **createUsersWithArrayInput**
> createUsersWithArrayInput(body) > createUsersWithArrayInput(body)
Creates list of users with given input array Creates list of users with given input array
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.UserApi; //import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
List<User> body = Arrays.asList(new User()); // List<User> | List of user object List<User> body = Arrays.asList(new User()); // List<User> | List of user object
try { try {
apiInstance.createUsersWithArrayInput(body); apiInstance.createUsersWithArrayInput(body);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | **body** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="createUsersWithListInput"></a> <a name="createUsersWithListInput"></a>
# **createUsersWithListInput** # **createUsersWithListInput**
> createUsersWithListInput(body) > createUsersWithListInput(body)
Creates list of users with given input array Creates list of users with given input array
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.UserApi; //import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
List<User> body = Arrays.asList(new User()); // List<User> | List of user object List<User> body = Arrays.asList(new User()); // List<User> | List of user object
try { try {
apiInstance.createUsersWithListInput(body); apiInstance.createUsersWithListInput(body);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Exception when calling UserApi#createUsersWithListInput");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | **body** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="deleteUser"></a> <a name="deleteUser"></a>
# **deleteUser** # **deleteUser**
> deleteUser(username) > deleteUser(username)
Delete user Delete user
This can only be done by the logged in user. This can only be done by the logged in user.
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.UserApi; //import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
String username = "username_example"; // String | The name that needs to be deleted String username = "username_example"; // String | The name that needs to be deleted
try { try {
apiInstance.deleteUser(username); apiInstance.deleteUser(username);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#deleteUser"); System.err.println("Exception when calling UserApi#deleteUser");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **String**| The name that needs to be deleted | **username** | **String**| The name that needs to be deleted |
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="getUserByName"></a> <a name="getUserByName"></a>
# **getUserByName** # **getUserByName**
> User getUserByName(username) > User getUserByName(username)
Get user by user name Get user by user name
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.UserApi; //import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
try { try {
User result = apiInstance.getUserByName(username); User result = apiInstance.getUserByName(username);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#getUserByName"); System.err.println("Exception when calling UserApi#getUserByName");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **String**| The name that needs to be fetched. Use user1 for testing. | **username** | **String**| The name that needs to be fetched. Use user1 for testing. |
### Return type ### Return type
[**User**](User.md) [**User**](User.md)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="loginUser"></a> <a name="loginUser"></a>
# **loginUser** # **loginUser**
> String loginUser(username, password) > String loginUser(username, password)
Logs user into the system Logs user into the system
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.UserApi; //import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
String username = "username_example"; // String | The user name for login String username = "username_example"; // String | The user name for login
String password = "password_example"; // String | The password for login in clear text String password = "password_example"; // String | The password for login in clear text
try { try {
String result = apiInstance.loginUser(username, password); String result = apiInstance.loginUser(username, password);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#loginUser"); System.err.println("Exception when calling UserApi#loginUser");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **String**| The user name for login | **username** | **String**| The user name for login |
**password** | **String**| The password for login in clear text | **password** | **String**| The password for login in clear text |
### Return type ### Return type
**String** **String**
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="logoutUser"></a> <a name="logoutUser"></a>
# **logoutUser** # **logoutUser**
> logoutUser() > logoutUser()
Logs out current logged in user session Logs out current logged in user session
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.UserApi; //import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
try { try {
apiInstance.logoutUser(); apiInstance.logoutUser();
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#logoutUser"); System.err.println("Exception when calling UserApi#logoutUser");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
This endpoint does not need any parameter. This endpoint does not need any parameter.
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="updateUser"></a> <a name="updateUser"></a>
# **updateUser** # **updateUser**
> updateUser(username, body) > updateUser(username, body)
Updated user Updated user
This can only be done by the logged in user. This can only be done by the logged in user.
### Example ### Example
```java ```java
// Import classes: // Import classes:
//import io.swagger.client.ApiException; //import io.swagger.client.ApiException;
//import io.swagger.client.api.UserApi; //import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi(); UserApi apiInstance = new UserApi();
String username = "username_example"; // String | name that need to be updated String username = "username_example"; // String | name that need to be deleted
User body = new User(); // User | Updated user object User body = new User(); // User | Updated user object
try { try {
apiInstance.updateUser(username, body); apiInstance.updateUser(username, body);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Exception when calling UserApi#updateUser");
e.printStackTrace(); e.printStackTrace();
} }
``` ```
### Parameters ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be updated | **username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object | **body** | [**User**](User.md)| Updated user object |
### Return type ### Return type
null (empty response body) null (empty response body)
### Authorization ### Authorization
No authorization required No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json

View File

@ -1,52 +1,52 @@
#!/bin/sh #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
# #
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
git_user_id=$1 git_user_id=$1
git_repo_id=$2 git_repo_id=$2
release_note=$3 release_note=$3
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID" git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi fi
if [ "$git_repo_id" = "" ]; then if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID" git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi fi
if [ "$release_note" = "" ]; then if [ "$release_note" = "" ]; then
release_note="Minor update" release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note" echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi fi
# Initialize the local directory as a Git repository # Initialize the local directory as a Git repository
git init git init
# Adds the files in the local repository and stages them for commit. # Adds the files in the local repository and stages them for commit.
git add . git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository. # Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note" git commit -m "$release_note"
# Sets the new remote # Sets the new remote
git_remote=`git remote` git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
fi fi
fi fi
git pull origin master git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository # Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https' git push origin master 2>&1 | grep -v 'To https'

View File

@ -1,2 +1,2 @@
# Uncomment to build for Android # Uncomment to build for Android
#target = android #target = android

View File

@ -1,6 +1,6 @@
#Tue May 17 23:08:05 CST 2016 #Tue May 17 23:08:05 CST 2016
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip

View File

@ -1,160 +1,160 @@
#!/usr/bin/env bash #!/usr/bin/env bash
############################################################################## ##############################################################################
## ##
## Gradle start up script for UN*X ## Gradle start up script for UN*X
## ##
############################################################################## ##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS="" DEFAULT_JVM_OPTS=""
APP_NAME="Gradle" APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"` APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD="maximum"
warn ( ) { warn ( ) {
echo "$*" echo "$*"
} }
die ( ) { die ( ) {
echo echo
echo "$*" echo "$*"
echo echo
exit 1 exit 1
} }
# OS specific support (must be 'true' or 'false'). # OS specific support (must be 'true' or 'false').
cygwin=false cygwin=false
msys=false msys=false
darwin=false darwin=false
case "`uname`" in case "`uname`" in
CYGWIN* ) CYGWIN* )
cygwin=true cygwin=true
;; ;;
Darwin* ) Darwin* )
darwin=true darwin=true
;; ;;
MINGW* ) MINGW* )
msys=true msys=true
;; ;;
esac esac
# Attempt to set APP_HOME # Attempt to set APP_HOME
# Resolve links: $0 may be a link # Resolve links: $0 may be a link
PRG="$0" PRG="$0"
# Need this for relative symlinks. # Need this for relative symlinks.
while [ -h "$PRG" ] ; do while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"` ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'` link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then if expr "$link" : '/.*' > /dev/null; then
PRG="$link" PRG="$link"
else else
PRG=`dirname "$PRG"`"/$link" PRG=`dirname "$PRG"`"/$link"
fi fi
done done
SAVED="`pwd`" SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`" APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD="$JAVA_HOME/jre/sh/java"
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD="$JAVA_HOME/bin/java"
fi fi
if [ ! -x "$JAVACMD" ] ; then if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi fi
else else
JAVACMD="java" JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n` MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT" MAX_FD="$MAX_FD_LIMIT"
fi fi
ulimit -n $MAX_FD ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD" warn "Could not set maximum file descriptor limit: $MAX_FD"
fi fi
else else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi fi
fi fi
# For Darwin, add options to specify how the application appears in the dock # For Darwin, add options to specify how the application appears in the dock
if $darwin; then if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi fi
# For Cygwin, switch paths to Windows format before running java # For Cygwin, switch paths to Windows format before running java
if $cygwin ; then if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"` APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"` JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath # We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP="" SEP=""
for dir in $ROOTDIRSRAW ; do for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir" ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|" SEP="|"
done done
OURCYGPATTERN="(^($ROOTDIRS))" OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments # Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh # Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0 i=0
for arg in "$@" ; do for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else else
eval `echo args$i`="\"$arg\"" eval `echo args$i`="\"$arg\""
fi fi
i=$((i+1)) i=$((i+1))
done done
case $i in case $i in
(0) set -- ;; (0) set -- ;;
(1) set -- "$args0" ;; (1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;; (2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;; (3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;; (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac esac
fi fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() { function splitJvmOpts() {
JVM_OPTS=("$@") JVM_OPTS=("$@")
} }
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

View File

@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off @if "%DEBUG%" == "" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@rem @rem
@rem ########################################################################## @rem ##########################################################################
@rem Set local scope for the variables with windows NT shell @rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS= set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@rem Find java.exe @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init if "%ERRORLEVEL%" == "0" goto init
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo. echo.
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. echo location of your Java installation.
goto fail goto fail
:findJavaFromJavaHome :findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init if exist "%JAVA_EXE%" goto init
echo. echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo. echo.
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. echo location of your Java installation.
goto fail goto fail
:init :init
@rem Get command-line arguments, handling Windows variants @rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args :win9xME_args
@rem Slurp the command line arguments. @rem Slurp the command line arguments.
set CMD_LINE_ARGS= set CMD_LINE_ARGS=
set _SKIP=2 set _SKIP=2
:win9xME_args_slurp :win9xME_args_slurp
if "x%~1" == "x" goto execute if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%* set CMD_LINE_ARGS=%*
goto execute goto execute
:4NT_args :4NT_args
@rem Get arguments from the 4NT Shell from JP Software @rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$ set CMD_LINE_ARGS=%$
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if "%ERRORLEVEL%"=="0" goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1 exit /b 1
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal
:omega :omega

View File

@ -2,9 +2,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-java-client</artifactId> <artifactId>swagger-petstore-resteasy</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>swagger-java-client</name> <name>swagger-petstore-resteasy</name>
<version>1.0.0</version> <version>1.0.0</version>
<scm> <scm>
<connection>scm:git:git@github.com:swagger-api/swagger-mustache.git</connection> <connection>scm:git:git@github.com:swagger-api/swagger-mustache.git</connection>
@ -162,7 +162,11 @@
<artifactId>migbase64</artifactId> <artifactId>migbase64</artifactId>
<version>2.2</version> <version>2.2</version>
</dependency> </dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>2.3.4.Final</version>
</dependency>
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -1 +1 @@
rootProject.name = "swagger-java-client" rootProject.name = "swagger-petstore-resteasy"

View File

@ -1,3 +1,3 @@
<manifest package="io.swagger.client" xmlns:android="http://schemas.android.com/apk/res/android"> <manifest package="io.swagger.client" xmlns:android="http://schemas.android.com/apk/res/android">
<application /> <application />
</manifest> </manifest>

View File

@ -43,10 +43,10 @@ import io.swagger.client.auth.HttpBasicAuth;
import io.swagger.client.auth.ApiKeyAuth; import io.swagger.client.auth.ApiKeyAuth;
import io.swagger.client.auth.OAuth; import io.swagger.client.auth.OAuth;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class ApiClient { public class ApiClient {
private Map<String, String> defaultHeaderMap = new HashMap<String, String>(); private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
private String basePath = "http://petstore.swagger.io/v2"; private String basePath = "http://petstore.swagger.io:80/v2";
private boolean debugging = false; private boolean debugging = false;
private Client httpClient; private Client httpClient;
@ -77,6 +77,7 @@ public class ApiClient {
// Setup authentications (key: authentication name, value: authentication). // Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>(); authentications = new HashMap<String, Authentication>();
authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
authentications.put("http_basic_test", new HttpBasicAuth());
authentications.put("petstore_auth", new OAuth()); authentications.put("petstore_auth", new OAuth());
// Prevent the authentications from being modified. // Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications); authentications = Collections.unmodifiableMap(authentications);

View File

@ -1,91 +1,91 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client; package io.swagger.client;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class ApiException extends Exception { public class ApiException extends Exception {
private int code = 0; private int code = 0;
private Map<String, List<String>> responseHeaders = null; private Map<String, List<String>> responseHeaders = null;
private String responseBody = null; private String responseBody = null;
public ApiException() {} public ApiException() {}
public ApiException(Throwable throwable) { public ApiException(Throwable throwable) {
super(throwable); super(throwable);
} }
public ApiException(String message) { public ApiException(String message) {
super(message); super(message);
} }
public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders, String responseBody) { public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders, String responseBody) {
super(message, throwable); super(message, throwable);
this.code = code; this.code = code;
this.responseHeaders = responseHeaders; this.responseHeaders = responseHeaders;
this.responseBody = responseBody; this.responseBody = responseBody;
} }
public ApiException(String message, int code, Map<String, List<String>> responseHeaders, String responseBody) { public ApiException(String message, int code, Map<String, List<String>> responseHeaders, String responseBody) {
this(message, (Throwable) null, code, responseHeaders, responseBody); this(message, (Throwable) null, code, responseHeaders, responseBody);
} }
public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) { public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) {
this(message, throwable, code, responseHeaders, null); this(message, throwable, code, responseHeaders, null);
} }
public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) { public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) {
this((String) null, (Throwable) null, code, responseHeaders, responseBody); this((String) null, (Throwable) null, code, responseHeaders, responseBody);
} }
public ApiException(int code, String message) { public ApiException(int code, String message) {
super(message); super(message);
this.code = code; this.code = code;
} }
public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) { public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) {
this(code, message); this(code, message);
this.responseHeaders = responseHeaders; this.responseHeaders = responseHeaders;
this.responseBody = responseBody; this.responseBody = responseBody;
} }
/** /**
* Get the HTTP status code. * Get the HTTP status code.
* *
* @return HTTP status code * @return HTTP status code
*/ */
public int getCode() { public int getCode() {
return code; return code;
} }
/** /**
* Get the HTTP response headers. * Get the HTTP response headers.
* *
* @return A map of list of string * @return A map of list of string
*/ */
public Map<String, List<String>> getResponseHeaders() { public Map<String, List<String>> getResponseHeaders() {
return responseHeaders; return responseHeaders;
} }
/** /**
* Get the HTTP response body. * Get the HTTP response body.
* *
* @return Response body in the form of string * @return Response body in the form of string
*/ */
public String getResponseBody() { public String getResponseBody() {
return responseBody; return responseBody;
} }
} }

View File

@ -1,39 +1,39 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client; package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class Configuration { public class Configuration {
private static ApiClient defaultApiClient = new ApiClient(); private static ApiClient defaultApiClient = new ApiClient();
/** /**
* Get the default API client, which would be used when creating API * Get the default API client, which would be used when creating API
* instances without providing an API client. * instances without providing an API client.
* *
* @return Default API client * @return Default API client
*/ */
public static ApiClient getDefaultApiClient() { public static ApiClient getDefaultApiClient() {
return defaultApiClient; return defaultApiClient;
} }
/** /**
* Set the default API client, which would be used when creating API * Set the default API client, which would be used when creating API
* instances without providing an API client. * instances without providing an API client.
* *
* @param apiClient API client * @param apiClient API client
*/ */
public static void setDefaultApiClient(ApiClient apiClient) { public static void setDefaultApiClient(ApiClient apiClient) {
defaultApiClient = apiClient; defaultApiClient = apiClient;
} }
} }

View File

@ -0,0 +1,37 @@
package io.swagger.client;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.datatype.joda.*;
import java.text.DateFormat;
import javax.ws.rs.ext.ContextResolver;
public class JSON implements ContextResolver<ObjectMapper> {
private ObjectMapper mapper;
public JSON() {
mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
mapper.setDateFormat(new RFC3339DateFormat());
mapper.registerModule(new JodaModule());
}
/**
* Set the date format for JSON (de)serialization with Date properties.
*/
public void setDateFormat(DateFormat dateFormat) {
mapper.setDateFormat(dateFormat);
}
@Override
public ObjectMapper getContext(Class<?> type) {
return mapper;
}
}

View File

@ -1,52 +1,52 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client; package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class Pair { public class Pair {
private String name = ""; private String name = "";
private String value = ""; private String value = "";
public Pair (String name, String value) { public Pair (String name, String value) {
setName(name); setName(name);
setValue(value); setValue(value);
} }
private void setName(String name) { private void setName(String name) {
if (!isValidString(name)) return; if (!isValidString(name)) return;
this.name = name; this.name = name;
} }
private void setValue(String value) { private void setValue(String value) {
if (!isValidString(value)) return; if (!isValidString(value)) return;
this.value = value; this.value = value;
} }
public String getName() { public String getName() {
return this.name; return this.name;
} }
public String getValue() { public String getValue() {
return this.value; return this.value;
} }
private boolean isValidString(String arg) { private boolean isValidString(String arg) {
if (arg == null) return false; if (arg == null) return false;
if (arg.trim().isEmpty()) return false; if (arg.trim().isEmpty()) return false;
return true; return true;
} }
} }

View File

@ -0,0 +1,32 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client;
import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
import com.fasterxml.jackson.databind.util.ISO8601Utils;
import java.text.FieldPosition;
import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
String value = ISO8601Utils.format(date, true);
toAppendTo.append(value);
return toAppendTo;
}
}

View File

@ -1,55 +1,55 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client; package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class StringUtil { public class StringUtil {
/** /**
* Check if the given array contains the given value (with case-insensitive comparison). * Check if the given array contains the given value (with case-insensitive comparison).
* *
* @param array The array * @param array The array
* @param value The value to search * @param value The value to search
* @return true if the array contains the value * @return true if the array contains the value
*/ */
public static boolean containsIgnoreCase(String[] array, String value) { public static boolean containsIgnoreCase(String[] array, String value) {
for (String str : array) { for (String str : array) {
if (value == null && str == null) return true; if (value == null && str == null) return true;
if (value != null && value.equalsIgnoreCase(str)) return true; if (value != null && value.equalsIgnoreCase(str)) return true;
} }
return false; return false;
} }
/** /**
* Join an array of strings with the given separator. * Join an array of strings with the given separator.
* <p> * <p>
* Note: This might be replaced by utility method from commons-lang or guava someday * Note: This might be replaced by utility method from commons-lang or guava someday
* if one of those libraries is added as dependency. * if one of those libraries is added as dependency.
* </p> * </p>
* *
* @param array The array of strings * @param array The array of strings
* @param separator The separator * @param separator The separator
* @return the resulting string * @return the resulting string
*/ */
public static String join(String[] array, String separator) { public static String join(String[] array, String separator) {
int len = array.length; int len = array.length;
if (len == 0) return ""; if (len == 0) return "";
StringBuilder out = new StringBuilder(); StringBuilder out = new StringBuilder();
out.append(array[0]); out.append(array[0]);
for (int i = 1; i < len; i++) { for (int i = 1; i < len; i++) {
out.append(separator).append(array[i]); out.append(separator).append(array[i]);
} }
return out.toString(); return out.toString();
} }
} }

View File

@ -0,0 +1,232 @@
package io.swagger.client.api;
import io.swagger.client.ApiException;
import io.swagger.client.ApiClient;
import io.swagger.client.Configuration;
import io.swagger.client.Pair;
import javax.ws.rs.core.GenericType;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FakeApi {
private ApiClient apiClient;
public FakeApi() {
this(Configuration.getDefaultApiClient());
}
public FakeApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param body client model (required)
* @return Client
* @throws ApiException if fails to make API call
*/
public Client testClientModel(Client body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
}
// create path and map variables
String localVarPath = "/fake".replaceAll("\\{format\\}","json");
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* @param number None (required)
* @param _double None (required)
* @param patternWithoutDelimiter None (required)
* @param _byte None (required)
* @param integer None (optional)
* @param int32 None (optional)
* @param int64 None (optional)
* @param _float None (optional)
* @param string None (optional)
* @param binary None (optional)
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @param paramCallback None (optional)
* @throws ApiException if fails to make API call
*/
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, DateTime dateTime, String password, String paramCallback) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'number' is set
if (number == null) {
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
}
// verify the required parameter '_double' is set
if (_double == null) {
throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
}
// verify the required parameter 'patternWithoutDelimiter' is set
if (patternWithoutDelimiter == null) {
throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
}
// verify the required parameter '_byte' is set
if (_byte == null) {
throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
}
// create path and map variables
String localVarPath = "/fake".replaceAll("\\{format\\}","json");
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (integer != null)
localVarFormParams.put("integer", integer);
if (int32 != null)
localVarFormParams.put("int32", int32);
if (int64 != null)
localVarFormParams.put("int64", int64);
if (number != null)
localVarFormParams.put("number", number);
if (_float != null)
localVarFormParams.put("float", _float);
if (_double != null)
localVarFormParams.put("double", _double);
if (string != null)
localVarFormParams.put("string", string);
if (patternWithoutDelimiter != null)
localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
if (_byte != null)
localVarFormParams.put("byte", _byte);
if (binary != null)
localVarFormParams.put("binary", binary);
if (date != null)
localVarFormParams.put("date", date);
if (dateTime != null)
localVarFormParams.put("dateTime", dateTime);
if (password != null)
localVarFormParams.put("password", password);
if (paramCallback != null)
localVarFormParams.put("callback", paramCallback);
final String[] localVarAccepts = {
"application/xml; charset=utf-8", "application/json; charset=utf-8"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/xml; charset=utf-8", "application/json; charset=utf-8"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "http_basic_test" };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* To test enum parameters
* To test enum parameters
* @param enumFormStringArray Form parameter enum test (string array) (optional)
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @throws ApiException if fails to make API call
*/
public void testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/fake".replaceAll("\\{format\\}","json");
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
if (enumHeaderStringArray != null)
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
if (enumHeaderString != null)
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
if (enumFormStringArray != null)
localVarFormParams.put("enum_form_string_array", enumFormStringArray);
if (enumFormString != null)
localVarFormParams.put("enum_form_string", enumFormString);
if (enumQueryDouble != null)
localVarFormParams.put("enum_query_double", enumQueryDouble);
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"*/*"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
}

View File

@ -16,7 +16,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class PetApi { public class PetApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -143,7 +143,7 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
@ -164,7 +164,7 @@ public class PetApi {
} }
/** /**
* Finds Pets by tags * Finds Pets by tags
* Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required) * @param tags Tags to filter by (required)
* @return List<Pet> * @return List<Pet>
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
@ -185,7 +185,7 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class StoreApi { public class StoreApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -36,11 +36,11 @@ public class StoreApi {
/** /**
* Delete purchase order by ID * Delete purchase order by ID
* For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors * For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted (required) * @param orderId ID of the order that needs to be deleted (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void deleteOrder(Long orderId) throws ApiException { public void deleteOrder(String orderId) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'orderId' is set // verify the required parameter 'orderId' is set
@ -49,8 +49,8 @@ public class StoreApi {
} }
// create path and map variables // create path and map variables
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") String localVarPath = "/store/order/{order_id}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
// query params // query params
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
@ -112,7 +112,7 @@ public class StoreApi {
} }
/** /**
* Find purchase order by ID * Find purchase order by ID
* For valid response try integer IDs with value &gt;&#x3D; 1 and &lt;&#x3D; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required) * @param orderId ID of pet that needs to be fetched (required)
* @return Order * @return Order
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
@ -126,8 +126,8 @@ public class StoreApi {
} }
// create path and map variables // create path and map variables
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") String localVarPath = "/store/order/{order_id}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
// query params // query params
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class UserApi { public class UserApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -323,7 +323,7 @@ public class UserApi {
/** /**
* Updated user * Updated user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param username name that need to be updated (required) * @param username name that need to be deleted (required)
* @param body Updated user object (required) * @param body Updated user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */

View File

@ -1,75 +1,75 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.auth; package io.swagger.client.auth;
import io.swagger.client.Pair; import io.swagger.client.Pair;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class ApiKeyAuth implements Authentication { public class ApiKeyAuth implements Authentication {
private final String location; private final String location;
private final String paramName; private final String paramName;
private String apiKey; private String apiKey;
private String apiKeyPrefix; private String apiKeyPrefix;
public ApiKeyAuth(String location, String paramName) { public ApiKeyAuth(String location, String paramName) {
this.location = location; this.location = location;
this.paramName = paramName; this.paramName = paramName;
} }
public String getLocation() { public String getLocation() {
return location; return location;
} }
public String getParamName() { public String getParamName() {
return paramName; return paramName;
} }
public String getApiKey() { public String getApiKey() {
return apiKey; return apiKey;
} }
public void setApiKey(String apiKey) { public void setApiKey(String apiKey) {
this.apiKey = apiKey; this.apiKey = apiKey;
} }
public String getApiKeyPrefix() { public String getApiKeyPrefix() {
return apiKeyPrefix; return apiKeyPrefix;
} }
public void setApiKeyPrefix(String apiKeyPrefix) { public void setApiKeyPrefix(String apiKeyPrefix) {
this.apiKeyPrefix = apiKeyPrefix; this.apiKeyPrefix = apiKeyPrefix;
} }
@Override @Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) { public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
if (apiKey == null) { if (apiKey == null) {
return; return;
} }
String value; String value;
if (apiKeyPrefix != null) { if (apiKeyPrefix != null) {
value = apiKeyPrefix + " " + apiKey; value = apiKeyPrefix + " " + apiKey;
} else { } else {
value = apiKey; value = apiKey;
} }
if ("query".equals(location)) { if ("query".equals(location)) {
queryParams.add(new Pair(paramName, value)); queryParams.add(new Pair(paramName, value));
} else if ("header".equals(location)) { } else if ("header".equals(location)) {
headerParams.put(paramName, value); headerParams.put(paramName, value);
} }
} }
} }

View File

@ -1,29 +1,29 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.auth; package io.swagger.client.auth;
import io.swagger.client.Pair; import io.swagger.client.Pair;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
public interface Authentication { public interface Authentication {
/** /**
* Apply authentication settings to header and query params. * Apply authentication settings to header and query params.
* *
* @param queryParams List of query parameters * @param queryParams List of query parameters
* @param headerParams Map of header parameters * @param headerParams Map of header parameters
*/ */
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams); void applyToParams(List<Pair> queryParams, Map<String, String> headerParams);
} }

View File

@ -1,58 +1,58 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.auth; package io.swagger.client.auth;
import io.swagger.client.Pair; import io.swagger.client.Pair;
import com.migcomponents.migbase64.Base64; import com.migcomponents.migbase64.Base64;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class HttpBasicAuth implements Authentication { public class HttpBasicAuth implements Authentication {
private String username; private String username;
private String password; private String password;
public String getUsername() { public String getUsername() {
return username; return username;
} }
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
public String getPassword() { public String getPassword() {
return password; return password;
} }
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
@Override @Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) { public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
if (username == null && password == null) { if (username == null && password == null) {
return; return;
} }
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
try { try {
headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false)); headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false));
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
} }

View File

@ -1,39 +1,39 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.auth; package io.swagger.client.auth;
import io.swagger.client.Pair; import io.swagger.client.Pair;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00")
public class OAuth implements Authentication { public class OAuth implements Authentication {
private String accessToken; private String accessToken;
public String getAccessToken() { public String getAccessToken() {
return accessToken; return accessToken;
} }
public void setAccessToken(String accessToken) { public void setAccessToken(String accessToken) {
this.accessToken = accessToken; this.accessToken = accessToken;
} }
@Override @Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) { public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
if (accessToken != null) { if (accessToken != null) {
headerParams.put("Authorization", "Bearer " + accessToken); headerParams.put("Authorization", "Bearer " + accessToken);
} }
} }
} }

View File

@ -1,18 +1,18 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.auth; package io.swagger.client.auth;
public enum OAuthFlow { public enum OAuthFlow {
accessCode, implicit, password, application accessCode, implicit, password, application
} }

View File

@ -0,0 +1,132 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* AdditionalPropertiesClass
*/
public class AdditionalPropertiesClass {
@JsonProperty("map_property")
private Map<String, String> mapProperty = null;
@JsonProperty("map_of_map_property")
private Map<String, Map<String, String>> mapOfMapProperty = null;
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return this;
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<String, String>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
/**
* Get mapProperty
* @return mapProperty
**/
@ApiModelProperty(value = "")
public Map<String, String> getMapProperty() {
return mapProperty;
}
public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
/**
* Get mapOfMapProperty
* @return mapOfMapProperty
**/
@ApiModelProperty(value = "")
public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
public int hashCode() {
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,120 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Animal
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true )
@JsonSubTypes({
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
})
public class Animal {
@JsonProperty("className")
private String className = null;
@JsonProperty("color")
private String color = "red";
public Animal className(String className) {
this.className = className;
return this;
}
/**
* Get className
* @return className
**/
@ApiModelProperty(required = true, value = "")
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public Animal color(String color) {
this.color = color;
return this;
}
/**
* Get color
* @return color
**/
@ApiModelProperty(value = "")
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className) &&
Objects.equals(this.color, animal.color);
}
@Override
public int hashCode() {
return Objects.hash(className, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Animal {\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" color: ").append(toIndentedString(color)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,65 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import io.swagger.client.model.Animal;
import java.util.ArrayList;
import java.util.List;
/**
* AnimalFarm
*/
public class AnimalFarm extends ArrayList<Animal> {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AnimalFarm {\n");
sb.append(" ").append(toIndentedString(super.toString())).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,101 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfArrayOfNumberOnly
*/
public class ArrayOfArrayOfNumberOnly {
@JsonProperty("ArrayArrayNumber")
private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
return this;
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}
/**
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
@ApiModelProperty(value = "")
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
}
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfArrayOfNumberOnly {\n");
sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,101 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfNumberOnly
*/
public class ArrayOfNumberOnly {
@JsonProperty("ArrayNumber")
private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
return this;
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}
/**
* Get arrayNumber
* @return arrayNumber
**/
@ApiModelProperty(value = "")
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
}
public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfNumberOnly {\n");
sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,163 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.ReadOnlyFirst;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayTest
*/
public class ArrayTest {
@JsonProperty("array_of_string")
private List<String> arrayOfString = null;
@JsonProperty("array_array_of_integer")
private List<List<Long>> arrayArrayOfInteger = null;
@JsonProperty("array_array_of_model")
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
/**
* Get arrayOfString
* @return arrayOfString
**/
@ApiModelProperty(value = "")
public List<String> getArrayOfString() {
return arrayOfString;
}
public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
/**
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
@ApiModelProperty(value = "")
public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
}
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}
/**
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
@ApiModelProperty(value = "")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel;
}
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
}
@Override
public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayTest {\n");
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,205 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Capitalization
*/
public class Capitalization {
@JsonProperty("smallCamel")
private String smallCamel = null;
@JsonProperty("CapitalCamel")
private String capitalCamel = null;
@JsonProperty("small_Snake")
private String smallSnake = null;
@JsonProperty("Capital_Snake")
private String capitalSnake = null;
@JsonProperty("SCA_ETH_Flow_Points")
private String scAETHFlowPoints = null;
@JsonProperty("ATT_NAME")
private String ATT_NAME = null;
public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel;
return this;
}
/**
* Get smallCamel
* @return smallCamel
**/
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
}
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
public Capitalization capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
return this;
}
/**
* Get capitalCamel
* @return capitalCamel
**/
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
}
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
public Capitalization smallSnake(String smallSnake) {
this.smallSnake = smallSnake;
return this;
}
/**
* Get smallSnake
* @return smallSnake
**/
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
}
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
public Capitalization capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
return this;
}
/**
* Get capitalSnake
* @return capitalSnake
**/
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
}
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
return this;
}
/**
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
}
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
public Capitalization ATT_NAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
return this;
}
/**
* Name of the pet
* @return ATT_NAME
**/
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
}
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Capitalization capitalization = (Capitalization) o;
return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
Objects.equals(this.smallSnake, capitalization.smallSnake) &&
Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
}
@Override
public int hashCode() {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Capitalization {\n");
sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
sb.append(" ATT_NAME: ").append(toIndentedString(ATT_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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
/**
* Cat
*/
public class Cat extends Animal {
@JsonProperty("declawed")
private Boolean declawed = null;
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
/**
* Get declawed
* @return declawed
**/
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(declawed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,108 +1,113 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import io.swagger.annotations.ApiModel; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/** import io.swagger.annotations.ApiModel;
* Category import io.swagger.annotations.ApiModelProperty;
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00") /**
public class Category { * Category
private Long id = null; */
private String name = null; public class Category {
@JsonProperty("id")
public Category id(Long id) { private Long id = null;
this.id = id;
return this; @JsonProperty("name")
} private String name = null;
/** public Category id(Long id) {
* Get id this.id = id;
* @return id return this;
**/ }
@ApiModelProperty(example = "null", value = "")
public Long getId() { /**
return id; * Get id
} * @return id
**/
public void setId(Long id) { @ApiModelProperty(value = "")
this.id = id; public Long getId() {
} return id;
}
public Category name(String name) {
this.name = name; public void setId(Long id) {
return this; this.id = id;
} }
/** public Category name(String name) {
* Get name this.name = name;
* @return name return this;
**/ }
@ApiModelProperty(example = "null", value = "")
public String getName() { /**
return name; * Get name
} * @return name
**/
public void setName(String name) { @ApiModelProperty(value = "")
this.name = name; public String getName() {
} return name;
}
@Override public void setName(String name) {
public boolean equals(java.lang.Object o) { this.name = name;
if (this == o) { }
return true;
}
if (o == null || getClass() != o.getClass()) { @Override
return false; public boolean equals(java.lang.Object o) {
} if (this == o) {
Category category = (Category) o; return true;
return Objects.equals(this.id, category.id) && }
Objects.equals(this.name, category.name); if (o == null || getClass() != o.getClass()) {
} return false;
}
@Override Category category = (Category) o;
public int hashCode() { return Objects.equals(this.id, category.id) &&
return Objects.hash(id, name); Objects.equals(this.name, category.name);
} }
@Override
@Override public int hashCode() {
public String toString() { return Objects.hash(id, name);
StringBuilder sb = new StringBuilder(); }
sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); @Override
sb.append(" name: ").append(toIndentedString(name)).append("\n"); public String toString() {
sb.append("}"); StringBuilder sb = new StringBuilder();
return sb.toString(); sb.append("class Category {\n");
}
sb.append(" id: ").append(toIndentedString(id)).append("\n");
/** sb.append(" name: ").append(toIndentedString(name)).append("\n");
* Convert the given object to string with each line indented by 4 spaces sb.append("}");
* (except the first line). return sb.toString();
*/ }
private String toIndentedString(java.lang.Object o) {
if (o == null) { /**
return "null"; * Convert the given object to string with each line indented by 4 spaces
} * (except the first line).
return o.toString().replace("\n", "\n "); */
} private String toIndentedString(java.lang.Object o) {
if (o == null) {
} return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,91 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model with \&quot;_class\&quot; property
*/
@ApiModel(description = "Model for testing model with \"_class\" property")
public class ClassModel {
@JsonProperty("_class")
private String propertyClass = null;
public ClassModel propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
/**
* Get propertyClass
* @return propertyClass
**/
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClassModel classModel = (ClassModel) o;
return Objects.equals(this.propertyClass, classModel.propertyClass);
}
@Override
public int hashCode() {
return Objects.hash(propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClassModel {\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,90 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Client
*/
public class Client {
@JsonProperty("client")
private String client = null;
public Client client(String client) {
this.client = client;
return this;
}
/**
* Get client
* @return client
**/
@ApiModelProperty(value = "")
public String getClient() {
return client;
}
public void setClient(String client) {
this.client = client;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Client client = (Client) o;
return Objects.equals(this.client, client.client);
}
@Override
public int hashCode() {
return Objects.hash(client);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Client {\n");
sb.append(" client: ").append(toIndentedString(client)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
/**
* Dog
*/
public class Dog extends Animal {
@JsonProperty("breed")
private String breed = null;
public Dog breed(String breed) {
this.breed = breed;
return this;
}
/**
* Get breed
* @return breed
**/
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,185 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* EnumArrays
*/
public class EnumArrays {
/**
* Gets or Sets justSymbol
*/
public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(">="),
DOLLAR("$");
private String value;
JustSymbolEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static JustSymbolEnum fromValue(String text) {
for (JustSymbolEnum b : JustSymbolEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("just_symbol")
private JustSymbolEnum justSymbol = null;
/**
* Gets or Sets arrayEnum
*/
public enum ArrayEnumEnum {
FISH("fish"),
CRAB("crab");
private String value;
ArrayEnumEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ArrayEnumEnum fromValue(String text) {
for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("array_enum")
private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
return this;
}
/**
* Get justSymbol
* @return justSymbol
**/
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
}
public void setJustSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
}
public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
return this;
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}
/**
* Get arrayEnum
* @return arrayEnum
**/
@ApiModelProperty(value = "")
public List<ArrayEnumEnum> getArrayEnum() {
return arrayEnum;
}
public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnumArrays enumArrays = (EnumArrays) o;
return Objects.equals(this.justSymbol, enumArrays.justSymbol) &&
Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
}
@Override
public int hashCode() {
return Objects.hash(justSymbol, arrayEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EnumArrays {\n");
sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n");
sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,54 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets EnumClass
*/
public enum EnumClass {
_ABC("_abc"),
_EFG("-efg"),
_XYZ_("(xyz)");
private String value;
EnumClass(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumClass fromValue(String text) {
for (EnumClass b : EnumClass.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}

View File

@ -0,0 +1,255 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.OuterEnum;
/**
* EnumTest
*/
public class EnumTest {
/**
* Gets or Sets enumString
*/
public enum EnumStringEnum {
UPPER("UPPER"),
LOWER("lower"),
EMPTY("");
private String value;
EnumStringEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumStringEnum fromValue(String text) {
for (EnumStringEnum b : EnumStringEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("enum_string")
private EnumStringEnum enumString = null;
/**
* Gets or Sets enumInteger
*/
public enum EnumIntegerEnum {
NUMBER_1(1),
NUMBER_MINUS_1(-1);
private Integer value;
EnumIntegerEnum(Integer value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumIntegerEnum fromValue(String text) {
for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("enum_integer")
private EnumIntegerEnum enumInteger = null;
/**
* Gets or Sets enumNumber
*/
public enum EnumNumberEnum {
NUMBER_1_DOT_1(1.1),
NUMBER_MINUS_1_DOT_2(-1.2);
private Double value;
EnumNumberEnum(Double value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumNumberEnum fromValue(String text) {
for (EnumNumberEnum b : EnumNumberEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("enum_number")
private EnumNumberEnum enumNumber = null;
@JsonProperty("outerEnum")
private OuterEnum outerEnum = null;
public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;
return this;
}
/**
* Get enumString
* @return enumString
**/
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
}
public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString;
}
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
}
/**
* Get enumInteger
* @return enumInteger
**/
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
}
public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
return this;
}
/**
* Get enumNumber
* @return enumNumber
**/
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
}
public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
return this;
}
/**
* Get outerEnum
* @return outerEnum
**/
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
}
@Override
public int hashCode() {
return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EnumTest {\n");
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,380 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
/**
* FormatTest
*/
public class FormatTest {
@JsonProperty("integer")
private Integer integer = null;
@JsonProperty("int32")
private Integer int32 = null;
@JsonProperty("int64")
private Long int64 = null;
@JsonProperty("number")
private BigDecimal number = null;
@JsonProperty("float")
private Float _float = null;
@JsonProperty("double")
private Double _double = null;
@JsonProperty("string")
private String string = null;
@JsonProperty("byte")
private byte[] _byte = null;
@JsonProperty("binary")
private byte[] binary = null;
@JsonProperty("date")
private LocalDate date = null;
@JsonProperty("dateTime")
private DateTime dateTime = null;
@JsonProperty("uuid")
private UUID uuid = null;
@JsonProperty("password")
private String password = null;
public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
/**
* Get integer
* minimum: 10
* maximum: 100
* @return integer
**/
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
/**
* Get int32
* minimum: 20
* maximum: 200
* @return int32
**/
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
/**
* Get int64
* @return int64
**/
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
/**
* Get number
* minimum: 32.1
* maximum: 543.2
* @return number
**/
@ApiModelProperty(required = true, value = "")
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
/**
* Get _float
* minimum: 54.3
* maximum: 987.6
* @return _float
**/
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
/**
* Get _double
* minimum: 67.8
* maximum: 123.4
* @return _double
**/
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
public FormatTest string(String string) {
this.string = string;
return this;
}
/**
* Get string
* @return string
**/
@ApiModelProperty(value = "")
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
/**
* Get _byte
* @return _byte
**/
@ApiModelProperty(required = true, value = "")
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
public FormatTest binary(byte[] binary) {
this.binary = binary;
return this;
}
/**
* Get binary
* @return binary
**/
@ApiModelProperty(value = "")
public byte[] getBinary() {
return binary;
}
public void setBinary(byte[] binary) {
this.binary = binary;
}
public FormatTest date(LocalDate date) {
this.date = date;
return this;
}
/**
* Get date
* @return date
**/
@ApiModelProperty(required = true, value = "")
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public FormatTest dateTime(DateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* Get dateTime
* @return dateTime
**/
@ApiModelProperty(value = "")
public DateTime getDateTime() {
return dateTime;
}
public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime;
}
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
**/
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
public FormatTest password(String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
**/
@ApiModelProperty(required = true, value = "")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FormatTest {\n");
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,95 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* HasOnlyReadOnly
*/
public class HasOnlyReadOnly {
@JsonProperty("bar")
private String bar = null;
@JsonProperty("foo")
private String foo = null;
/**
* Get bar
* @return bar
**/
@ApiModelProperty(value = "")
public String getBar() {
return bar;
}
/**
* Get foo
* @return foo
**/
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
return Objects.equals(this.bar, hasOnlyReadOnly.bar) &&
Objects.equals(this.foo, hasOnlyReadOnly.foo);
}
@Override
public int hashCode() {
return Objects.hash(bar, foo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HasOnlyReadOnly {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" foo: ").append(toIndentedString(foo)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,163 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* MapTest
*/
public class MapTest {
@JsonProperty("map_map_of_string")
private Map<String, Map<String, String>> mapMapOfString = null;
/**
* Gets or Sets inner
*/
public enum InnerEnum {
UPPER("UPPER"),
LOWER("lower");
private String value;
InnerEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static InnerEnum fromValue(String text) {
for (InnerEnum b : InnerEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("map_of_enum_string")
private Map<String, InnerEnum> mapOfEnumString = null;
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
return this;
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
/**
* Get mapMapOfString
* @return mapMapOfString
**/
@ApiModelProperty(value = "")
public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString;
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
return this;
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}
/**
* Get mapOfEnumString
* @return mapOfEnumString
**/
@ApiModelProperty(value = "")
public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString;
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MapTest mapTest = (MapTest) o;
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
}
@Override
public int hashCode() {
return Objects.hash(mapMapOfString, mapOfEnumString);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MapTest {\n");
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,150 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private UUID uuid = null;
@JsonProperty("dateTime")
private DateTime dateTime = null;
@JsonProperty("map")
private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
**/
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
public MixedPropertiesAndAdditionalPropertiesClass dateTime(DateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* Get dateTime
* @return dateTime
**/
@ApiModelProperty(value = "")
public DateTime getDateTime() {
return dateTime;
}
public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime;
}
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map;
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}
/**
* Get map
* @return map
**/
@ApiModelProperty(value = "")
public Map<String, Animal> getMap() {
return map;
}
public void setMap(Map<String, Animal> map) {
this.map = map;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
}
@Override
public int hashCode() {
return Objects.hash(uuid, dateTime, map);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" map: ").append(toIndentedString(map)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,114 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name starting with number
*/
@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
@JsonProperty("name")
private Integer name = null;
@JsonProperty("class")
private String propertyClass = null;
public Model200Response name(Integer name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(value = "")
public Integer getName() {
return name;
}
public void setName(Integer name) {
this.name = name;
}
public Model200Response propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
/**
* Get propertyClass
* @return propertyClass
**/
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.propertyClass, _200Response.propertyClass);
}
@Override
public int hashCode() {
return Objects.hash(name, propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Model200Response {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,130 +1,136 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import io.swagger.annotations.ApiModel; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/** import io.swagger.annotations.ApiModel;
* ModelApiResponse import io.swagger.annotations.ApiModelProperty;
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00") /**
public class ModelApiResponse { * ModelApiResponse
private Integer code = null; */
private String type = null; public class ModelApiResponse {
@JsonProperty("code")
private String message = null; private Integer code = null;
public ModelApiResponse code(Integer code) { @JsonProperty("type")
this.code = code; private String type = null;
return this;
} @JsonProperty("message")
private String message = null;
/**
* Get code public ModelApiResponse code(Integer code) {
* @return code this.code = code;
**/ return this;
@ApiModelProperty(example = "null", value = "") }
public Integer getCode() {
return code; /**
} * Get code
* @return code
public void setCode(Integer code) { **/
this.code = code; @ApiModelProperty(value = "")
} public Integer getCode() {
return code;
public ModelApiResponse type(String type) { }
this.type = type;
return this; public void setCode(Integer code) {
} this.code = code;
}
/**
* Get type public ModelApiResponse type(String type) {
* @return type this.type = type;
**/ return this;
@ApiModelProperty(example = "null", value = "") }
public String getType() {
return type; /**
} * Get type
* @return type
public void setType(String type) { **/
this.type = type; @ApiModelProperty(value = "")
} public String getType() {
return type;
public ModelApiResponse message(String message) { }
this.message = message;
return this; public void setType(String type) {
} this.type = type;
}
/**
* Get message public ModelApiResponse message(String message) {
* @return message this.message = message;
**/ return this;
@ApiModelProperty(example = "null", value = "") }
public String getMessage() {
return message; /**
} * Get message
* @return message
public void setMessage(String message) { **/
this.message = message; @ApiModelProperty(value = "")
} public String getMessage() {
return message;
}
@Override
public boolean equals(java.lang.Object o) { public void setMessage(String message) {
if (this == o) { this.message = message;
return true; }
}
if (o == null || getClass() != o.getClass()) {
return false; @Override
} public boolean equals(java.lang.Object o) {
ModelApiResponse _apiResponse = (ModelApiResponse) o; if (this == o) {
return Objects.equals(this.code, _apiResponse.code) && return true;
Objects.equals(this.type, _apiResponse.type) && }
Objects.equals(this.message, _apiResponse.message); if (o == null || getClass() != o.getClass()) {
} return false;
}
@Override ModelApiResponse _apiResponse = (ModelApiResponse) o;
public int hashCode() { return Objects.equals(this.code, _apiResponse.code) &&
return Objects.hash(code, type, message); Objects.equals(this.type, _apiResponse.type) &&
} Objects.equals(this.message, _apiResponse.message);
}
@Override @Override
public String toString() { public int hashCode() {
StringBuilder sb = new StringBuilder(); return Objects.hash(code, type, message);
sb.append("class ModelApiResponse {\n"); }
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); @Override
sb.append(" message: ").append(toIndentedString(message)).append("\n"); public String toString() {
sb.append("}"); StringBuilder sb = new StringBuilder();
return sb.toString(); sb.append("class ModelApiResponse {\n");
}
sb.append(" code: ").append(toIndentedString(code)).append("\n");
/** sb.append(" type: ").append(toIndentedString(type)).append("\n");
* Convert the given object to string with each line indented by 4 spaces sb.append(" message: ").append(toIndentedString(message)).append("\n");
* (except the first line). sb.append("}");
*/ return sb.toString();
private String toIndentedString(java.lang.Object o) { }
if (o == null) {
return "null"; /**
} * Convert the given object to string with each line indented by 4 spaces
return o.toString().replace("\n", "\n "); * (except the first line).
} */
private String toIndentedString(java.lang.Object o) {
} if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,91 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing reserved words
*/
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
@JsonProperty("return")
private Integer _return = null;
public ModelReturn _return(Integer _return) {
this._return = _return;
return this;
}
/**
* Get _return
* @return _return
**/
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
}
public void setReturn(Integer _return) {
this._return = _return;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelReturn _return = (ModelReturn) o;
return Objects.equals(this._return, _return._return);
}
@Override
public int hashCode() {
return Objects.hash(_return);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelReturn {\n");
sb.append(" _return: ").append(toIndentedString(_return)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,142 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name same as property name
*/
@ApiModel(description = "Model for testing model name same as property name")
public class Name {
@JsonProperty("name")
private Integer name = null;
@JsonProperty("snake_case")
private Integer snakeCase = null;
@JsonProperty("property")
private String property = null;
@JsonProperty("123Number")
private Integer _123Number = null;
public Name name(Integer name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(required = true, value = "")
public Integer getName() {
return name;
}
public void setName(Integer name) {
this.name = name;
}
/**
* Get snakeCase
* @return snakeCase
**/
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
public Name property(String property) {
this.property = property;
return this;
}
/**
* Get property
* @return property
**/
@ApiModelProperty(value = "")
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
/**
* Get _123Number
* @return _123Number
**/
@ApiModelProperty(value = "")
public Integer get123Number() {
return _123Number;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Name name = (Name) o;
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property) &&
Objects.equals(this._123Number, name._123Number);
}
@Override
public int hashCode() {
return Objects.hash(name, snakeCase, property, _123Number);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Name {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
sb.append(" _123Number: ").append(toIndentedString(_123Number)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,91 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* NumberOnly
*/
public class NumberOnly {
@JsonProperty("JustNumber")
private BigDecimal justNumber = null;
public NumberOnly justNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
return this;
}
/**
* Get justNumber
* @return justNumber
**/
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
}
public void setJustNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NumberOnly numberOnly = (NumberOnly) o;
return Objects.equals(this.justNumber, numberOnly.justNumber);
}
@Override
public int hashCode() {
return Objects.hash(justNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NumberOnly {\n");
sb.append(" justNumber: ").append(toIndentedString(justNumber)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,219 +1,239 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import io.swagger.annotations.ApiModel; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonCreator;
import org.joda.time.DateTime; import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
/** import io.swagger.annotations.ApiModelProperty;
* Order import org.joda.time.DateTime;
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00") /**
public class Order { * Order
private Long id = null; */
private Long petId = null; public class Order {
@JsonProperty("id")
private Integer quantity = null; private Long id = null;
private DateTime shipDate = null; @JsonProperty("petId")
private Long petId = null;
/**
* Order Status @JsonProperty("quantity")
*/ private Integer quantity = null;
public enum StatusEnum {
PLACED("placed"), @JsonProperty("shipDate")
private DateTime shipDate = null;
APPROVED("approved"),
/**
DELIVERED("delivered"); * Order Status
*/
private String value; public enum StatusEnum {
PLACED("placed"),
StatusEnum(String value) {
this.value = value; APPROVED("approved"),
}
DELIVERED("delivered");
@Override
public String toString() { private String value;
return String.valueOf(value);
} StatusEnum(String value) {
} this.value = value;
}
private StatusEnum status = null;
@Override
private Boolean complete = false; @JsonValue
public String toString() {
public Order id(Long id) { return String.valueOf(value);
this.id = id; }
return this;
} @JsonCreator
public static StatusEnum fromValue(String text) {
/** for (StatusEnum b : StatusEnum.values()) {
* Get id if (String.valueOf(b.value).equals(text)) {
* @return id return b;
**/ }
@ApiModelProperty(example = "null", value = "") }
public Long getId() { return null;
return id; }
} }
public void setId(Long id) { @JsonProperty("status")
this.id = id; private StatusEnum status = null;
}
@JsonProperty("complete")
public Order petId(Long petId) { private Boolean complete = false;
this.petId = petId;
return this; public Order id(Long id) {
} this.id = id;
return this;
/** }
* Get petId
* @return petId /**
**/ * Get id
@ApiModelProperty(example = "null", value = "") * @return id
public Long getPetId() { **/
return petId; @ApiModelProperty(value = "")
} public Long getId() {
return id;
public void setPetId(Long petId) { }
this.petId = petId;
} public void setId(Long id) {
this.id = id;
public Order quantity(Integer quantity) { }
this.quantity = quantity;
return this; public Order petId(Long petId) {
} this.petId = petId;
return this;
/** }
* Get quantity
* @return quantity /**
**/ * Get petId
@ApiModelProperty(example = "null", value = "") * @return petId
public Integer getQuantity() { **/
return quantity; @ApiModelProperty(value = "")
} public Long getPetId() {
return petId;
public void setQuantity(Integer quantity) { }
this.quantity = quantity;
} public void setPetId(Long petId) {
this.petId = petId;
public Order shipDate(DateTime shipDate) { }
this.shipDate = shipDate;
return this; public Order quantity(Integer quantity) {
} this.quantity = quantity;
return this;
/** }
* Get shipDate
* @return shipDate /**
**/ * Get quantity
@ApiModelProperty(example = "null", value = "") * @return quantity
public DateTime getShipDate() { **/
return shipDate; @ApiModelProperty(value = "")
} public Integer getQuantity() {
return quantity;
public void setShipDate(DateTime shipDate) { }
this.shipDate = shipDate;
} public void setQuantity(Integer quantity) {
this.quantity = quantity;
public Order status(StatusEnum status) { }
this.status = status;
return this; public Order shipDate(DateTime shipDate) {
} this.shipDate = shipDate;
return this;
/** }
* Order Status
* @return status /**
**/ * Get shipDate
@ApiModelProperty(example = "null", value = "Order Status") * @return shipDate
public StatusEnum getStatus() { **/
return status; @ApiModelProperty(value = "")
} public DateTime getShipDate() {
return shipDate;
public void setStatus(StatusEnum status) { }
this.status = status;
} public void setShipDate(DateTime shipDate) {
this.shipDate = shipDate;
public Order complete(Boolean complete) { }
this.complete = complete;
return this; public Order status(StatusEnum status) {
} this.status = status;
return this;
/** }
* Get complete
* @return complete /**
**/ * Order Status
@ApiModelProperty(example = "null", value = "") * @return status
public Boolean getComplete() { **/
return complete; @ApiModelProperty(value = "Order Status")
} public StatusEnum getStatus() {
return status;
public void setComplete(Boolean complete) { }
this.complete = complete;
} public void setStatus(StatusEnum status) {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) { public Order complete(Boolean complete) {
if (this == o) { this.complete = complete;
return true; return this;
} }
if (o == null || getClass() != o.getClass()) {
return false; /**
} * Get complete
Order order = (Order) o; * @return complete
return Objects.equals(this.id, order.id) && **/
Objects.equals(this.petId, order.petId) && @ApiModelProperty(value = "")
Objects.equals(this.quantity, order.quantity) && public Boolean getComplete() {
Objects.equals(this.shipDate, order.shipDate) && return complete;
Objects.equals(this.status, order.status) && }
Objects.equals(this.complete, order.complete);
} public void setComplete(Boolean complete) {
this.complete = complete;
@Override }
public int hashCode() {
return Objects.hash(id, petId, quantity, shipDate, status, complete);
} @Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@Override return true;
public String toString() { }
StringBuilder sb = new StringBuilder(); if (o == null || getClass() != o.getClass()) {
sb.append("class Order {\n"); return false;
}
sb.append(" id: ").append(toIndentedString(id)).append("\n"); Order order = (Order) o;
sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); return Objects.equals(this.id, order.id) &&
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); Objects.equals(this.petId, order.petId) &&
sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); Objects.equals(this.quantity, order.quantity) &&
sb.append(" status: ").append(toIndentedString(status)).append("\n"); Objects.equals(this.shipDate, order.shipDate) &&
sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); Objects.equals(this.status, order.status) &&
sb.append("}"); Objects.equals(this.complete, order.complete);
return sb.toString(); }
}
@Override
/** public int hashCode() {
* Convert the given object to string with each line indented by 4 spaces return Objects.hash(id, petId, quantity, shipDate, status, complete);
* (except the first line). }
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) { @Override
return "null"; public String toString() {
} StringBuilder sb = new StringBuilder();
return o.toString().replace("\n", "\n "); 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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,54 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnum
*/
public enum OuterEnum {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
private String value;
OuterEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnum fromValue(String text) {
for (OuterEnum b : OuterEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}

View File

@ -1,232 +1,255 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import io.swagger.annotations.ApiModel; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.client.model.Category; import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.client.model.Tag; import io.swagger.annotations.ApiModel;
import java.util.ArrayList; import io.swagger.annotations.ApiModelProperty;
import java.util.List; import io.swagger.client.model.Category;
import io.swagger.client.model.Tag;
/** import java.util.ArrayList;
* Pet import java.util.List;
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00") /**
public class Pet { * Pet
private Long id = null; */
private Category category = null; public class Pet {
@JsonProperty("id")
private String name = null; private Long id = null;
private List<String> photoUrls = new ArrayList<String>(); @JsonProperty("category")
private Category category = null;
private List<Tag> tags = new ArrayList<Tag>();
@JsonProperty("name")
/** private String name = null;
* pet status in the store
*/ @JsonProperty("photoUrls")
public enum StatusEnum { private List<String> photoUrls = new ArrayList<String>();
AVAILABLE("available"),
@JsonProperty("tags")
PENDING("pending"), private List<Tag> tags = null;
SOLD("sold"); /**
* pet status in the store
private String value; */
public enum StatusEnum {
StatusEnum(String value) { AVAILABLE("available"),
this.value = value;
} PENDING("pending"),
@Override SOLD("sold");
public String toString() {
return String.valueOf(value); private String value;
}
} StatusEnum(String value) {
this.value = value;
private StatusEnum status = null; }
public Pet id(Long id) { @Override
this.id = id; @JsonValue
return this; public String toString() {
} return String.valueOf(value);
}
/**
* Get id @JsonCreator
* @return id public static StatusEnum fromValue(String text) {
**/ for (StatusEnum b : StatusEnum.values()) {
@ApiModelProperty(example = "null", value = "") if (String.valueOf(b.value).equals(text)) {
public Long getId() { return b;
return id; }
} }
return null;
public void setId(Long id) { }
this.id = id; }
}
@JsonProperty("status")
public Pet category(Category category) { private StatusEnum status = null;
this.category = category;
return this; public Pet id(Long id) {
} this.id = id;
return this;
/** }
* Get category
* @return category /**
**/ * Get id
@ApiModelProperty(example = "null", value = "") * @return id
public Category getCategory() { **/
return category; @ApiModelProperty(value = "")
} public Long getId() {
return id;
public void setCategory(Category category) { }
this.category = category;
} public void setId(Long id) {
this.id = id;
public Pet name(String name) { }
this.name = name;
return this; public Pet category(Category category) {
} this.category = category;
return this;
/** }
* Get name
* @return name /**
**/ * Get category
@ApiModelProperty(example = "doggie", required = true, value = "") * @return category
public String getName() { **/
return name; @ApiModelProperty(value = "")
} public Category getCategory() {
return category;
public void setName(String name) { }
this.name = name;
} public void setCategory(Category category) {
this.category = category;
public Pet photoUrls(List<String> photoUrls) { }
this.photoUrls = photoUrls;
return this; public Pet name(String name) {
} this.name = name;
return this;
public Pet addPhotoUrlsItem(String photoUrlsItem) { }
this.photoUrls.add(photoUrlsItem);
return this; /**
} * Get name
* @return name
/** **/
* Get photoUrls @ApiModelProperty(example = "doggie", required = true, value = "")
* @return photoUrls public String getName() {
**/ return name;
@ApiModelProperty(example = "null", required = true, value = "") }
public List<String> getPhotoUrls() {
return photoUrls; public void setName(String name) {
} this.name = name;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls; public Pet photoUrls(List<String> photoUrls) {
} this.photoUrls = photoUrls;
return this;
public Pet tags(List<Tag> tags) { }
this.tags = tags;
return this; public Pet addPhotoUrlsItem(String photoUrlsItem) {
} this.photoUrls.add(photoUrlsItem);
return this;
public Pet addTagsItem(Tag tagsItem) { }
this.tags.add(tagsItem);
return this; /**
} * Get photoUrls
* @return photoUrls
/** **/
* Get tags @ApiModelProperty(required = true, value = "")
* @return tags public List<String> getPhotoUrls() {
**/ return photoUrls;
@ApiModelProperty(example = "null", value = "") }
public List<Tag> getTags() {
return tags; public void setPhotoUrls(List<String> photoUrls) {
} this.photoUrls = photoUrls;
}
public void setTags(List<Tag> tags) {
this.tags = tags; public Pet tags(List<Tag> tags) {
} this.tags = tags;
return this;
public Pet status(StatusEnum status) { }
this.status = status;
return this; public Pet addTagsItem(Tag tagsItem) {
} if (this.tags == null) {
this.tags = new ArrayList<Tag>();
/** }
* pet status in the store this.tags.add(tagsItem);
* @return status return this;
**/ }
@ApiModelProperty(example = "null", value = "pet status in the store")
public StatusEnum getStatus() { /**
return status; * Get tags
} * @return tags
**/
public void setStatus(StatusEnum status) { @ApiModelProperty(value = "")
this.status = status; public List<Tag> getTags() {
} return tags;
}
@Override public void setTags(List<Tag> tags) {
public boolean equals(java.lang.Object o) { this.tags = tags;
if (this == o) { }
return true;
} public Pet status(StatusEnum status) {
if (o == null || getClass() != o.getClass()) { this.status = status;
return false; return this;
} }
Pet pet = (Pet) o;
return Objects.equals(this.id, pet.id) && /**
Objects.equals(this.category, pet.category) && * pet status in the store
Objects.equals(this.name, pet.name) && * @return status
Objects.equals(this.photoUrls, pet.photoUrls) && **/
Objects.equals(this.tags, pet.tags) && @ApiModelProperty(value = "pet status in the store")
Objects.equals(this.status, pet.status); public StatusEnum getStatus() {
} return status;
}
@Override
public int hashCode() { public void setStatus(StatusEnum status) {
return Objects.hash(id, category, name, photoUrls, tags, status); this.status = status;
} }
@Override @Override
public String toString() { public boolean equals(java.lang.Object o) {
StringBuilder sb = new StringBuilder(); if (this == o) {
sb.append("class Pet {\n"); return true;
}
sb.append(" id: ").append(toIndentedString(id)).append("\n"); if (o == null || getClass() != o.getClass()) {
sb.append(" category: ").append(toIndentedString(category)).append("\n"); return false;
sb.append(" name: ").append(toIndentedString(name)).append("\n"); }
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); Pet pet = (Pet) o;
sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); return Objects.equals(this.id, pet.id) &&
sb.append(" status: ").append(toIndentedString(status)).append("\n"); Objects.equals(this.category, pet.category) &&
sb.append("}"); Objects.equals(this.name, pet.name) &&
return sb.toString(); Objects.equals(this.photoUrls, pet.photoUrls) &&
} Objects.equals(this.tags, pet.tags) &&
Objects.equals(this.status, pet.status);
/** }
* Convert the given object to string with each line indented by 4 spaces
* (except the first line). @Override
*/ public int hashCode() {
private String toIndentedString(java.lang.Object o) { return Objects.hash(id, category, name, photoUrls, tags, status);
if (o == null) { }
return "null";
}
return o.toString().replace("\n", "\n "); @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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,104 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* ReadOnlyFirst
*/
public class ReadOnlyFirst {
@JsonProperty("bar")
private String bar = null;
@JsonProperty("baz")
private String baz = null;
/**
* Get bar
* @return bar
**/
@ApiModelProperty(value = "")
public String getBar() {
return bar;
}
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;
}
/**
* Get baz
* @return baz
**/
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
}
public void setBaz(String baz) {
this.baz = baz;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
return Objects.equals(this.bar, readOnlyFirst.bar) &&
Objects.equals(this.baz, readOnlyFirst.baz);
}
@Override
public int hashCode() {
return Objects.hash(bar, baz);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ReadOnlyFirst {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" baz: ").append(toIndentedString(baz)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,90 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* SpecialModelName
*/
public class SpecialModelName {
@JsonProperty("$special[property.name]")
private Long specialPropertyName = null;
public SpecialModelName specialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName;
return this;
}
/**
* Get specialPropertyName
* @return specialPropertyName
**/
@ApiModelProperty(value = "")
public Long getSpecialPropertyName() {
return specialPropertyName;
}
public void setSpecialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SpecialModelName specialModelName = (SpecialModelName) o;
return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
}
@Override
public int hashCode() {
return Objects.hash(specialPropertyName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SpecialModelName {\n");
sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,108 +1,113 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import io.swagger.annotations.ApiModel; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/** import io.swagger.annotations.ApiModel;
* Tag import io.swagger.annotations.ApiModelProperty;
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00") /**
public class Tag { * Tag
private Long id = null; */
private String name = null; public class Tag {
@JsonProperty("id")
public Tag id(Long id) { private Long id = null;
this.id = id;
return this; @JsonProperty("name")
} private String name = null;
/** public Tag id(Long id) {
* Get id this.id = id;
* @return id return this;
**/ }
@ApiModelProperty(example = "null", value = "")
public Long getId() { /**
return id; * Get id
} * @return id
**/
public void setId(Long id) { @ApiModelProperty(value = "")
this.id = id; public Long getId() {
} return id;
}
public Tag name(String name) {
this.name = name; public void setId(Long id) {
return this; this.id = id;
} }
/** public Tag name(String name) {
* Get name this.name = name;
* @return name return this;
**/ }
@ApiModelProperty(example = "null", value = "")
public String getName() { /**
return name; * Get name
} * @return name
**/
public void setName(String name) { @ApiModelProperty(value = "")
this.name = name; public String getName() {
} return name;
}
@Override public void setName(String name) {
public boolean equals(java.lang.Object o) { this.name = name;
if (this == o) { }
return true;
}
if (o == null || getClass() != o.getClass()) { @Override
return false; public boolean equals(java.lang.Object o) {
} if (this == o) {
Tag tag = (Tag) o; return true;
return Objects.equals(this.id, tag.id) && }
Objects.equals(this.name, tag.name); if (o == null || getClass() != o.getClass()) {
} return false;
}
@Override Tag tag = (Tag) o;
public int hashCode() { return Objects.equals(this.id, tag.id) &&
return Objects.hash(id, name); Objects.equals(this.name, tag.name);
} }
@Override
@Override public int hashCode() {
public String toString() { return Objects.hash(id, name);
StringBuilder sb = new StringBuilder(); }
sb.append("class Tag {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); @Override
sb.append(" name: ").append(toIndentedString(name)).append("\n"); public String toString() {
sb.append("}"); StringBuilder sb = new StringBuilder();
return sb.toString(); sb.append("class Tag {\n");
}
sb.append(" id: ").append(toIndentedString(id)).append("\n");
/** sb.append(" name: ").append(toIndentedString(name)).append("\n");
* Convert the given object to string with each line indented by 4 spaces sb.append("}");
* (except the first line). return sb.toString();
*/ }
private String toIndentedString(java.lang.Object o) {
if (o == null) { /**
return "null"; * Convert the given object to string with each line indented by 4 spaces
} * (except the first line).
return o.toString().replace("\n", "\n "); */
} private String toIndentedString(java.lang.Object o) {
if (o == null) {
} return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,240 +1,251 @@
/* /*
* Swagger Petstore * Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git * https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package io.swagger.client.model; package io.swagger.client.model;
import java.util.Objects; import java.util.Objects;
import io.swagger.annotations.ApiModel; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/** import io.swagger.annotations.ApiModel;
* User import io.swagger.annotations.ApiModelProperty;
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-12-01T16:09:12.680-06:00") /**
public class User { * User
private Long id = null; */
private String username = null; public class User {
@JsonProperty("id")
private String firstName = null; private Long id = null;
private String lastName = null; @JsonProperty("username")
private String username = null;
private String email = null;
@JsonProperty("firstName")
private String password = null; private String firstName = null;
private String phone = null; @JsonProperty("lastName")
private String lastName = null;
private Integer userStatus = null;
@JsonProperty("email")
public User id(Long id) { private String email = null;
this.id = id;
return this; @JsonProperty("password")
} private String password = null;
/** @JsonProperty("phone")
* Get id private String phone = null;
* @return id
**/ @JsonProperty("userStatus")
@ApiModelProperty(example = "null", value = "") private Integer userStatus = null;
public Long getId() {
return id; public User id(Long id) {
} this.id = id;
return this;
public void setId(Long id) { }
this.id = id;
} /**
* Get id
public User username(String username) { * @return id
this.username = username; **/
return this; @ApiModelProperty(value = "")
} public Long getId() {
return id;
/** }
* Get username
* @return username public void setId(Long id) {
**/ this.id = id;
@ApiModelProperty(example = "null", value = "") }
public String getUsername() {
return username; public User username(String username) {
} this.username = username;
return this;
public void setUsername(String username) { }
this.username = username;
} /**
* Get username
public User firstName(String firstName) { * @return username
this.firstName = firstName; **/
return this; @ApiModelProperty(value = "")
} public String getUsername() {
return username;
/** }
* Get firstName
* @return firstName public void setUsername(String username) {
**/ this.username = username;
@ApiModelProperty(example = "null", value = "") }
public String getFirstName() {
return firstName; public User firstName(String firstName) {
} this.firstName = firstName;
return this;
public void setFirstName(String firstName) { }
this.firstName = firstName;
} /**
* Get firstName
public User lastName(String lastName) { * @return firstName
this.lastName = lastName; **/
return this; @ApiModelProperty(value = "")
} public String getFirstName() {
return firstName;
/** }
* Get lastName
* @return lastName public void setFirstName(String firstName) {
**/ this.firstName = firstName;
@ApiModelProperty(example = "null", value = "") }
public String getLastName() {
return lastName; public User lastName(String lastName) {
} this.lastName = lastName;
return this;
public void setLastName(String lastName) { }
this.lastName = lastName;
} /**
* Get lastName
public User email(String email) { * @return lastName
this.email = email; **/
return this; @ApiModelProperty(value = "")
} public String getLastName() {
return lastName;
/** }
* Get email
* @return email public void setLastName(String lastName) {
**/ this.lastName = lastName;
@ApiModelProperty(example = "null", value = "") }
public String getEmail() {
return email; public User email(String email) {
} this.email = email;
return this;
public void setEmail(String email) { }
this.email = email;
} /**
* Get email
public User password(String password) { * @return email
this.password = password; **/
return this; @ApiModelProperty(value = "")
} public String getEmail() {
return email;
/** }
* Get password
* @return password public void setEmail(String email) {
**/ this.email = email;
@ApiModelProperty(example = "null", value = "") }
public String getPassword() {
return password; public User password(String password) {
} this.password = password;
return this;
public void setPassword(String password) { }
this.password = password;
} /**
* Get password
public User phone(String phone) { * @return password
this.phone = phone; **/
return this; @ApiModelProperty(value = "")
} public String getPassword() {
return password;
/** }
* Get phone
* @return phone public void setPassword(String password) {
**/ this.password = password;
@ApiModelProperty(example = "null", value = "") }
public String getPhone() {
return phone; public User phone(String phone) {
} this.phone = phone;
return this;
public void setPhone(String phone) { }
this.phone = phone;
} /**
* Get phone
public User userStatus(Integer userStatus) { * @return phone
this.userStatus = userStatus; **/
return this; @ApiModelProperty(value = "")
} public String getPhone() {
return phone;
/** }
* User Status
* @return userStatus public void setPhone(String phone) {
**/ this.phone = phone;
@ApiModelProperty(example = "null", value = "User Status") }
public Integer getUserStatus() {
return userStatus; public User userStatus(Integer userStatus) {
} this.userStatus = userStatus;
return this;
public void setUserStatus(Integer userStatus) { }
this.userStatus = userStatus;
} /**
* User Status
* @return userStatus
@Override **/
public boolean equals(java.lang.Object o) { @ApiModelProperty(value = "User Status")
if (this == o) { public Integer getUserStatus() {
return true; return userStatus;
} }
if (o == null || getClass() != o.getClass()) {
return false; public void setUserStatus(Integer userStatus) {
} this.userStatus = userStatus;
User user = (User) o; }
return Objects.equals(this.id, user.id) &&
Objects.equals(this.username, user.username) &&
Objects.equals(this.firstName, user.firstName) && @Override
Objects.equals(this.lastName, user.lastName) && public boolean equals(java.lang.Object o) {
Objects.equals(this.email, user.email) && if (this == o) {
Objects.equals(this.password, user.password) && return true;
Objects.equals(this.phone, user.phone) && }
Objects.equals(this.userStatus, user.userStatus); if (o == null || getClass() != o.getClass()) {
} return false;
}
@Override User user = (User) o;
public int hashCode() { return Objects.equals(this.id, user.id) &&
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); Objects.equals(this.username, user.username) &&
} Objects.equals(this.firstName, user.firstName) &&
Objects.equals(this.lastName, user.lastName) &&
Objects.equals(this.email, user.email) &&
@Override Objects.equals(this.password, user.password) &&
public String toString() { Objects.equals(this.phone, user.phone) &&
StringBuilder sb = new StringBuilder(); Objects.equals(this.userStatus, user.userStatus);
sb.append("class User {\n"); }
sb.append(" id: ").append(toIndentedString(id)).append("\n"); @Override
sb.append(" username: ").append(toIndentedString(username)).append("\n"); public int hashCode() {
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
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"); @Override
sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); public String toString() {
sb.append("}"); StringBuilder sb = new StringBuilder();
return sb.toString(); sb.append("class User {\n");
}
sb.append(" id: ").append(toIndentedString(id)).append("\n");
/** sb.append(" username: ").append(toIndentedString(username)).append("\n");
* Convert the given object to string with each line indented by 4 spaces sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
* (except the first line). sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
*/ sb.append(" email: ").append(toIndentedString(email)).append("\n");
private String toIndentedString(java.lang.Object o) { sb.append(" password: ").append(toIndentedString(password)).append("\n");
if (o == null) { sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
return "null"; sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n");
} sb.append("}");
return o.toString().replace("\n", "\n "); return sb.toString();
} }
} /**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,106 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.api;
import io.swagger.client.ApiException;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for FakeApi
*/
@Ignore
public class FakeApiTest {
private final FakeApi api = new FakeApi();
/**
* To test \&quot;client\&quot; model
*
* To test \&quot;client\&quot; model
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testClientModelTest() throws ApiException {
Client body = null;
Client response = api.testClientModel(body);
// TODO: test validations
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEndpointParametersTest() throws ApiException {
BigDecimal number = null;
Double _double = null;
String patternWithoutDelimiter = null;
byte[] _byte = null;
Integer integer = null;
Integer int32 = null;
Long int64 = null;
Float _float = null;
String string = null;
byte[] binary = null;
LocalDate date = null;
DateTime dateTime = null;
String password = null;
String paramCallback = null;
api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
// TODO: test validations
}
/**
* To test enum parameters
*
* To test enum parameters
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEnumParametersTest() throws ApiException {
List<String> enumFormStringArray = null;
String enumFormString = null;
List<String> enumHeaderStringArray = null;
String enumHeaderString = null;
List<String> enumQueryStringArray = null;
String enumQueryString = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
// TODO: test validations
}
}