forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 3.4.x
This commit is contained in:
@@ -109,7 +109,8 @@ if(hasProperty('target') && target == 'android') {
|
||||
|
||||
ext {
|
||||
swagger_annotations_version = "1.5.17"
|
||||
jackson_version = "2.8.9"
|
||||
jackson_version = "2.8.11"
|
||||
jackson_databind_version = "2.8.11.2"
|
||||
jersey_version = "1.19.4"
|
||||
jodatime_version = "2.9.9"
|
||||
junit_version = "4.12"
|
||||
@@ -121,7 +122,7 @@ dependencies {
|
||||
compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
testCompile "junit:junit:$junit_version"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<version>${jackson-databind-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -110,7 +110,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<swagger-annotations-version>1.5.20</swagger-annotations-version>
|
||||
<spring-web-version>5.0.7.RELEASE</spring-web-version>
|
||||
<jackson-version>2.9.5</jackson-version>
|
||||
<jackson-version>2.8.11</jackson-version>
|
||||
<jackson-databind-version>2.8.11.2</jackson-databind-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
<reactor-version>3.1.8.RELEASE</reactor-version>
|
||||
<reactor-netty-version>0.7.8.RELEASE</reactor-netty-version>
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class ApiException extends Exception {
|
||||
private int code = 0;
|
||||
private Map<String, List<String>> responseHeaders = null;
|
||||
private String responseBody = null;
|
||||
|
||||
public ApiException() {}
|
||||
|
||||
public ApiException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
public ApiException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders, String responseBody) {
|
||||
super(message, throwable);
|
||||
this.code = code;
|
||||
this.responseHeaders = responseHeaders;
|
||||
this.responseBody = responseBody;
|
||||
}
|
||||
|
||||
public ApiException(String message, int code, Map<String, List<String>> responseHeaders, String responseBody) {
|
||||
this(message, (Throwable) null, code, responseHeaders, responseBody);
|
||||
}
|
||||
|
||||
public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) {
|
||||
this(message, throwable, code, responseHeaders, null);
|
||||
}
|
||||
|
||||
public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) {
|
||||
this((String) null, (Throwable) null, code, responseHeaders, responseBody);
|
||||
}
|
||||
|
||||
public ApiException(int code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) {
|
||||
this(code, message);
|
||||
this.responseHeaders = responseHeaders;
|
||||
this.responseBody = responseBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP status code.
|
||||
*
|
||||
* @return HTTP status code
|
||||
*/
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP response headers.
|
||||
*
|
||||
* @return A map of list of string
|
||||
*/
|
||||
public Map<String, List<String>> getResponseHeaders() {
|
||||
return responseHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP response body.
|
||||
*
|
||||
* @return Response body in the form of string
|
||||
*/
|
||||
public String getResponseBody() {
|
||||
return responseBody;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
|
||||
public class Configuration {
|
||||
private static ApiClient defaultApiClient = new ApiClient();
|
||||
|
||||
/**
|
||||
* Get the default API client, which would be used when creating API
|
||||
* instances without providing an API client.
|
||||
*
|
||||
* @return Default API client
|
||||
*/
|
||||
public static ApiClient getDefaultApiClient() {
|
||||
return defaultApiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default API client, which would be used when creating API
|
||||
* instances without providing an API client.
|
||||
*
|
||||
* @param apiClient API client
|
||||
*/
|
||||
public static void setDefaultApiClient(ApiClient apiClient) {
|
||||
defaultApiClient = apiClient;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
|
||||
public class Pair {
|
||||
private String name = "";
|
||||
private String value = "";
|
||||
|
||||
public Pair (String name, String value) {
|
||||
setName(name);
|
||||
setValue(value);
|
||||
}
|
||||
|
||||
private void setName(String name) {
|
||||
if (!isValidString(name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
private void setValue(String value) {
|
||||
if (!isValidString(value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
private boolean isValidString(String arg) {
|
||||
if (arg == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arg.trim().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -11,7 +11,6 @@ import java.time.OffsetDateTime;
|
||||
import org.openapitools.client.model.OuterComposite;
|
||||
import org.openapitools.client.model.User;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient;
|
||||
|
||||
import org.openapitools.client.model.Order;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -4,7 +4,6 @@ import org.openapitools.client.ApiClient;
|
||||
|
||||
import org.openapitools.client.model.User;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Category {
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
private String name = "default-name";
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
@@ -59,7 +59,7 @@ public class Category {
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.model.Client;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
@@ -36,12 +35,9 @@ public class AnotherFakeApiTest {
|
||||
* To test special tags
|
||||
*
|
||||
* To test special tags and operation ID starting with number
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void call123testSpecialTagsTest() throws ApiException {
|
||||
public void call123testSpecialTagsTest() {
|
||||
Client client = null;
|
||||
Client response = api.call123testSpecialTags(client).block();
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import java.math.BigDecimal;
|
||||
import org.openapitools.client.model.Client;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.FileSchemaTestClass;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.openapitools.client.model.OuterComposite;
|
||||
@@ -42,12 +42,9 @@ public class FakeApiTest {
|
||||
*
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void fakeOuterBooleanSerializeTest() throws ApiException {
|
||||
public void fakeOuterBooleanSerializeTest() {
|
||||
Boolean body = null;
|
||||
Boolean response = api.fakeOuterBooleanSerialize(body).block();
|
||||
|
||||
@@ -58,12 +55,9 @@ public class FakeApiTest {
|
||||
*
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void fakeOuterCompositeSerializeTest() throws ApiException {
|
||||
public void fakeOuterCompositeSerializeTest() {
|
||||
OuterComposite outerComposite = null;
|
||||
OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite).block();
|
||||
|
||||
@@ -74,12 +68,9 @@ public class FakeApiTest {
|
||||
*
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void fakeOuterNumberSerializeTest() throws ApiException {
|
||||
public void fakeOuterNumberSerializeTest() {
|
||||
BigDecimal body = null;
|
||||
BigDecimal response = api.fakeOuterNumberSerialize(body).block();
|
||||
|
||||
@@ -90,12 +81,9 @@ public class FakeApiTest {
|
||||
*
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void fakeOuterStringSerializeTest() throws ApiException {
|
||||
public void fakeOuterStringSerializeTest() {
|
||||
String body = null;
|
||||
String response = api.fakeOuterStringSerialize(body).block();
|
||||
|
||||
@@ -105,13 +93,23 @@ public class FakeApiTest {
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
*/
|
||||
@Test
|
||||
public void testBodyWithQueryParamsTest() throws ApiException {
|
||||
public void testBodyWithFileSchemaTest() {
|
||||
FileSchemaTestClass fileSchemaTestClass = null;
|
||||
api.testBodyWithFileSchema(fileSchemaTestClass).block();
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testBodyWithQueryParamsTest() {
|
||||
String query = null;
|
||||
User user = null;
|
||||
api.testBodyWithQueryParams(query, user).block();
|
||||
@@ -123,12 +121,9 @@ public class FakeApiTest {
|
||||
* To test \"client\" model
|
||||
*
|
||||
* To test \"client\" model
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testClientModelTest() throws ApiException {
|
||||
public void testClientModelTest() {
|
||||
Client client = null;
|
||||
Client response = api.testClientModel(client).block();
|
||||
|
||||
@@ -139,12 +134,9 @@ public class FakeApiTest {
|
||||
* 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 {
|
||||
public void testEndpointParametersTest() {
|
||||
BigDecimal number = null;
|
||||
Double _double = null;
|
||||
String patternWithoutDelimiter = null;
|
||||
@@ -168,12 +160,9 @@ public class FakeApiTest {
|
||||
* To test enum parameters
|
||||
*
|
||||
* To test enum parameters
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testEnumParametersTest() throws ApiException {
|
||||
public void testEnumParametersTest() {
|
||||
List<String> enumHeaderStringArray = null;
|
||||
String enumHeaderString = null;
|
||||
List<String> enumQueryStringArray = null;
|
||||
@@ -191,12 +180,9 @@ public class FakeApiTest {
|
||||
* test inline additionalProperties
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testInlineAdditionalPropertiesTest() throws ApiException {
|
||||
public void testInlineAdditionalPropertiesTest() {
|
||||
Map<String, String> requestBody = null;
|
||||
api.testInlineAdditionalProperties(requestBody).block();
|
||||
|
||||
@@ -207,12 +193,9 @@ public class FakeApiTest {
|
||||
* test json serialization of form data
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testJsonFormDataTest() throws ApiException {
|
||||
public void testJsonFormDataTest() {
|
||||
String param = null;
|
||||
String param2 = null;
|
||||
api.testJsonFormData(param, param2).block();
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.model.Client;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
@@ -36,12 +35,9 @@ public class FakeClassnameTags123ApiTest {
|
||||
* To test class name in snake case
|
||||
*
|
||||
* To test class name in snake case
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testClassnameTest() throws ApiException {
|
||||
public void testClassnameTest() {
|
||||
Client client = null;
|
||||
Client response = api.testClassname(client).block();
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
@@ -38,12 +37,9 @@ public class PetApiTest {
|
||||
* Add a new pet to the store
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void addPetTest() throws ApiException {
|
||||
public void addPetTest() {
|
||||
Pet pet = null;
|
||||
api.addPet(pet).block();
|
||||
|
||||
@@ -54,12 +50,9 @@ public class PetApiTest {
|
||||
* Deletes a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deletePetTest() throws ApiException {
|
||||
public void deletePetTest() {
|
||||
Long petId = null;
|
||||
String apiKey = null;
|
||||
api.deletePet(petId, apiKey).block();
|
||||
@@ -71,12 +64,9 @@ public class PetApiTest {
|
||||
* Finds Pets by status
|
||||
*
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByStatusTest() throws ApiException {
|
||||
public void findPetsByStatusTest() {
|
||||
List<String> status = null;
|
||||
List<Pet> response = api.findPetsByStatus(status).collectList().block();
|
||||
|
||||
@@ -87,12 +77,9 @@ public class PetApiTest {
|
||||
* Finds Pets by tags
|
||||
*
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByTagsTest() throws ApiException {
|
||||
public void findPetsByTagsTest() {
|
||||
List<String> tags = null;
|
||||
List<Pet> response = api.findPetsByTags(tags).collectList().block();
|
||||
|
||||
@@ -103,12 +90,9 @@ public class PetApiTest {
|
||||
* Find pet by ID
|
||||
*
|
||||
* Returns a single pet
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getPetByIdTest() throws ApiException {
|
||||
public void getPetByIdTest() {
|
||||
Long petId = null;
|
||||
Pet response = api.getPetById(petId).block();
|
||||
|
||||
@@ -119,12 +103,9 @@ public class PetApiTest {
|
||||
* Update an existing pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updatePetTest() throws ApiException {
|
||||
public void updatePetTest() {
|
||||
Pet pet = null;
|
||||
api.updatePet(pet).block();
|
||||
|
||||
@@ -135,12 +116,9 @@ public class PetApiTest {
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updatePetWithFormTest() throws ApiException {
|
||||
public void updatePetWithFormTest() {
|
||||
Long petId = null;
|
||||
String name = null;
|
||||
String status = null;
|
||||
@@ -153,12 +131,9 @@ public class PetApiTest {
|
||||
* uploads an image
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void uploadFileTest() throws ApiException {
|
||||
public void uploadFileTest() {
|
||||
Long petId = null;
|
||||
String additionalMetadata = null;
|
||||
File file = null;
|
||||
@@ -171,16 +146,13 @@ public class PetApiTest {
|
||||
* uploads an image (required)
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void uploadFileWithRequiredFileTest() throws ApiException {
|
||||
public void uploadFileWithRequiredFileTest() {
|
||||
Long petId = null;
|
||||
File file = null;
|
||||
File requiredFile = null;
|
||||
String additionalMetadata = null;
|
||||
ModelApiResponse response = api.uploadFileWithRequiredFile(petId, file, additionalMetadata).block();
|
||||
ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata).block();
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.model.Order;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
@@ -36,12 +35,9 @@ public class StoreApiTest {
|
||||
* Delete purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deleteOrderTest() throws ApiException {
|
||||
public void deleteOrderTest() {
|
||||
String orderId = null;
|
||||
api.deleteOrder(orderId).block();
|
||||
|
||||
@@ -52,12 +48,9 @@ public class StoreApiTest {
|
||||
* Returns pet inventories by status
|
||||
*
|
||||
* Returns a map of status codes to quantities
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getInventoryTest() throws ApiException {
|
||||
public void getInventoryTest() {
|
||||
Map<String, Integer> response = api.getInventory().block();
|
||||
|
||||
// TODO: test validations
|
||||
@@ -67,12 +60,9 @@ public class StoreApiTest {
|
||||
* Find purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getOrderByIdTest() throws ApiException {
|
||||
public void getOrderByIdTest() {
|
||||
Long orderId = null;
|
||||
Order response = api.getOrderById(orderId).block();
|
||||
|
||||
@@ -83,12 +73,9 @@ public class StoreApiTest {
|
||||
* Place an order for a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void placeOrderTest() throws ApiException {
|
||||
public void placeOrderTest() {
|
||||
Order order = null;
|
||||
Order response = api.placeOrder(order).block();
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
@@ -36,12 +35,9 @@ public class UserApiTest {
|
||||
* Create user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUserTest() throws ApiException {
|
||||
public void createUserTest() {
|
||||
User user = null;
|
||||
api.createUser(user).block();
|
||||
|
||||
@@ -52,12 +48,9 @@ public class UserApiTest {
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithArrayInputTest() throws ApiException {
|
||||
public void createUsersWithArrayInputTest() {
|
||||
List<User> user = null;
|
||||
api.createUsersWithArrayInput(user).block();
|
||||
|
||||
@@ -68,12 +61,9 @@ public class UserApiTest {
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithListInputTest() throws ApiException {
|
||||
public void createUsersWithListInputTest() {
|
||||
List<User> user = null;
|
||||
api.createUsersWithListInput(user).block();
|
||||
|
||||
@@ -84,12 +74,9 @@ public class UserApiTest {
|
||||
* Delete user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deleteUserTest() throws ApiException {
|
||||
public void deleteUserTest() {
|
||||
String username = null;
|
||||
api.deleteUser(username).block();
|
||||
|
||||
@@ -100,12 +87,9 @@ public class UserApiTest {
|
||||
* Get user by user name
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getUserByNameTest() throws ApiException {
|
||||
public void getUserByNameTest() {
|
||||
String username = null;
|
||||
User response = api.getUserByName(username).block();
|
||||
|
||||
@@ -116,12 +100,9 @@ public class UserApiTest {
|
||||
* Logs user into the system
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void loginUserTest() throws ApiException {
|
||||
public void loginUserTest() {
|
||||
String username = null;
|
||||
String password = null;
|
||||
String response = api.loginUser(username, password).block();
|
||||
@@ -133,12 +114,9 @@ public class UserApiTest {
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void logoutUserTest() throws ApiException {
|
||||
public void logoutUserTest() {
|
||||
api.logoutUser().block();
|
||||
|
||||
// TODO: test validations
|
||||
@@ -148,12 +126,9 @@ public class UserApiTest {
|
||||
* Updated user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updateUserTest() throws ApiException {
|
||||
public void updateUserTest() {
|
||||
String username = null;
|
||||
User user = null;
|
||||
api.updateUser(username, user).block();
|
||||
|
||||
Reference in New Issue
Block a user