Add android dependency to pom if 'parcelableModel' is set (#5801) (#5802)

* Add android dependency to pom if 'parcelableModel' is set

* Update java-okhttp-gson-parcelableModel sample
This commit is contained in:
Björn Petersen 2017-06-09 10:16:53 +02:00 committed by wing328
parent 7e98e59e53
commit e9a0d7ea83
13 changed files with 205 additions and 223 deletions

View File

@ -218,6 +218,15 @@
<version>2.2</version> <version>2.2</version>
</dependency> </dependency>
{{/performBeanValidation}} {{/performBeanValidation}}
{{#parcelableModel}}
<!-- Needed for Parcelable support-->
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
{{/parcelableModel}}
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -203,6 +203,16 @@
<version>${jodatime-version}</version> <version>${jodatime-version}</version>
</dependency> </dependency>
{{#parcelableModel}}
<!-- Needed for Parcelable support-->
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
{{/parcelableModel}}
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -260,6 +260,16 @@
</dependency> </dependency>
{{/usePlay24WS}} {{/usePlay24WS}}
{{#parcelableModel}}
<!-- Needed for Parcelable support-->
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
{{/parcelableModel}}
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -272,6 +272,17 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
{{/useBeanValidation}} {{/useBeanValidation}}
{{#parcelableModel}}
<!-- Needed for Parcelable support-->
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
{{/parcelableModel}}
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -71,22 +71,12 @@ public class FakeApiExample {
public static void main(String[] args) { public static void main(String[] args) {
FakeApi apiInstance = new FakeApi(); FakeApi apiInstance = new FakeApi();
BigDecimal number = new BigDecimal(); // BigDecimal | None Boolean body = true; // Boolean | Input boolean as post body
Double _double = 3.4D; // Double | None
String string = "string_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
byte[] binary = B; // byte[] | None
LocalDate date = new LocalDate(); // LocalDate | None
DateTime dateTime = new DateTime(); // DateTime | None
String password = "password_example"; // String | None
try { try {
apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEndpointParameters"); System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
e.printStackTrace(); e.printStackTrace();
} }
} }
@ -96,12 +86,17 @@ public class FakeApiExample {
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \&quot;client\&quot; model
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**testEnumQueryParameters**](docs/FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
@ -110,9 +105,9 @@ Class | Method | HTTP request | Description
*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image *PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID *StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status *StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID *StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet *StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user *UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array *UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
@ -132,9 +127,11 @@ Class | Method | HTTP request | Description
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md) - [ArrayTest](docs/ArrayTest.md)
- [Cat](docs/Cat.md) - [Capitalization](docs/Capitalization.md)
- [Category](docs/Category.md) - [Category](docs/Category.md)
- [Dog](docs/Dog.md) - [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md) - [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md) - [EnumTest](docs/EnumTest.md)
- [FormatTest](docs/FormatTest.md) - [FormatTest](docs/FormatTest.md)
@ -147,11 +144,15 @@ Class | Method | HTTP request | Description
- [Name](docs/Name.md) - [Name](docs/Name.md)
- [NumberOnly](docs/NumberOnly.md) - [NumberOnly](docs/NumberOnly.md)
- [Order](docs/Order.md) - [Order](docs/Order.md)
- [OuterComposite](docs/OuterComposite.md)
- [OuterEnum](docs/OuterEnum.md)
- [Pet](docs/Pet.md) - [Pet](docs/Pet.md)
- [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [SpecialModelName](docs/SpecialModelName.md) - [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md) - [Tag](docs/Tag.md)
- [User](docs/User.md) - [User](docs/User.md)
- [Cat](docs/Cat.md)
- [Dog](docs/Dog.md)
## Documentation for Authorization ## Documentation for Authorization
@ -163,6 +164,10 @@ Authentication schemes defined for the API:
- **API key parameter name**: api_key - **API key parameter name**: api_key
- **Location**: HTTP header - **Location**: HTTP header
### http_basic_test
- **Type**: HTTP basic authentication
### petstore_auth ### petstore_auth
- **Type**: OAuth - **Type**: OAuth
@ -175,7 +180,7 @@ Authentication schemes defined for the API:
## Recommendation ## Recommendation
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue. It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
## Author ## Author

View File

@ -1,52 +0,0 @@
# FakeclassnametagsApi
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testClassname**](FakeclassnametagsApi.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
<a name="testClassname"></a>
# **testClassname**
> Client testClassname(body)
To test class name in snake case
### Example
```java
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.FakeclassnametagsApi;
FakeclassnametagsApi apiInstance = new FakeclassnametagsApi();
Client body = new Client(); // Client | client model
try {
Client result = apiInstance.testClassname(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeclassnametagsApi#testClassname");
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

View File

@ -194,6 +194,13 @@
<artifactId>joda-time</artifactId> <artifactId>joda-time</artifactId>
<version>${jodatime-version}</version> <version>${jodatime-version}</version>
</dependency> </dependency>
<!-- Needed for Parcelable support-->
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -34,8 +34,6 @@ public class ProgressRequestBody extends RequestBody {
private final ProgressRequestListener progressListener; private final ProgressRequestListener progressListener;
private BufferedSink bufferedSink;
public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) { public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
this.requestBody = requestBody; this.requestBody = requestBody;
this.progressListener = progressListener; this.progressListener = progressListener;
@ -53,13 +51,9 @@ public class ProgressRequestBody extends RequestBody {
@Override @Override
public void writeTo(BufferedSink sink) throws IOException { public void writeTo(BufferedSink sink) throws IOException {
if (bufferedSink == null) { BufferedSink bufferedSink = Okio.buffer(sink(sink));
bufferedSink = Okio.buffer(sink(sink));
}
requestBody.writeTo(bufferedSink); requestBody.writeTo(bufferedSink);
bufferedSink.flush(); bufferedSink.flush();
} }
private Sink sink(Sink sink) { private Sink sink(Sink sink) {

View File

@ -1,4 +1,4 @@
/** /*
* Swagger Petstore * 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: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
@ -8,28 +8,19 @@
* 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package io.swagger.client.api; package io.swagger.client.api;
import io.swagger.client.ApiException; import io.swagger.client.ApiException;
import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal; import java.math.BigDecimal;
import io.swagger.client.model.Client;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import io.swagger.client.model.OuterComposite;
import org.junit.Test; import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -39,11 +30,92 @@ import java.util.Map;
/** /**
* API tests for FakeApi * API tests for FakeApi
*/ */
@Ignore
public class FakeApiTest { public class FakeApiTest {
private final FakeApi api = new FakeApi(); private final FakeApi api = new FakeApi();
/**
*
*
* Test serialization of outer boolean types
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void fakeOuterBooleanSerializeTest() throws ApiException {
Boolean body = null;
Boolean response = api.fakeOuterBooleanSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of object with outer number type
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void fakeOuterCompositeSerializeTest() throws ApiException {
OuterComposite body = null;
OuterComposite response = api.fakeOuterCompositeSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer number types
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void fakeOuterNumberSerializeTest() throws ApiException {
BigDecimal body = null;
BigDecimal response = api.fakeOuterNumberSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer string types
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void fakeOuterStringSerializeTest() throws ApiException {
String body = null;
String response = api.fakeOuterStringSerialize(body);
// TODO: test validations
}
/**
* 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 假端點 偽のエンドポイント 가짜 엔드 포인트
* *
@ -56,35 +128,42 @@ public class FakeApiTest {
public void testEndpointParametersTest() throws ApiException { public void testEndpointParametersTest() throws ApiException {
BigDecimal number = null; BigDecimal number = null;
Double _double = null; Double _double = null;
String string = null; String patternWithoutDelimiter = null;
byte[] _byte = null; byte[] _byte = null;
Integer integer = null; Integer integer = null;
Integer int32 = null; Integer int32 = null;
Long int64 = null; Long int64 = null;
Float _float = null; Float _float = null;
String string = null;
byte[] binary = null; byte[] binary = null;
LocalDate date = null; LocalDate date = null;
DateTime dateTime = null; DateTime dateTime = null;
String password = null; String password = null;
// api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); String paramCallback = null;
api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
// TODO: test validations // TODO: test validations
} }
/** /**
* To test enum query parameters * To test enum parameters
*
* *
* To test enum parameters
* *
* @throws ApiException * @throws ApiException
* if the Api call fails * if the Api call fails
*/ */
@Test @Test
public void testEnumQueryParametersTest() throws ApiException { 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; String enumQueryString = null;
BigDecimal enumQueryInteger = null; Integer enumQueryInteger = null;
Double enumQueryDouble = null; Double enumQueryDouble = null;
// api.testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble); api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
// TODO: test validations // TODO: test validations
} }

View File

@ -1,61 +0,0 @@
/*
* 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.client.api;
import io.swagger.client.ApiException;
import io.swagger.client.model.Client;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for FakeclassnametagsApi
*/
public class FakeclassnametagsApiTest {
private final FakeclassnametagsApi api = new FakeclassnametagsApi();
/**
* To test class name in snake case
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testClassnameTest() throws ApiException {
Client body = null;
// Client response = api.testClassname(body);
// TODO: test validations
}
}

View File

@ -1,4 +1,4 @@
/** /*
* Swagger Petstore * 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: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
@ -8,28 +8,17 @@
* 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
package io.swagger.client.api; package io.swagger.client.api;
import io.swagger.client.ApiException; import io.swagger.client.ApiException;
import io.swagger.client.model.Pet;
import java.io.File; import java.io.File;
import io.swagger.client.model.ModelApiResponse; import io.swagger.client.model.ModelApiResponse;
import io.swagger.client.model.Pet;
import org.junit.Test; import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -39,6 +28,7 @@ import java.util.Map;
/** /**
* API tests for PetApi * API tests for PetApi
*/ */
@Ignore
public class PetApiTest { public class PetApiTest {
private final PetApi api = new PetApi(); private final PetApi api = new PetApi();
@ -55,7 +45,7 @@ public class PetApiTest {
@Test @Test
public void addPetTest() throws ApiException { public void addPetTest() throws ApiException {
Pet body = null; Pet body = null;
// api.addPet(body); api.addPet(body);
// TODO: test validations // TODO: test validations
} }
@ -72,7 +62,7 @@ public class PetApiTest {
public void deletePetTest() throws ApiException { public void deletePetTest() throws ApiException {
Long petId = null; Long petId = null;
String apiKey = null; String apiKey = null;
// api.deletePet(petId, apiKey); api.deletePet(petId, apiKey);
// TODO: test validations // TODO: test validations
} }
@ -88,7 +78,7 @@ public class PetApiTest {
@Test @Test
public void findPetsByStatusTest() throws ApiException { public void findPetsByStatusTest() throws ApiException {
List<String> status = null; List<String> status = null;
// List<Pet> response = api.findPetsByStatus(status); List<Pet> response = api.findPetsByStatus(status);
// TODO: test validations // TODO: test validations
} }
@ -104,7 +94,7 @@ public class PetApiTest {
@Test @Test
public void findPetsByTagsTest() throws ApiException { public void findPetsByTagsTest() throws ApiException {
List<String> tags = null; List<String> tags = null;
// List<Pet> response = api.findPetsByTags(tags); List<Pet> response = api.findPetsByTags(tags);
// TODO: test validations // TODO: test validations
} }
@ -120,7 +110,7 @@ public class PetApiTest {
@Test @Test
public void getPetByIdTest() throws ApiException { public void getPetByIdTest() throws ApiException {
Long petId = null; Long petId = null;
// Pet response = api.getPetById(petId); Pet response = api.getPetById(petId);
// TODO: test validations // TODO: test validations
} }
@ -136,7 +126,7 @@ public class PetApiTest {
@Test @Test
public void updatePetTest() throws ApiException { public void updatePetTest() throws ApiException {
Pet body = null; Pet body = null;
// api.updatePet(body); api.updatePet(body);
// TODO: test validations // TODO: test validations
} }
@ -154,7 +144,7 @@ public class PetApiTest {
Long petId = null; Long petId = null;
String name = null; String name = null;
String status = null; String status = null;
// api.updatePetWithForm(petId, name, status); api.updatePetWithForm(petId, name, status);
// TODO: test validations // TODO: test validations
} }
@ -172,7 +162,7 @@ public class PetApiTest {
Long petId = null; Long petId = null;
String additionalMetadata = null; String additionalMetadata = null;
File file = null; File file = null;
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
// TODO: test validations // TODO: test validations
} }

View File

@ -1,4 +1,4 @@
/** /*
* Swagger Petstore * 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: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
@ -8,18 +8,6 @@
* 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
@ -28,6 +16,7 @@ package io.swagger.client.api;
import io.swagger.client.ApiException; import io.swagger.client.ApiException;
import io.swagger.client.model.Order; import io.swagger.client.model.Order;
import org.junit.Test; import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -37,6 +26,7 @@ import java.util.Map;
/** /**
* API tests for StoreApi * API tests for StoreApi
*/ */
@Ignore
public class StoreApiTest { public class StoreApiTest {
private final StoreApi api = new StoreApi(); private final StoreApi api = new StoreApi();
@ -53,7 +43,7 @@ public class StoreApiTest {
@Test @Test
public void deleteOrderTest() throws ApiException { public void deleteOrderTest() throws ApiException {
String orderId = null; String orderId = null;
// api.deleteOrder(orderId); api.deleteOrder(orderId);
// TODO: test validations // TODO: test validations
} }
@ -68,7 +58,7 @@ public class StoreApiTest {
*/ */
@Test @Test
public void getInventoryTest() throws ApiException { public void getInventoryTest() throws ApiException {
// Map<String, Integer> response = api.getInventory(); Map<String, Integer> response = api.getInventory();
// TODO: test validations // TODO: test validations
} }
@ -84,7 +74,7 @@ public class StoreApiTest {
@Test @Test
public void getOrderByIdTest() throws ApiException { public void getOrderByIdTest() throws ApiException {
Long orderId = null; Long orderId = null;
// Order response = api.getOrderById(orderId); Order response = api.getOrderById(orderId);
// TODO: test validations // TODO: test validations
} }
@ -100,7 +90,7 @@ public class StoreApiTest {
@Test @Test
public void placeOrderTest() throws ApiException { public void placeOrderTest() throws ApiException {
Order body = null; Order body = null;
// Order response = api.placeOrder(body); Order response = api.placeOrder(body);
// TODO: test validations // TODO: test validations
} }

View File

@ -1,4 +1,4 @@
/** /*
* Swagger Petstore * 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: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
@ -8,18 +8,6 @@
* 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ */
@ -28,6 +16,7 @@ package io.swagger.client.api;
import io.swagger.client.ApiException; import io.swagger.client.ApiException;
import io.swagger.client.model.User; import io.swagger.client.model.User;
import org.junit.Test; import org.junit.Test;
import org.junit.Ignore;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -37,6 +26,7 @@ import java.util.Map;
/** /**
* API tests for UserApi * API tests for UserApi
*/ */
@Ignore
public class UserApiTest { public class UserApiTest {
private final UserApi api = new UserApi(); private final UserApi api = new UserApi();
@ -53,7 +43,7 @@ public class UserApiTest {
@Test @Test
public void createUserTest() throws ApiException { public void createUserTest() throws ApiException {
User body = null; User body = null;
// api.createUser(body); api.createUser(body);
// TODO: test validations // TODO: test validations
} }
@ -69,7 +59,7 @@ public class UserApiTest {
@Test @Test
public void createUsersWithArrayInputTest() throws ApiException { public void createUsersWithArrayInputTest() throws ApiException {
List<User> body = null; List<User> body = null;
// api.createUsersWithArrayInput(body); api.createUsersWithArrayInput(body);
// TODO: test validations // TODO: test validations
} }
@ -85,7 +75,7 @@ public class UserApiTest {
@Test @Test
public void createUsersWithListInputTest() throws ApiException { public void createUsersWithListInputTest() throws ApiException {
List<User> body = null; List<User> body = null;
// api.createUsersWithListInput(body); api.createUsersWithListInput(body);
// TODO: test validations // TODO: test validations
} }
@ -101,7 +91,7 @@ public class UserApiTest {
@Test @Test
public void deleteUserTest() throws ApiException { public void deleteUserTest() throws ApiException {
String username = null; String username = null;
// api.deleteUser(username); api.deleteUser(username);
// TODO: test validations // TODO: test validations
} }
@ -117,7 +107,7 @@ public class UserApiTest {
@Test @Test
public void getUserByNameTest() throws ApiException { public void getUserByNameTest() throws ApiException {
String username = null; String username = null;
// User response = api.getUserByName(username); User response = api.getUserByName(username);
// TODO: test validations // TODO: test validations
} }
@ -134,7 +124,7 @@ public class UserApiTest {
public void loginUserTest() throws ApiException { public void loginUserTest() throws ApiException {
String username = null; String username = null;
String password = null; String password = null;
// String response = api.loginUser(username, password); String response = api.loginUser(username, password);
// TODO: test validations // TODO: test validations
} }
@ -149,7 +139,7 @@ public class UserApiTest {
*/ */
@Test @Test
public void logoutUserTest() throws ApiException { public void logoutUserTest() throws ApiException {
// api.logoutUser(); api.logoutUser();
// TODO: test validations // TODO: test validations
} }
@ -166,7 +156,7 @@ public class UserApiTest {
public void updateUserTest() throws ApiException { public void updateUserTest() throws ApiException {
String username = null; String username = null;
User body = null; User body = null;
// api.updateUser(username, body); api.updateUser(username, body);
// TODO: test validations // TODO: test validations
} }