diff --git a/bin/configs/java-resteasy.yaml b/bin/configs/java-resteasy.yaml index 16142531108..6ae01b62935 100644 --- a/bin/configs/java-resteasy.yaml +++ b/bin/configs/java-resteasy.yaml @@ -1,6 +1,6 @@ generatorName: java outputDir: samples/client/petstore/java/resteasy -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-resteasy diff --git a/bin/configs/java-resttemplate-withXml.yaml b/bin/configs/java-resttemplate-withXml.yaml index c0122422f0a..6733aab8400 100644 --- a/bin/configs/java-resttemplate-withXml.yaml +++ b/bin/configs/java-resttemplate-withXml.yaml @@ -1,7 +1,7 @@ generatorName: java outputDir: samples/client/petstore/java/resttemplate-withXml library: resttemplate -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: java8: true diff --git a/bin/configs/java-resttemplate.yaml b/bin/configs/java-resttemplate.yaml index 477b09658db..e71609cbcf3 100644 --- a/bin/configs/java-resttemplate.yaml +++ b/bin/configs/java-resttemplate.yaml @@ -1,7 +1,7 @@ generatorName: java outputDir: samples/client/petstore/java/resttemplate library: resttemplate -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-resttemplate diff --git a/bin/configs/java-vertx.yaml b/bin/configs/java-vertx.yaml index cf019b5da88..6b85e9b8fa7 100644 --- a/bin/configs/java-vertx.yaml +++ b/bin/configs/java-vertx.yaml @@ -1,7 +1,7 @@ generatorName: java outputDir: samples/client/petstore/java/vertx library: vertx -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-vertx diff --git a/samples/client/petstore/java/google-api-client/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/google-api-client/docs/AllOfWithSingleRef.md new file mode 100644 index 00000000000..4146d56a372 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | **SingleRefType** | | [optional] | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/DefaultApi.md b/samples/client/petstore/java/google-api-client/docs/DefaultApi.md new file mode 100644 index 00000000000..2c56e1f90e5 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/DefaultApi.md @@ -0,0 +1,69 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | + + + +## fooGet + +> FooGetDefaultResponse fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + FooGetDefaultResponse result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/google-api-client/docs/DeprecatedObject.md b/samples/client/petstore/java/google-api-client/docs/DeprecatedObject.md new file mode 100644 index 00000000000..48de1d62442 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/FakeBigDecimalMap200Response.md b/samples/client/petstore/java/google-api-client/docs/FakeBigDecimalMap200Response.md new file mode 100644 index 00000000000..475be1d2d73 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/FakeBigDecimalMap200Response.md @@ -0,0 +1,14 @@ + + +# FakeBigDecimalMap200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**someId** | **BigDecimal** | | [optional] | +|**someMap** | **Map<String, BigDecimal>** | | [optional] | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/Foo.md b/samples/client/petstore/java/google-api-client/docs/Foo.md new file mode 100644 index 00000000000..6b3f0556528 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/google-api-client/docs/FooGetDefaultResponse.md new file mode 100644 index 00000000000..ff3d7a3a56c --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/FooGetDefaultResponse.md @@ -0,0 +1,13 @@ + + +# FooGetDefaultResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/HealthCheckResult.md b/samples/client/petstore/java/google-api-client/docs/HealthCheckResult.md new file mode 100644 index 00000000000..4885e6f1cad --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/NullableClass.md b/samples/client/petstore/java/google-api-client/docs/NullableClass.md new file mode 100644 index 00000000000..fa98c5c6d98 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/google-api-client/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 00000000000..f1cf571f4c0 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/google-api-client/docs/OuterEnumDefaultValue.md new file mode 100644 index 00000000000..cbc7f4ba54d --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/google-api-client/docs/OuterEnumInteger.md b/samples/client/petstore/java/google-api-client/docs/OuterEnumInteger.md new file mode 100644 index 00000000000..f71dea30ad0 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/google-api-client/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/google-api-client/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 00000000000..99e6389f427 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/google-api-client/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/google-api-client/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 00000000000..0fafaaa2715 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,13 @@ + + +# OuterObjectWithEnumProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | + + + diff --git a/samples/client/petstore/java/google-api-client/docs/SingleRefType.md b/samples/client/petstore/java/google-api-client/docs/SingleRefType.md new file mode 100644 index 00000000000..cc269bb871f --- /dev/null +++ b/samples/client/petstore/java/google-api-client/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 00000000000..a271e8a086b --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,108 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.FooGetDefaultResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.google.api.client.http.EmptyContent; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.json.Json; + +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private ApiClient apiClient; + + public DefaultApi() { + this(new ApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + *

0 - response + * @return FooGetDefaultResponse + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public FooGetDefaultResponse fooGet() throws IOException { + HttpResponse response = fooGetForHttpResponse(); + TypeReference typeRef = new TypeReference() {}; + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + /** + *

0 - response + * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. + * @return FooGetDefaultResponse + * @throws IOException if an error occurs while attempting to invoke the API + **/ + public FooGetDefaultResponse fooGet(Map params) throws IOException { + HttpResponse response = fooGetForHttpResponse(params); + TypeReference typeRef = new TypeReference() {}; + return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); + } + + public HttpResponse fooGetForHttpResponse() throws IOException { + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/foo"); + + String localVarUrl = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(localVarUrl); + + HttpContent content = null; + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); + } + + public HttpResponse fooGetForHttpResponse(Map params) throws IOException { + + UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/foo"); + + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); + + for (Map.Entry entry: allParams.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + if (key != null && value != null) { + if (value instanceof Collection) { + uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray()); + } else if (value instanceof Object[]) { + uriBuilder = uriBuilder.queryParam(key, (Object[]) value); + } else { + uriBuilder = uriBuilder.queryParam(key, value); + } + } + } + + String localVarUrl = uriBuilder.build().toString(); + GenericUrl genericUrl = new GenericUrl(localVarUrl); + + HttpContent content = null; + return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); + } + + +} diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 00000000000..ff55e37f2d7 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,136 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private SingleRefType singleRefType; + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SingleRefType getSingleRefType() { + return singleRefType; + } + + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 00000000000..73cccb0d2d3 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java new file mode 100644 index 00000000000..1a6fbe6cb37 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FakeBigDecimalMap200Response + */ +@JsonPropertyOrder({ + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_ID, + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_MAP +}) +@JsonTypeName("fakeBigDecimalMap_200_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FakeBigDecimalMap200Response { + public static final String JSON_PROPERTY_SOME_ID = "someId"; + private BigDecimal someId; + + public static final String JSON_PROPERTY_SOME_MAP = "someMap"; + private Map someMap = new HashMap<>(); + + public FakeBigDecimalMap200Response() { + } + + public FakeBigDecimalMap200Response someId(BigDecimal someId) { + + this.someId = someId; + return this; + } + + /** + * Get someId + * @return someId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getSomeId() { + return someId; + } + + + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSomeId(BigDecimal someId) { + this.someId = someId; + } + + + public FakeBigDecimalMap200Response someMap(Map someMap) { + + this.someMap = someMap; + return this; + } + + public FakeBigDecimalMap200Response putSomeMapItem(String key, BigDecimal someMapItem) { + if (this.someMap == null) { + this.someMap = new HashMap<>(); + } + this.someMap.put(key, someMapItem); + return this; + } + + /** + * Get someMap + * @return someMap + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getSomeMap() { + return someMap; + } + + + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSomeMap(Map someMap) { + this.someMap = someMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o; + return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) && + Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap); + } + + @Override + public int hashCode() { + return Objects.hash(someId, someMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FakeBigDecimalMap200Response {\n"); + sb.append(" someId: ").append(toIndentedString(someId)).append("\n"); + sb.append(" someMap: ").append(toIndentedString(someMap)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 00000000000..0ae068735bd --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,103 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBar(String bar) { + this.bar = bar; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java new file mode 100644 index 00000000000..0626a5810e6 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FooGetDefaultResponse + */ +@JsonPropertyOrder({ + FooGetDefaultResponse.JSON_PROPERTY_STRING +}) +@JsonTypeName("_foo_get_default_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FooGetDefaultResponse { + public static final String JSON_PROPERTY_STRING = "string"; + private Foo string; + + public FooGetDefaultResponse() { + } + + public FooGetDefaultResponse string(Foo string) { + + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(Foo string) { + this.string = string; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; + return Objects.equals(this.string, fooGetDefaultResponse.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooGetDefaultResponse {\n"); + sb.append(" string: ").append(toIndentedString(string)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 00000000000..b156198397f --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,126 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 00000000000..44ae6b98f11 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,625 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullableClass extends HashMap { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + private List arrayItemsNullable; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + private Map objectItemsNullable = new HashMap<>(); + + public NullableClass() { + + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 00000000000..1a3e502685b --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,218 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + private List bars; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBars(List bars) { + this.bars = bars; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 00000000000..73077cc8c31 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 00000000000..e6c2e38c2e7 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 00000000000..ef61373b187 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java new file mode 100644 index 00000000000..0b8b5f66164 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.OuterEnumInteger; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * OuterObjectWithEnumProperty + */ +@JsonPropertyOrder({ + OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OuterObjectWithEnumProperty { + public static final String JSON_PROPERTY_VALUE = "value"; + private OuterEnumInteger value; + + public OuterObjectWithEnumProperty() { + } + + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { + + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OuterEnumInteger getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(OuterEnumInteger value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; + return Objects.equals(this.value, outerObjectWithEnumProperty.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterObjectWithEnumProperty {\n"); + sb.append(" value: ").append(toIndentedString(value)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 00000000000..f9922454755 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index baebe15ab21..a6bcac74ff4 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,13 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; +import java.util.UUID; import org.junit.Test; import org.junit.Ignore; import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -42,8 +45,9 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() throws IOException { - Client client = null; - Client response = api.call123testSpecialTags(client); + UUID uuidTest = null; + Client body = null; + Client response = api.call123testSpecialTags(uuidTest, body); // TODO: test validations } diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/FakeApiTest.java index b897e6b1db9..01fda5aac29 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -21,10 +21,13 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; +import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -39,6 +42,22 @@ public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * creates an XmlItem + * + * this route creates an XmlItem + * + * @throws IOException + * if the Api call fails + */ + @Test + public void createXmlItemTest() throws IOException { + XmlItem xmlItem = null; + api.createXmlItem(xmlItem); + + // TODO: test validations + } + /** * * @@ -65,8 +84,8 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() throws IOException { - OuterComposite outerComposite = null; - OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); + OuterComposite body = null; + OuterComposite response = api.fakeOuterCompositeSerialize(body); // TODO: test validations } @@ -113,8 +132,8 @@ public class FakeApiTest { */ @Test public void testBodyWithFileSchemaTest() throws IOException { - FileSchemaTestClass fileSchemaTestClass = null; - api.testBodyWithFileSchema(fileSchemaTestClass); + FileSchemaTestClass body = null; + api.testBodyWithFileSchema(body); // TODO: test validations } @@ -130,8 +149,8 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() throws IOException { String query = null; - User user = null; - api.testBodyWithQueryParams(query, user); + User body = null; + api.testBodyWithQueryParams(query, body); // TODO: test validations } @@ -146,16 +165,16 @@ public class FakeApiTest { */ @Test public void testClientModelTest() throws IOException { - Client client = null; - Client response = api.testClientModel(client); + Client body = null; + Client response = api.testClientModel(body); // TODO: test validations } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws IOException * if the Api call fails @@ -235,8 +254,8 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() throws IOException { - Map requestBody = null; - api.testInlineAdditionalProperties(requestBody); + Map param = null; + api.testInlineAdditionalProperties(param); // TODO: test validations } @@ -258,4 +277,24 @@ public class FakeApiTest { // TODO: test validations } + /** + * + * + * To test the collection format in query parameters + * + * @throws IOException + * if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() throws IOException { + List pipe = null; + List ioutil = null; + List http = null; + List url = null; + List context = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + + // TODO: test validations + } + } diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 0150a3d7659..7336706db7c 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,6 +18,8 @@ import org.junit.Test; import org.junit.Ignore; import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -42,8 +44,8 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() throws IOException { - Client client = null; - Client response = api.testClassname(client); + Client body = null; + Client response = api.testClassname(body); // TODO: test validations } diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/PetApiTest.java index 16ff70db5ae..ee0ecc7df51 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,15 +16,17 @@ package org.openapitools.client.api; import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; +import java.util.Set; import org.junit.Test; import org.junit.Ignore; import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; /** * API tests for PetApi @@ -45,8 +47,8 @@ public class PetApiTest { */ @Test public void addPetTest() throws IOException { - Pet pet = null; - api.addPet(pet); + Pet body = null; + api.addPet(body); // TODO: test validations } @@ -126,8 +128,8 @@ public class PetApiTest { */ @Test public void updatePetTest() throws IOException { - Pet pet = null; - api.updatePet(pet); + Pet body = null; + api.updatePet(body); // TODO: test validations } @@ -162,8 +164,26 @@ public class PetApiTest { public void uploadFileTest() throws IOException { Long petId = null; String additionalMetadata = null; - File file = null; - ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + File _file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); + + // TODO: test validations + } + + /** + * uploads an image (required) + * + * + * + * @throws IOException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() throws IOException { + Long petId = null; + File requiredFile = null; + String additionalMetadata = null; + ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); // TODO: test validations } diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/StoreApiTest.java index fd77cfec629..8f769519c2d 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,6 +18,8 @@ import org.junit.Test; import org.junit.Ignore; import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -89,8 +91,8 @@ public class StoreApiTest { */ @Test public void placeOrderTest() throws IOException { - Order order = null; - Order response = api.placeOrder(order); + Order body = null; + Order response = api.placeOrder(body); // TODO: test validations } diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/UserApiTest.java index c817ff89bca..6035fe4cb18 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,14 @@ package org.openapitools.client.api; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -42,8 +45,8 @@ public class UserApiTest { */ @Test public void createUserTest() throws IOException { - User user = null; - api.createUser(user); + User body = null; + api.createUser(body); // TODO: test validations } @@ -58,8 +61,8 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() throws IOException { - List user = null; - api.createUsersWithArrayInput(user); + List body = null; + api.createUsersWithArrayInput(body); // TODO: test validations } @@ -74,8 +77,8 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() throws IOException { - List user = null; - api.createUsersWithListInput(user); + List body = null; + api.createUsersWithListInput(body); // TODO: test validations } @@ -155,8 +158,8 @@ public class UserApiTest { @Test public void updateUserTest() throws IOException { String username = null; - User user = null; - api.updateUser(username, user); + User body = null; + api.updateUser(username, body); // TODO: test validations } diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 4f6fd800ab7..2a18763af1c 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesAnyType */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index 41e6497ecee..b38283c127c 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -25,7 +25,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesArray */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index d2e17831ba7..c2e520f94bc 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesBoolean */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 14fd8022feb..6f1b83dce1a 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesClass */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index 58b7521c6a7..5ba29819117 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesInteger */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index 10ad938f52c..bb7004745ab 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -25,7 +25,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesNumber */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index bcbb9c54b27..df3fb067d74 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesObject */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index f7662d6c469..3e24921e49f 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesString */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AnimalTest.java index 930e5c17d07..da5609b5489 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,14 +21,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.Cat; -import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Animal */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 57a1c4f37ec..cbc199f1575 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 4f127b838bc..762f9d6dc33 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 5874400602c..20dc34a8c51 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayTest */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CapitalizationTest.java index c69ffc12a07..4fd3728ab89 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Capitalization */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CatTest.java index 90fdba14c24..d591bdd30ef 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CatTest.java @@ -22,12 +22,10 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Cat */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CategoryTest.java index 393f73bd5e6..12de38c0c08 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Category */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ClassModelTest.java index 5005bcb800e..d1936d85e81 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ClassModel */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ClientTest.java index bda3b360b74..7aa0f5859ff 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ClientTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Client */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/DogTest.java index de77d6711bd..744c8a406fe 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/DogTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Dog */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 73206626b9c..694e4196138 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -19,12 +19,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumArrays */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd..3f50e1bfb9e 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumClass */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumTestTest.java index 8907cfa8e8f..b8d3359c906 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumTest */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index 493d84aa1bc..fb8827a1e88 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ModelFile; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FileSchemaTestClass */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/FormatTestTest.java index 48bec93d994..058a8ad7d43 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FormatTest */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index da9073d4500..bf777b061cc 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for HasOnlyReadOnly */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/MapTestTest.java index 22c8519472b..50e909f0381 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MapTest */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index f29932e96be..b16858dc17e 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 0cd3f976198..dd90f6799d3 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Model200Response */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index be8cca35e3e..e63f2ae5e9c 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelApiResponse */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelFileTest.java index a0247ae71be..264249edc1c 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelFile */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelListTest.java index 0ead99db3a5..81fd2dcc6a6 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelList */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b6ca02f8d23..5840d4f8f0c 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelReturn */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/NameTest.java index 07684c9eb40..9280c171539 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/NameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Name */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 878095093ad..63b5bc0440e 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for NumberOnly */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OrderTest.java index f31e10a9df1..e0fbb529af6 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OrderTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Order */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 8b823572e5e..840cf65c8d0 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterComposite */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf..b312b11a09e 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterEnum */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/PetTest.java index b48657d0c9a..ca23198fbf1 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/PetTest.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -29,7 +30,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Pet */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index 26356ec2048..b356d6993c5 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ReadOnlyFirst */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 4e59989875a..8eb0b1bd269 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for SpecialModelName */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TagTest.java index 5aeb2f3f948..6dc0868167c 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TagTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Tag */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index 8c096c188fc..2e3312e5f38 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for TypeHolderDefault */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index b1655df6165..5df1bbd3d5b 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for TypeHolderExample */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/UserTest.java index e0153a4cf1b..b029d279409 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/UserTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for User */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/XmlItemTest.java index 4bab95a9126..e7b49511c93 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for XmlItem */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/ApiClientTest.java deleted file mode 100644 index dadb65fa1c5..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/ApiClientTest.java +++ /dev/null @@ -1,291 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.auth.*; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class ApiClientTest { - ApiClient apiClient = null; - - @Before - public void setup() { - apiClient = new ApiClient(); - } - - @Test - public void testParseAndFormatDate() { - // default date format - String dateStr = "2015-11-07T03:49:09.356+00:00"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T05:49:09.356+02:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00"))); - - // custom date format: without milli-seconds, custom time zone - DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT); - format.setTimeZone(TimeZone.getTimeZone("GMT+10")); - apiClient.setDateFormat(format); - dateStr = "2015-11-07T13:49:09+10:00"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T00:49:09-03:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T13:49:09+10:00"))); - } - - @Test - public void testIsJsonMime() { - assertFalse(apiClient.isJsonMime(null)); - assertFalse(apiClient.isJsonMime("")); - assertFalse(apiClient.isJsonMime("text/plain")); - assertFalse(apiClient.isJsonMime("application/xml")); - assertFalse(apiClient.isJsonMime("application/jsonp")); - assertFalse(apiClient.isJsonMime("example/json")); - assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx")); - assertFalse(apiClient.isJsonMime("example/foo+bar+xjson")); - - assertTrue(apiClient.isJsonMime("application/json")); - assertTrue(apiClient.isJsonMime("application/json; charset=UTF8")); - assertTrue(apiClient.isJsonMime("APPLICATION/JSON")); - - assertTrue(apiClient.isJsonMime("application/problem+json")); - assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON")); - assertTrue(apiClient.isJsonMime("application/json\t")); - assertTrue(apiClient.isJsonMime("example/foo+bar+json")); - assertTrue(apiClient.isJsonMime("example/foo+json;x;y")); - assertTrue(apiClient.isJsonMime("example/foo+json\t;")); - assertTrue(apiClient.isJsonMime("Example/fOO+JSON")); - } - - @Test - public void testSelectHeaderAccept() { - String[] accepts = {"application/json", "application/xml"}; - assertEquals("application/json", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"}; - assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"text/plain", "application/xml"}; - assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{}; - assertNull(apiClient.selectHeaderAccept(accepts)); - } - - @Test - public void testSelectHeaderContentType() { - String[] contentTypes = {"application/json", "application/xml"}; - assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"}; - assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"text/plain", "application/xml"}; - assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{}; - assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - } - - @Test - public void testGetAuthentications() { - Map auths = apiClient.getAuthentications(); - - Authentication auth = auths.get("api_key"); - assertNotNull(auth); - assertTrue(auth instanceof ApiKeyAuth); - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth; - assertEquals("header", apiKeyAuth.getLocation()); - assertEquals("api_key", apiKeyAuth.getParamName()); - - auth = auths.get("petstore_auth"); - assertTrue(auth instanceof OAuth); - assertSame(auth, apiClient.getAuthentication("petstore_auth")); - - assertNull(auths.get("unknown")); - - try { - auths.put("my_auth", new HttpBasicAuth()); - fail("the authentications returned should not be modifiable"); - } catch (UnsupportedOperationException e) { - } - } - - @Test - public void testSetUsernameAndPassword() { - HttpBasicAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof HttpBasicAuth) { - auth = (HttpBasicAuth) _auth; - break; - } - } - auth.setUsername(null); - auth.setPassword(null); - - apiClient.setUsername("my-username"); - apiClient.setPassword("my-password"); - assertEquals("my-username", auth.getUsername()); - assertEquals("my-password", auth.getPassword()); - - // reset values - auth.setUsername(null); - auth.setPassword(null); - } - - @Test - public void testSetApiKeyAndPrefix() { - ApiKeyAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof ApiKeyAuth) { - auth = (ApiKeyAuth) _auth; - break; - } - } - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - - apiClient.setApiKey("my-api-key"); - apiClient.setApiKeyPrefix("Token"); - assertEquals("my-api-key", auth.getApiKey()); - assertEquals("Token", auth.getApiKeyPrefix()); - - // reset values - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - } - - @Test - public void testParameterToPairWhenNameIsInvalid() throws Exception { - List pairs_a = apiClient.parameterToPair(null, new Integer(1)); - List pairs_b = apiClient.parameterToPair("", new Integer(1)); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToPairWhenValueIsNull() throws Exception { - List pairs = apiClient.parameterToPair("param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToPairWhenValueIsEmptyString() throws Exception { - // single empty string - List pairs = apiClient.parameterToPair("param-a", " "); - assertEquals(1, pairs.size()); - } - - @Test - public void testParameterToPairWhenValueIsNotCollection() throws Exception { - String name = "param-a"; - Integer value = 1; - - List pairs = apiClient.parameterToPair(name, value); - - assertEquals(1, pairs.size()); - assertEquals(value, Integer.valueOf(pairs.get(0).getValue())); - } - - @Test - public void testParameterToPairWhenValueIsCollection() throws Exception { - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - List pairs = apiClient.parameterToPair("param-a", values); - assertEquals(0, pairs.size()); - } - - @Test - public void testParameterToPairsWhenNameIsInvalid() throws Exception { - List objects = new ArrayList(); - objects.add(new Integer(1)); - - List pairs_a = apiClient.parameterToPairs("csv", null, objects); - List pairs_b = apiClient.parameterToPairs("csv", "", objects); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToPairsWhenValueIsNull() throws Exception { - List pairs = apiClient.parameterToPairs("csv", "param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToPairsWhenValueIsEmptyStrings() throws Exception { - // list of empty strings - List strs = new ArrayList(); - strs.add(" "); - strs.add(" "); - strs.add(" "); - - List concatStrings = apiClient.parameterToPairs("csv", "param-a", strs); - - assertEquals(1, concatStrings.size()); - assertFalse(concatStrings.get(0).getValue().isEmpty()); // should contain some delimiters - } - - @Test - public void testParameterToPairsWhenValueIsCollection() throws Exception { - Map collectionFormatMap = new HashMap(); - collectionFormatMap.put("csv", ","); - collectionFormatMap.put("tsv", "\t"); - collectionFormatMap.put("ssv", " "); - collectionFormatMap.put("pipes", "|"); - collectionFormatMap.put("", ","); // no format, must default to csv - collectionFormatMap.put("unknown", ","); // all other formats, must default to csv - - String name = "param-a"; - - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - // check for multi separately - List multiPairs = apiClient.parameterToPairs("multi", name, values); - assertEquals(values.size(), multiPairs.size()); - for (int i = 0; i < values.size(); i++) { - assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), multiPairs.get(i).getValue()); - } - - // all other formats - for (String collectionFormat : collectionFormatMap.keySet()) { - List pairs = apiClient.parameterToPairs(collectionFormat, name, values); - - assertEquals(1, pairs.size()); - - String delimiter = collectionFormatMap.get(collectionFormat); - if (!delimiter.equals(",")) { - // commas are not escaped because they are reserved characters in URIs - delimiter = apiClient.escapeString(delimiter); - } - String[] pairValueSplit = pairs.get(0).getValue().split(delimiter); - - // must equal input values - assertEquals(values.size(), pairValueSplit.length); - for (int i = 0; i < values.size(); i++) { - assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), pairValueSplit[i]); - } - } - } -} diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/ConfigurationTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/ConfigurationTest.java deleted file mode 100644 index f05c230dc75..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/ConfigurationTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.openapitools.client; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class ConfigurationTest { - @Test - public void testDefaultApiClient() { - ApiClient apiClient = Configuration.getDefaultApiClient(); - assertNotNull(apiClient); - assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath()); - assertFalse(apiClient.isDebugging()); - } -} diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/StringUtilTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/StringUtilTest.java deleted file mode 100644 index aa7c81759ec..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/StringUtilTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.openapitools.client; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class StringUtilTest { - @Test - public void testContainsIgnoreCase() { - assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "abc")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "ABC")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{"ABC"}, "abc")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, "ABC")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, null)); - - assertFalse(StringUtil.containsIgnoreCase(new String[]{"abc"}, "def")); - assertFalse(StringUtil.containsIgnoreCase(new String[]{}, "ABC")); - assertFalse(StringUtil.containsIgnoreCase(new String[]{}, null)); - } - - @Test - public void testJoin() { - String[] array = {"aa", "bb", "cc"}; - assertEquals("aa,bb,cc", StringUtil.join(array, ",")); - assertEquals("aa, bb, cc", StringUtil.join(array, ", ")); - assertEquals("aabbcc", StringUtil.join(array, "")); - assertEquals("aa bb cc", StringUtil.join(array, " ")); - assertEquals("aa\nbb\ncc", StringUtil.join(array, "\n")); - - assertEquals("", StringUtil.join(new String[]{}, ",")); - assertEquals("abc", StringUtil.join(new String[]{"abc"}, ",")); - } -} diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index b6db8d2a2c3..f0a26f1bb84 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,9 +15,13 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; +import java.util.UUID; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,12 +30,10 @@ import java.util.Map; /** * API tests for AnotherFakeApi */ -@Ignore public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); - /** * To test special tags * @@ -42,10 +44,13 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() throws ApiException { - Client client = null; - Client response = api.call123testSpecialTags(client); + // + //UUID uuidTest = null; + // + //Client body = null; + // + //Client response = api.call123testSpecialTags(uuidTest, body); // TODO: test validations } - } diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeApiTest.java index 829f59265b5..0e1192da97c 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,10 +18,14 @@ 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; import org.openapitools.client.model.User; +import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; import java.time.LocalDate; import java.time.OffsetDateTime; @@ -33,15 +37,28 @@ import java.util.Map; /** * API tests for FakeApi */ -@Ignore public class FakeApiTest { private final FakeApi api = new FakeApi(); - /** - * + * creates an XmlItem * + * this route creates an XmlItem + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createXmlItemTest() throws ApiException { + // + //XmlItem xmlItem = null; + // + //api.createXmlItem(xmlItem); + + // TODO: test validations + } + /** * Test serialization of outer boolean types * * @throws ApiException @@ -49,15 +66,14 @@ public class FakeApiTest { */ @Test public void fakeOuterBooleanSerializeTest() throws ApiException { - Boolean body = null; - Boolean response = api.fakeOuterBooleanSerialize(body); + // + //Boolean body = null; + // + //Boolean response = api.fakeOuterBooleanSerialize(body); // TODO: test validations } - /** - * - * * Test serialization of object with outer number type * * @throws ApiException @@ -65,15 +81,14 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { - OuterComposite outerComposite = null; - OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); + // + //OuterComposite body = null; + // + //OuterComposite response = api.fakeOuterCompositeSerialize(body); // TODO: test validations } - /** - * - * * Test serialization of outer number types * * @throws ApiException @@ -81,15 +96,14 @@ public class FakeApiTest { */ @Test public void fakeOuterNumberSerializeTest() throws ApiException { - BigDecimal body = null; - BigDecimal response = api.fakeOuterNumberSerialize(body); + // + //BigDecimal body = null; + // + //BigDecimal response = api.fakeOuterNumberSerialize(body); // TODO: test validations } - /** - * - * * Test serialization of outer string types * * @throws ApiException @@ -97,15 +111,14 @@ public class FakeApiTest { */ @Test public void fakeOuterStringSerializeTest() throws ApiException { - String body = null; - String response = api.fakeOuterStringSerialize(body); + // + //String body = null; + // + //String response = api.fakeOuterStringSerialize(body); // TODO: test validations } - /** - * - * * For this test, the body for this request much reference a schema named `File`. * * @throws ApiException @@ -113,29 +126,28 @@ public class FakeApiTest { */ @Test public void testBodyWithFileSchemaTest() throws ApiException { - FileSchemaTestClass fileSchemaTestClass = null; - api.testBodyWithFileSchema(fileSchemaTestClass); + // + //FileSchemaTestClass body = null; + // + //api.testBodyWithFileSchema(body); // TODO: test validations } - /** - * - * - * - * * @throws ApiException * if the Api call fails */ @Test public void testBodyWithQueryParamsTest() throws ApiException { - String query = null; - User user = null; - api.testBodyWithQueryParams(query, user); + // + //String query = null; + // + //User body = null; + // + //api.testBodyWithQueryParams(query, body); // TODO: test validations } - /** * To test \"client\" model * @@ -146,41 +158,56 @@ public class FakeApiTest { */ @Test public void testClientModelTest() throws ApiException { - Client client = null; - Client response = api.testClientModel(client); + // + //Client body = null; + // + //Client response = api.testClientModel(body); // TODO: test validations } - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * 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; - File binary = null; - LocalDate date = null; - OffsetDateTime dateTime = null; - String password = null; - String paramCallback = null; - api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + // + //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; + // + //File binary = null; + // + //LocalDate date = null; + // + //OffsetDateTime 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 * @@ -191,19 +218,27 @@ public class FakeApiTest { */ @Test public void testEnumParametersTest() throws ApiException { - List enumHeaderStringArray = null; - String enumHeaderString = null; - List enumQueryStringArray = null; - String enumQueryString = null; - Integer enumQueryInteger = null; - Double enumQueryDouble = null; - List enumFormStringArray = null; - String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + // + //List enumHeaderStringArray = null; + // + //String enumHeaderString = null; + // + //List enumQueryStringArray = null; + // + //String enumQueryString = null; + // + //Integer enumQueryInteger = null; + // + //Double enumQueryDouble = null; + // + //List enumFormStringArray = null; + // + //String enumFormString = null; + // + //api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); // TODO: test validations } - /** * Fake endpoint to test group parameters (optional) * @@ -214,48 +249,76 @@ public class FakeApiTest { */ @Test public void testGroupParametersTest() throws ApiException { - Integer requiredStringGroup = null; - Boolean requiredBooleanGroup = null; - Long requiredInt64Group = null; - Integer stringGroup = null; - Boolean booleanGroup = null; - Long int64Group = null; - api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + // + //Integer requiredStringGroup = null; + // + //Boolean requiredBooleanGroup = null; + // + //Long requiredInt64Group = null; + // + //Integer stringGroup = null; + // + //Boolean booleanGroup = null; + // + //Long int64Group = null; + // + //api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); // TODO: test validations } - /** * test inline additionalProperties * - * - * * @throws ApiException * if the Api call fails */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { - Map requestBody = null; - api.testInlineAdditionalProperties(requestBody); + // + //Map param = null; + // + //api.testInlineAdditionalProperties(param); // TODO: test validations } - /** * test json serialization of form data * - * - * * @throws ApiException * if the Api call fails */ @Test public void testJsonFormDataTest() throws ApiException { - String param = null; - String param2 = null; - api.testJsonFormData(param, param2); + // + //String param = null; + // + //String param2 = null; + // + //api.testJsonFormData(param, param2); + + // TODO: test validations + } + /** + * To test the collection format in query parameters + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() throws ApiException { + // + //List pipe = null; + // + //List ioutil = null; + // + //List http = null; + // + //List url = null; + // + //List context = null; + // + //api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); // TODO: test validations } - } diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index e2ac28cb12a..27877d35cb9 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,10 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,12 +29,10 @@ import java.util.Map; /** * API tests for FakeClassnameTags123Api */ -@Ignore public class FakeClassnameTags123ApiTest { private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); - /** * To test class name in snake case * @@ -42,10 +43,11 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() throws ApiException { - Client client = null; - Client response = api.testClassname(client); + // + //Client body = null; + // + //Client response = api.testClassname(body); // TODO: test validations } - } diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/PetApiTest.java index 5f67e0d3b78..e0af7cc727a 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,57 +17,57 @@ import org.openapitools.client.ApiException; import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; +import java.util.Set; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; /** * API tests for PetApi */ -@Ignore public class PetApiTest { private final PetApi api = new PetApi(); - /** * Add a new pet to the store * - * - * * @throws ApiException * if the Api call fails */ @Test public void addPetTest() throws ApiException { - Pet pet = null; - api.addPet(pet); + // + //Pet body = null; + // + //api.addPet(body); // TODO: test validations } - /** * Deletes a pet * - * - * * @throws ApiException * if the Api call fails */ @Test public void deletePetTest() throws ApiException { - Long petId = null; - String apiKey = null; - api.deletePet(petId, apiKey); + // + //Long petId = null; + // + //String apiKey = null; + // + //api.deletePet(petId, apiKey); // TODO: test validations } - /** * Finds Pets by status * @@ -78,12 +78,13 @@ public class PetApiTest { */ @Test public void findPetsByStatusTest() throws ApiException { - List status = null; - List response = api.findPetsByStatus(status); + // + //List status = null; + // + //List response = api.findPetsByStatus(status); // TODO: test validations } - /** * Finds Pets by tags * @@ -94,12 +95,13 @@ public class PetApiTest { */ @Test public void findPetsByTagsTest() throws ApiException { - Set tags = null; - Set response = api.findPetsByTags(tags); + // + //Set tags = null; + // + //Set response = api.findPetsByTags(tags); // TODO: test validations } - /** * Find pet by ID * @@ -110,62 +112,83 @@ public class PetApiTest { */ @Test public void getPetByIdTest() throws ApiException { - Long petId = null; - Pet response = api.getPetById(petId); + // + //Long petId = null; + // + //Pet response = api.getPetById(petId); // TODO: test validations } - /** * Update an existing pet * - * - * * @throws ApiException * if the Api call fails */ @Test public void updatePetTest() throws ApiException { - Pet pet = null; - api.updatePet(pet); + // + //Pet body = null; + // + //api.updatePet(body); // TODO: test validations } - /** * Updates a pet in the store with form data * - * - * * @throws ApiException * if the Api call fails */ @Test public void updatePetWithFormTest() throws ApiException { - Long petId = null; - String name = null; - String status = null; - api.updatePetWithForm(petId, name, status); + // + //Long petId = null; + // + //String name = null; + // + //String status = null; + // + //api.updatePetWithForm(petId, name, status); // TODO: test validations } - /** * uploads an image * - * - * * @throws ApiException * if the Api call fails */ @Test public void uploadFileTest() throws ApiException { - Long petId = null; - String additionalMetadata = null; - File file = null; - ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + // + //Long petId = null; + // + //String additionalMetadata = null; + // + //File _file = null; + // + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); + + // TODO: test validations + } + /** + * uploads an image (required) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() throws ApiException { + // + //Long petId = null; + // + //File requiredFile = null; + // + //String additionalMetadata = null; + // + //ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); // TODO: test validations } - } diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/StoreApiTest.java index a43d64debf1..ba309555b38 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,10 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Order; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,12 +29,10 @@ import java.util.Map; /** * API tests for StoreApi */ -@Ignore public class StoreApiTest { private final StoreApi api = new StoreApi(); - /** * Delete purchase order by ID * @@ -42,12 +43,13 @@ public class StoreApiTest { */ @Test public void deleteOrderTest() throws ApiException { - String orderId = null; - api.deleteOrder(orderId); + // + //String orderId = null; + // + //api.deleteOrder(orderId); // TODO: test validations } - /** * Returns pet inventories by status * @@ -58,11 +60,11 @@ public class StoreApiTest { */ @Test public void getInventoryTest() throws ApiException { - Map response = api.getInventory(); + // + //Map response = api.getInventory(); // TODO: test validations } - /** * Find purchase order by ID * @@ -73,26 +75,26 @@ public class StoreApiTest { */ @Test public void getOrderByIdTest() throws ApiException { - Long orderId = null; - Order response = api.getOrderById(orderId); + // + //Long orderId = null; + // + //Order response = api.getOrderById(orderId); // TODO: test validations } - /** * Place an order for a pet * - * - * * @throws ApiException * if the Api call fails */ @Test public void placeOrderTest() throws ApiException { - Order order = null; - Order response = api.placeOrder(order); + // + //Order body = null; + // + //Order response = api.placeOrder(body); // TODO: test validations } - } diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/UserApiTest.java index 79e0b6b2bb5..aa1403a05ae 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,14 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,12 +30,10 @@ import java.util.Map; /** * API tests for UserApi */ -@Ignore public class UserApiTest { private final UserApi api = new UserApi(); - /** * Create user * @@ -42,44 +44,43 @@ public class UserApiTest { */ @Test public void createUserTest() throws ApiException { - User user = null; - api.createUser(user); + // + //User body = null; + // + //api.createUser(body); // TODO: test validations } - /** * Creates list of users with given input array * - * - * * @throws ApiException * if the Api call fails */ @Test public void createUsersWithArrayInputTest() throws ApiException { - List user = null; - api.createUsersWithArrayInput(user); + // + //List body = null; + // + //api.createUsersWithArrayInput(body); // TODO: test validations } - /** * Creates list of users with given input array * - * - * * @throws ApiException * if the Api call fails */ @Test public void createUsersWithListInputTest() throws ApiException { - List user = null; - api.createUsersWithListInput(user); + // + //List body = null; + // + //api.createUsersWithListInput(body); // TODO: test validations } - /** * Delete user * @@ -90,60 +91,58 @@ public class UserApiTest { */ @Test public void deleteUserTest() throws ApiException { - String username = null; - api.deleteUser(username); + // + //String username = null; + // + //api.deleteUser(username); // TODO: test validations } - /** * Get user by user name * - * - * * @throws ApiException * if the Api call fails */ @Test public void getUserByNameTest() throws ApiException { - String username = null; - User response = api.getUserByName(username); + // + //String username = null; + // + //User response = api.getUserByName(username); // TODO: test validations } - /** * Logs user into the system * - * - * * @throws ApiException * if the Api call fails */ @Test public void loginUserTest() throws ApiException { - String username = null; - String password = null; - String response = api.loginUser(username, password); + // + //String username = null; + // + //String password = null; + // + //String response = api.loginUser(username, password); // TODO: test validations } - /** * Logs out current logged in user session * - * - * * @throws ApiException * if the Api call fails */ @Test public void logoutUserTest() throws ApiException { - api.logoutUser(); + // + //api.logoutUser(); // TODO: test validations } - /** * Updated user * @@ -154,11 +153,13 @@ public class UserApiTest { */ @Test public void updateUserTest() throws ApiException { - String username = null; - User user = null; - api.updateUser(username, user); + // + //String username = null; + // + //User body = null; + // + //api.updateUser(username, body); // TODO: test validations } - } diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java deleted file mode 100644 index 02f5da4c221..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; - - -public class ApiKeyAuthTest { - @Test - public void testApplyToParamsInQuery() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); - auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - assertEquals(1, queryParams.size()); - for (Pair queryParam : queryParams) { - assertEquals("my-api-key", queryParam.getValue()); - } - - // no changes to header or cookie parameters - assertEquals(0, headerParams.size()); - assertEquals(0, cookieParams.size()); - } - - @Test - public void testApplyToParamsInHeaderWithPrefix() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - - assertEquals(1, headerParams.size()); - assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); - } - - @Test - public void testApplyToParamsInCookieWithPrefix() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or header parameters - assertEquals(0, queryParams.size()); - assertEquals(0, headerParams.size()); - - assertEquals(1, cookieParams.size()); - assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); - } -} diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java deleted file mode 100644 index 458e73e8a7e..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; - - -public class HttpBasicAuthTest { - HttpBasicAuth auth = null; - - @Before - public void setup() { - auth = new HttpBasicAuth(); - } - - @Test - public void testApplyToParams() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - auth.setUsername("my-username"); - auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix - String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; - assertEquals(expected, headerParams.get("Authorization")); - - // null username should be treated as empty string - auth.setUsername(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of ":my-password" with the "Basic " prefix - expected = "Basic Om15LXBhc3N3b3Jk"; - assertEquals(expected, headerParams.get("Authorization")); - - // null password should be treated as empty string - auth.setUsername("my-username"); - auth.setPassword(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of "my-username:" with the "Basic " prefix - expected = "Basic bXktdXNlcm5hbWU6"; - assertEquals(expected, headerParams.get("Authorization")); - } -} diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 4f6fd800ab7..2a18763af1c 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesAnyType */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index 41e6497ecee..b38283c127c 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -25,7 +25,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesArray */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index d2e17831ba7..c2e520f94bc 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesBoolean */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 14fd8022feb..6f1b83dce1a 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesClass */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index 58b7521c6a7..5ba29819117 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesInteger */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index 10ad938f52c..bb7004745ab 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -25,7 +25,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesNumber */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index bcbb9c54b27..df3fb067d74 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesObject */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index f7662d6c469..3e24921e49f 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesString */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AnimalTest.java index 930e5c17d07..da5609b5489 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,14 +21,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.Cat; -import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Animal */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 57a1c4f37ec..cbc199f1575 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 4f127b838bc..762f9d6dc33 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 5874400602c..20dc34a8c51 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayTest */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CapitalizationTest.java index c69ffc12a07..4fd3728ab89 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Capitalization */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CatTest.java index 90fdba14c24..d591bdd30ef 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CatTest.java @@ -22,12 +22,10 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Cat */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CategoryTest.java index 393f73bd5e6..12de38c0c08 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Category */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ClassModelTest.java index 5005bcb800e..d1936d85e81 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ClassModel */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ClientTest.java index bda3b360b74..7aa0f5859ff 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ClientTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Client */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/DogTest.java index de77d6711bd..744c8a406fe 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/DogTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Dog */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 73206626b9c..694e4196138 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -19,12 +19,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumArrays */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd..3f50e1bfb9e 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumClass */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumTestTest.java index 8907cfa8e8f..b8d3359c906 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumTest */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumValueTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumValueTest.java deleted file mode 100644 index 47bfe940d3c..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumValueTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openapitools.client.model; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import com.fasterxml.jackson.databind.SerializationFeature; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -public class EnumValueTest { - - @Test - public void testEnumClass() { - assertEquals(EnumClass._ABC.toString(), "_abc"); - assertEquals(EnumClass._EFG.toString(), "-efg"); - assertEquals(EnumClass._XYZ_.toString(), "(xyz)"); - } - - @Test - public void testEnumTest() { - // test enum value - EnumTest enumTest = new EnumTest(); - enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER); - enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1); - enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1); - - assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower"); - assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower"); - - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1); - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1); - - assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1); - assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2); - - try { - // test serialization (object => json) - ObjectMapper mapper = new ObjectMapper(); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - ObjectWriter ow = mapper.writer(); - String json = ow.writeValueAsString(enumTest); - assertEquals(json, "{\"enum_string\":\"lower\",\"enum_string_required\":null,\"enum_integer\":1,\"enum_number\":1.1,\"outerEnum\":null}"); - - // test deserialization (json => object) - EnumTest fromString = mapper.readValue(json, EnumTest.class); - assertEquals(fromString.getEnumString().toString(), "lower"); - assertEquals(fromString.getEnumInteger().toString(), "1"); - assertEquals(fromString.getEnumNumber().toString(), "1.1"); - - } catch (Exception e) { - fail("Exception thrown during serialization/deserialzation of JSON: " + e.getMessage()); - } - } -} diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index 493d84aa1bc..fb8827a1e88 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ModelFile; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FileSchemaTestClass */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/FormatTestTest.java index 48bec93d994..058a8ad7d43 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FormatTest */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index da9073d4500..bf777b061cc 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for HasOnlyReadOnly */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/MapTestTest.java index 22c8519472b..50e909f0381 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MapTest */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index f29932e96be..b16858dc17e 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 0cd3f976198..dd90f6799d3 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Model200Response */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index be8cca35e3e..e63f2ae5e9c 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelApiResponse */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelFileTest.java index a0247ae71be..264249edc1c 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelFile */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelListTest.java index 0ead99db3a5..81fd2dcc6a6 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelList */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b6ca02f8d23..5840d4f8f0c 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelReturn */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/NameTest.java index 07684c9eb40..9280c171539 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/NameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Name */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 878095093ad..63b5bc0440e 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for NumberOnly */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OrderTest.java index f31e10a9df1..e0fbb529af6 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OrderTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Order */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 8b823572e5e..840cf65c8d0 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterComposite */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf..b312b11a09e 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterEnum */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/PetTest.java index b48657d0c9a..ca23198fbf1 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/PetTest.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -29,7 +30,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Pet */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index 26356ec2048..b356d6993c5 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ReadOnlyFirst */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 4e59989875a..8eb0b1bd269 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for SpecialModelName */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TagTest.java index 5aeb2f3f948..6dc0868167c 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TagTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Tag */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index 8c096c188fc..2e3312e5f38 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for TypeHolderDefault */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index b1655df6165..5df1bbd3d5b 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for TypeHolderExample */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/UserTest.java index e0153a4cf1b..b029d279409 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/UserTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for User */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/XmlItemTest.java index 4bab95a9126..e7b49511c93 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for XmlItem */ diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 3027dabacb6..043be2088a1 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -13,10 +13,14 @@ package org.openapitools.client.api; -import org.openapitools.client.ApiException; +import org.openapitools.client.*; +import org.openapitools.client.auth.*; import org.openapitools.client.model.Client; -import org.junit.jupiter.api.Test; +import java.util.UUID; + +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -26,25 +30,23 @@ import java.util.Map; /** * API tests for AnotherFakeApi */ -@Disabled public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); - /** * To test special tags * * To test special tags and operation ID starting with number * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test public void call123testSpecialTagsTest() throws ApiException { - Client body = null; - Client response = api.call123testSpecialTags(body); + //UUID uuidTest = null; + //Client body = null; + //Client response = api.call123testSpecialTags(uuidTest, body); // TODO: test validations } - + } diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/FILES b/samples/client/petstore/java/resteasy/.openapi-generator/FILES index bcfdf41c52f..2044e402491 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/FILES +++ b/samples/client/petstore/java/resteasy/.openapi-generator/FILES @@ -5,34 +5,33 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md -docs/BigCat.md docs/Capitalization.md docs/Cat.md docs/Category.md docs/ClassModel.md docs/Client.md +docs/DefaultApi.md +docs/DeprecatedObject.md docs/Dog.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md docs/FakeApi.md +docs/FakeBigDecimalMap200Response.md docs/FakeClassnameTags123Api.md docs/FileSchemaTestClass.md +docs/Foo.md +docs/FooGetDefaultResponse.md docs/FormatTest.md docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -41,21 +40,25 @@ docs/ModelFile.md docs/ModelList.md docs/ModelReturn.md docs/Name.md +docs/NullableClass.md docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md docs/OuterComposite.md docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md docs/User.md docs/UserApi.md -docs/XmlItem.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -76,6 +79,7 @@ src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/StringUtil.java src/main/java/org/openapitools/client/api/AnotherFakeApi.java +src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java src/main/java/org/openapitools/client/api/PetApi.java @@ -87,31 +91,29 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/auth/OAuth.java src/main/java/org/openapitools/client/auth/OAuthFlow.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java +src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java +src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +src/main/java/org/openapitools/client/model/Foo.java +src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/client/model/HealthCheckResult.java src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/Model200Response.java @@ -120,15 +122,19 @@ src/main/java/org/openapitools/client/model/ModelFile.java src/main/java/org/openapitools/client/model/ModelList.java src/main/java/org/openapitools/client/model/ModelReturn.java src/main/java/org/openapitools/client/model/Name.java +src/main/java/org/openapitools/client/model/NullableClass.java src/main/java/org/openapitools/client/model/NumberOnly.java +src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/OuterComposite.java src/main/java/org/openapitools/client/model/OuterEnum.java +src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +src/main/java/org/openapitools/client/model/OuterEnumInteger.java +src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/resteasy/README.md b/samples/client/petstore/java/resteasy/README.md index 6aade7f7bb2..084a6ea31a3 100644 --- a/samples/client/petstore/java/resteasy/README.md +++ b/samples/client/petstore/java/resteasy/README.md @@ -91,10 +91,9 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(uuidTest, body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -115,15 +114,20 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem +*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | +*FakeApi* | [**fakeBigDecimalMap**](docs/FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | +*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication *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* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | *FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -155,31 +159,29 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [BigCat](docs/BigCat.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) + - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) + - [FakeBigDecimalMap200Response](docs/FakeBigDecimalMap200Response.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - [FormatTest](docs/FormatTest.md) - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -188,18 +190,22 @@ Class | Method | HTTP request | Description - [ModelList](docs/ModelList.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) + - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) - [OuterEnum](docs/OuterEnum.md) + - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OuterEnumInteger](docs/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) @@ -240,6 +246,18 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### bearer_test + + +- **Type**: HTTP Bearer Token authentication (JWT) + + +### http_signature_test + + +- **Type**: HTTP signature authentication + ## Recommendation diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 933d7332521..9f0affe779f 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ @@ -9,7 +9,30 @@ info: title: OpenAPI Petstore version: 1.0.0 servers: -- url: http://petstore.swagger.io:80/v2 +- description: petstore server + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: "https://localhost:8080/{version}" + variables: + version: + default: v2 + enum: + - v1 + - v2 +- description: The local server without variables + url: https://127.0.0.1/no_varaible tags: - description: Everything about your Pets name: pet @@ -18,25 +41,26 @@ tags: - description: Operations about user name: user paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/_foo_get_default_response' + description: response + x-accepts: application/json /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,33 +69,21 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json put: + description: "" operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -80,15 +92,34 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body + x-webclient-blocking: true x-content-type: application/json x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -118,7 +149,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: @@ -127,6 +157,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -163,7 +194,6 @@ paths: uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: @@ -172,28 +202,33 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -208,12 +243,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -225,35 +262,38 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/updatePetWithForm_request' responses: + "200": + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -266,15 +306,18 @@ paths: x-accepts: application/json /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -315,13 +358,15 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -337,13 +382,11 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -352,17 +395,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: order_id required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -374,6 +417,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: order_id required: true @@ -382,6 +426,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -393,10 +438,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -408,81 +451,68 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -496,16 +526,19 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -513,10 +546,10 @@ paths: x-accepts: application/json /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -528,31 +561,34 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Delete user tags: - user x-accepts: application/json get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -564,10 +600,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -578,42 +612,36 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -626,7 +654,6 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake: @@ -635,44 +662,60 @@ paths: operationId: testGroupParameters parameters: - description: Required String in group parameters + explode: true in: query name: required_string_group required: true schema: type: integer + style: form - description: Required Boolean in group parameters + explode: false in: header name: required_boolean_group required: true schema: type: boolean + style: simple - description: Required Integer in group parameters + explode: true in: query name: required_int64_group required: true schema: format: int64 type: integer + style: form - description: String in group parameters + explode: true in: query name: string_group + required: false schema: type: integer + style: form - description: Boolean in group parameters + explode: false in: header name: boolean_group + required: false schema: type: boolean + style: simple - description: Integer in group parameters + explode: true in: query name: int64_group + required: false schema: format: int64 type: integer + style: form responses: "400": - content: {} description: Something wrong + security: + - bearer_test: [] summary: Fake endpoint to test group parameters (optional) tags: - fake @@ -686,6 +729,7 @@ paths: explode: false in: header name: enum_header_string_array + required: false schema: items: default: $ @@ -696,8 +740,10 @@ paths: type: array style: simple - description: Header parameter enum test (string) + explode: false in: header name: enum_header_string + required: false schema: default: -efg enum: @@ -705,10 +751,12 @@ paths: - -efg - (xyz) type: string + style: simple - description: Query parameter enum test (string array) - explode: false + explode: true in: query name: enum_query_string_array + required: false schema: items: default: $ @@ -719,8 +767,10 @@ paths: type: array style: form - description: Query parameter enum test (string) + explode: true in: query name: enum_query_string + required: false schema: default: -efg enum: @@ -728,24 +778,40 @@ paths: - -efg - (xyz) type: string + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_integer + required: false schema: enum: - 1 - -2 format: int32 type: integer + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_double + required: false schema: enum: - 1.1 - -1.2 format: double type: number + style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: content: application/x-www-form-urlencoded: @@ -753,10 +819,8 @@ paths: $ref: '#/components/schemas/testEnumParameters_request' responses: "400": - content: {} description: Invalid request "404": - content: {} description: Not found summary: To test enum parameters tags: @@ -767,12 +831,7 @@ paths: description: To test "client" model operationId: testClientModel requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -783,36 +842,32 @@ paths: summary: To test "client" model tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json post: - description: |- + description: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testEndpointParameters_request' - required: true responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found security: - http_basic_test: [] - summary: |- + summary: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-content-type: application/x-www-form-urlencoded @@ -823,11 +878,10 @@ paths: operationId: fakeOuterNumberSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' description: Input number as post body - required: false responses: "200": content: @@ -837,8 +891,29 @@ paths: description: Output number tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/property/enum-int: + post: + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + required: true + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Output enum (int) + tags: + - fake + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -846,11 +921,10 @@ paths: operationId: fakeOuterStringSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' description: Input string as post body - required: false responses: "200": content: @@ -860,8 +934,7 @@ paths: description: Output string tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -869,11 +942,10 @@ paths: operationId: fakeOuterBooleanSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body - required: false responses: "200": content: @@ -883,8 +955,7 @@ paths: description: Output boolean tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -892,11 +963,10 @@ paths: operationId: fakeOuterCompositeSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body - required: false responses: "200": content: @@ -906,21 +976,34 @@ paths: description: Output composite tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/BigDecimalMap: + get: + description: "for Java apache and Java native, test toUrlQueryString for maps\ + \ with BegDecimal keys" + operationId: fakeBigDecimalMap + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/fakeBigDecimalMap_200_response' + description: successful operation + tags: + - fake x-accepts: '*/*' /fake/jsonFormData: get: + description: "" operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testJsonFormData_request' - required: true responses: "200": - content: {} description: successful operation summary: test json serialization of form data tags: @@ -929,6 +1012,7 @@ paths: x-accepts: application/json /fake/inline-additionalProperties: post: + description: "" operationId: testInlineAdditionalProperties requestBody: content: @@ -941,23 +1025,23 @@ paths: required: true responses: "200": - content: {} description: successful operation summary: test inline additionalProperties tags: - fake - x-codegen-request-body-name: param x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams parameters: - - in: query + - explode: true + in: query name: query required: true schema: type: string + style: form requestBody: content: application/json: @@ -966,68 +1050,17 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: application/json /another-fake/dummy: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags - parameters: - - description: to test uuid example value - in: header - name: uuid_test - required: true - schema: - format: uuid - type: string requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -1038,12 +1071,11 @@ paths: summary: To test special tags tags: - $another-fake? - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: - description: "For this test, the body for this request much reference a schema\ + description: "For this test, the body for this request must reference a schema\ \ named `File`." operationId: testBodyWithFileSchema requestBody: @@ -1054,13 +1086,31 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json + /fake/body-with-binary: + put: + description: "For this test, the body has to be a binary file." + operationId: testBodyWithBinary + requestBody: + content: + image/png: + schema: + format: binary + nullable: true + type: string + description: image to upload + required: true + responses: + "200": + description: Success + tags: + - fake + x-content-type: image/png + x-accepts: application/json /fake/test-query-parameters: put: description: To test the collection format in query parameters @@ -1074,15 +1124,18 @@ paths: items: type: string type: array - style: form - - in: query + style: pipeDelimited + - explode: false + in: query name: ioutil required: true schema: items: type: string type: array - - in: query + style: form + - explode: false + in: query name: http required: true schema: @@ -1108,30 +1161,49 @@ paths: type: string type: array style: form + - explode: true + in: query + name: language + required: false + schema: + additionalProperties: + format: string + type: string + type: object + style: form + - allowEmptyValue: true + explode: true + in: query + name: allowEmpty + required: true + schema: + type: string + style: form responses: "200": - content: {} description: Success tags: - fake x-accepts: application/json /fake/{petId}/uploadImageWithRequiredFile: post: + description: "" operationId: uploadFileWithRequiredFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - required: true responses: "200": content: @@ -1148,8 +1220,91 @@ paths: - pet x-content-type: multipart/form-data x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string Order: example: petId: 6 @@ -1315,21 +1470,12 @@ components: message: type: string type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" Return: description: Model for testing reserved words properties: return: format: int32 type: integer - type: object xml: name: Return Name: @@ -1349,7 +1495,6 @@ components: type: integer required: - name - type: object xml: name: Name "200_response": @@ -1360,7 +1505,6 @@ components: type: integer class: type: string - type: object xml: name: Name ClassModel: @@ -1368,7 +1512,6 @@ components: properties: _class: type: string - type: object Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -1383,20 +1526,11 @@ components: declawed: type: boolean type: object - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object Animal: discriminator: + mapping: + DOG: '#/components/schemas/Dog' + CAT: '#/components/schemas/Cat' propertyName: className properties: className: @@ -1439,12 +1573,14 @@ components: maximum: 123.4 minimum: 67.8 type: number + decimal: + format: number + type: string string: pattern: "/[a-z]/i" type: string byte: format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" type: string binary: format: binary @@ -1464,8 +1600,14 @@ components: maxLength: 64 minLength: 10 type: string - BigDecimal: - format: number + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: "^\\d{10}$" + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: "/^image_\\d{1,3}$/i" type: string required: - byte @@ -1508,117 +1650,27 @@ components: type: number outerEnum: $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' required: - enum_string_required type: object AdditionalPropertiesClass: properties: - map_string: + map_property: additionalProperties: type: string type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: + map_of_map_property: additionalProperties: additionalProperties: type: string type: object type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -1708,6 +1760,8 @@ components: array_of_string: items: type: string + maxItems: 3 + minItems: 0 type: array array_array_of_integer: items: @@ -1764,7 +1818,29 @@ components: - placed - approved - delivered + nullable: true type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + example: 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer OuterComposite: example: my_string: my_string @@ -1814,243 +1890,133 @@ components: description: Test capitalization type: string type: object - TypeHolderDefault: + _special_model.name_: properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: + $special[property.name]: + format: int64 type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object xml: - namespace: http://a.com/schema - prefix: pre + name: "$special[model.name]" + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + OuterObjectWithEnumProperty: + example: + value: 2 + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + required: + - value + type: object + DeprecatedObject: + deprecated: true + properties: + name: + type: string + type: object + ObjectWithDeprecatedFields: + properties: + uuid: + type: string + id: + deprecated: true + type: number + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + deprecated: true + items: + $ref: '#/components/schemas/Bar' + type: array + type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string + _foo_get_default_response: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + type: object updatePetWithForm_request: properties: name: @@ -2094,7 +2060,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -2163,6 +2128,19 @@ components: - number - pattern_without_delimiter type: object + fakeBigDecimalMap_200_response: + example: + someId: 0.8008281904610115 + someMap: + key: 6.027456183070403 + properties: + someId: + type: number + someMap: + additionalProperties: + type: number + type: object + type: object testJsonFormData_request: properties: param: @@ -2207,5 +2185,11 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: "2.0" + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md index 79402f75c68..fe69a56eebf 100644 --- a/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resteasy/docs/AdditionalPropertiesClass.md @@ -7,17 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mapString** | **Map<String, String>** | | [optional] | -|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | -|**mapInteger** | **Map<String, Integer>** | | [optional] | -|**mapBoolean** | **Map<String, Boolean>** | | [optional] | -|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | -|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | -|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | -|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | -|**anytype1** | **Object** | | [optional] | -|**anytype2** | **Object** | | [optional] | -|**anytype3** | **Object** | | [optional] | +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/resteasy/docs/AllOfWithSingleRef.md new file mode 100644 index 00000000000..4146d56a372 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | **SingleRefType** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md b/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md index e2b1f04ce7f..73c966d2d54 100644 --- a/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(uuidTest, body) +> Client call123testSpecialTags(client) To test special tags @@ -32,10 +32,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(uuidTest, body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -53,8 +52,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **uuidTest** | **UUID**| to test uuid example value | | -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/DefaultApi.md b/samples/client/petstore/java/resteasy/docs/DefaultApi.md new file mode 100644 index 00000000000..2c56e1f90e5 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/DefaultApi.md @@ -0,0 +1,69 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | + + + +## fooGet + +> FooGetDefaultResponse fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + FooGetDefaultResponse result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/resteasy/docs/DeprecatedObject.md b/samples/client/petstore/java/resteasy/docs/DeprecatedObject.md new file mode 100644 index 00000000000..48de1d62442 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/EnumTest.md b/samples/client/petstore/java/resteasy/docs/EnumTest.md index bf2def484c6..380a2aef0bc 100644 --- a/samples/client/petstore/java/resteasy/docs/EnumTest.md +++ b/samples/client/petstore/java/resteasy/docs/EnumTest.md @@ -12,6 +12,9 @@ |**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | |**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | |**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 627366e41db..6eb12aee357 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -4,15 +4,19 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeBigDecimalMap**](FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | | +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | | [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | | [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | -| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | | [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | @@ -21,13 +25,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -## createXmlItem +## fakeBigDecimalMap -> createXmlItem(xmlItem) +> FakeBigDecimalMap200Response fakeBigDecimalMap() -creates an XmlItem -this route creates an XmlItem + +for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys ### Example @@ -45,11 +49,135 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - apiInstance.createXmlItem(xmlItem); + FakeBigDecimalMap200Response result = apiInstance.fakeBigDecimalMap(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeBigDecimalMap"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## fakeHealthGet + +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + HealthCheckResult result = apiInstance.fakeHealthGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeHttpSignatureTest + +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + apiInstance.fakeHttpSignatureTest(pet, query1, header1); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -64,7 +192,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | ### Return type @@ -72,18 +202,18 @@ null (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Content-Type**: application/json, application/xml - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | ## fakeOuterBooleanSerialize @@ -142,7 +272,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -154,7 +284,7 @@ No authorization required ## fakeOuterCompositeSerialize -> OuterComposite fakeOuterCompositeSerialize(body) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -176,9 +306,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -196,7 +326,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -208,7 +338,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -274,7 +404,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -340,7 +470,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -350,13 +480,13 @@ No authorization required | **200** | Output string | - | -## testBodyWithFileSchema +## fakePropertyEnumIntegerSerialize -> testBodyWithFileSchema(body) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) -For this test, the body for this request much reference a schema named `File`. +Test serialization of enum (int) properties with examples ### Example @@ -374,9 +504,140 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - apiInstance.testBodyWithFileSchema(body); + OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + + +## testBodyWithBinary + +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + File body = new File("/path/to/file"); // File | image to upload + try { + apiInstance.testBodyWithBinary(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testBodyWithFileSchema + +> testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(fileSchemaTestClass); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -393,7 +654,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -417,7 +678,7 @@ No authorization required ## testBodyWithQueryParams -> testBodyWithQueryParams(query, body) +> testBodyWithQueryParams(query, user) @@ -438,9 +699,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - apiInstance.testBodyWithQueryParams(query, body); + apiInstance.testBodyWithQueryParams(query, user); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -458,7 +719,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -482,7 +743,7 @@ No authorization required ## testClientModel -> Client testClientModel(body) +> Client testClientModel(client) To test \"client\" model @@ -504,9 +765,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClientModel(body); + Client result = apiInstance.testClientModel(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -524,7 +785,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -550,9 +811,9 @@ No authorization required > 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 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -646,7 +907,7 @@ null (empty response body) ## testEnumParameters -> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -674,10 +935,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -700,6 +962,7 @@ public class Example { | **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] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -739,6 +1002,7 @@ Fake endpoint to test group parameters (optional) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; @@ -746,6 +1010,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -785,7 +1053,7 @@ null (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -801,10 +1069,12 @@ No authorization required ## testInlineAdditionalProperties -> testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(requestBody) test inline additionalProperties + + ### Example ```java @@ -821,9 +1091,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - apiInstance.testInlineAdditionalProperties(param); + apiInstance.testInlineAdditionalProperties(requestBody); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -840,7 +1110,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -868,6 +1138,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -929,7 +1201,7 @@ No authorization required ## testQueryParameterCollectionFormat -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -956,8 +1228,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); @@ -979,6 +1253,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/FakeBigDecimalMap200Response.md b/samples/client/petstore/java/resteasy/docs/FakeBigDecimalMap200Response.md new file mode 100644 index 00000000000..475be1d2d73 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/FakeBigDecimalMap200Response.md @@ -0,0 +1,14 @@ + + +# FakeBigDecimalMap200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**someId** | **BigDecimal** | | [optional] | +|**someMap** | **Map<String, BigDecimal>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md index 10d5ea30aa2..e4ff70ed909 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resteasy/docs/FakeClassnameTags123Api.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## testClassname -> Client testClassname(body) +> Client testClassname(client) To test class name in snake case @@ -39,9 +39,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClassname(body); + Client result = apiInstance.testClassname(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); @@ -59,7 +59,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resteasy/docs/Foo.md b/samples/client/petstore/java/resteasy/docs/Foo.md new file mode 100644 index 00000000000..6b3f0556528 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/resteasy/docs/FooGetDefaultResponse.md new file mode 100644 index 00000000000..ff3d7a3a56c --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/FooGetDefaultResponse.md @@ -0,0 +1,13 @@ + + +# FooGetDefaultResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/FormatTest.md b/samples/client/petstore/java/resteasy/docs/FormatTest.md index 9c68c3080e1..01b8c777ae0 100644 --- a/samples/client/petstore/java/resteasy/docs/FormatTest.md +++ b/samples/client/petstore/java/resteasy/docs/FormatTest.md @@ -13,6 +13,7 @@ |**number** | **BigDecimal** | | | |**_float** | **Float** | | [optional] | |**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | |**string** | **String** | | [optional] | |**_byte** | **byte[]** | | | |**binary** | **File** | | [optional] | @@ -20,7 +21,8 @@ |**dateTime** | **OffsetDateTime** | | [optional] | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | -|**bigDecimal** | **BigDecimal** | | [optional] | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/resteasy/docs/HealthCheckResult.md b/samples/client/petstore/java/resteasy/docs/HealthCheckResult.md new file mode 100644 index 00000000000..4885e6f1cad --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/NullableClass.md b/samples/client/petstore/java/resteasy/docs/NullableClass.md new file mode 100644 index 00000000000..fa98c5c6d98 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/resteasy/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 00000000000..f1cf571f4c0 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/resteasy/docs/OuterEnumDefaultValue.md new file mode 100644 index 00000000000..cbc7f4ba54d --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/resteasy/docs/OuterEnumInteger.md b/samples/client/petstore/java/resteasy/docs/OuterEnumInteger.md new file mode 100644 index 00000000000..f71dea30ad0 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/resteasy/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/resteasy/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 00000000000..99e6389f427 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/resteasy/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/resteasy/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 00000000000..0fafaaa2715 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,13 @@ + + +# OuterObjectWithEnumProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | + + + diff --git a/samples/client/petstore/java/resteasy/docs/PetApi.md b/samples/client/petstore/java/resteasy/docs/PetApi.md index 1e79e30ef6c..e2515d9bb9b 100644 --- a/samples/client/petstore/java/resteasy/docs/PetApi.md +++ b/samples/client/petstore/java/resteasy/docs/PetApi.md @@ -18,10 +18,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## addPet -> addPet(body) +> addPet(pet) Add a new pet to the store + + ### Example ```java @@ -43,9 +45,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.addPet(body); + apiInstance.addPet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -62,7 +64,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -81,7 +83,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -91,6 +93,8 @@ null (empty response body) Deletes a pet + + ### Example ```java @@ -152,7 +156,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | @@ -377,10 +381,12 @@ public class Example { ## updatePet -> updatePet(body) +> updatePet(pet) Update an existing pet + + ### Example ```java @@ -402,9 +408,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -421,7 +427,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -440,7 +446,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | @@ -452,6 +458,8 @@ null (empty response body) Updates a pet in the store with form data + + ### Example ```java @@ -515,6 +523,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -524,6 +533,8 @@ null (empty response body) uploads an image + + ### Example ```java @@ -597,6 +608,8 @@ public class Example { uploads an image (required) + + ### Example ```java diff --git a/samples/client/petstore/java/resteasy/docs/SingleRefType.md b/samples/client/petstore/java/resteasy/docs/SingleRefType.md new file mode 100644 index 00000000000..cc269bb871f --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/resteasy/docs/StoreApi.md b/samples/client/petstore/java/resteasy/docs/StoreApi.md index b64e208a83a..ce91137cc6f 100644 --- a/samples/client/petstore/java/resteasy/docs/StoreApi.md +++ b/samples/client/petstore/java/resteasy/docs/StoreApi.md @@ -216,10 +216,12 @@ No authorization required ## placeOrder -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet + + ### Example ```java @@ -236,9 +238,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - Order result = apiInstance.placeOrder(body); + Order result = apiInstance.placeOrder(order); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); @@ -256,7 +258,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -268,7 +270,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json diff --git a/samples/client/petstore/java/resteasy/docs/UserApi.md b/samples/client/petstore/java/resteasy/docs/UserApi.md index dfdb4a7c0eb..305fd6e66df 100644 --- a/samples/client/petstore/java/resteasy/docs/UserApi.md +++ b/samples/client/petstore/java/resteasy/docs/UserApi.md @@ -17,7 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## createUser -> createUser(body) +> createUser(user) Create user @@ -39,9 +39,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -58,7 +58,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -70,7 +70,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -82,10 +82,12 @@ No authorization required ## createUsersWithArrayInput -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(user) Creates list of users with given input array + + ### Example ```java @@ -102,9 +104,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -121,7 +123,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -133,7 +135,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -145,10 +147,12 @@ No authorization required ## createUsersWithListInput -> createUsersWithListInput(body) +> createUsersWithListInput(user) Creates list of users with given input array + + ### Example ```java @@ -165,9 +169,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -184,7 +188,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -196,7 +200,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -278,6 +282,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -344,6 +350,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -411,6 +419,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -466,7 +476,7 @@ No authorization required ## updateUser -> updateUser(username, body) +> updateUser(username, user) Updated user @@ -489,9 +499,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - apiInstance.updateUser(username, body); + apiInstance.updateUser(username, user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); @@ -509,7 +519,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -521,7 +531,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java index b1602f36476..718adc4771c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java @@ -85,6 +85,7 @@ public class ApiClient extends JavaTimeFormatter { authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); authentications.put("http_basic_test", new HttpBasicAuth()); + authentications.put("bearer_test", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index ce5be20d947..375fa787060 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -8,7 +8,6 @@ import org.openapitools.client.Pair; import javax.ws.rs.core.GenericType; import org.openapitools.client.model.Client; -import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -38,22 +37,16 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @return a {@code Client} * @throws ApiException if fails to make API call */ - public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException { - Object localVarPostBody = body; + public Client call123testSpecialTags(Client client) throws ApiException { + Object localVarPostBody = client; - // verify the required parameter 'uuidTest' is set - if (uuidTest == null) { - throw new ApiException(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags"); } // create path and map variables @@ -66,9 +59,7 @@ public class AnotherFakeApi { Map localVarFormParams = new HashMap(); - if (uuidTest != null) - localVarHeaderParams.put("uuid_test", apiClient.parameterToString(uuidTest)); - + final String[] localVarAccepts = { diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 00000000000..bef1d2061d7 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,74 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import javax.ws.rs.core.GenericType; + +import org.openapitools.client.model.FooGetDefaultResponse; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private ApiClient apiClient; + + public DefaultApi() { + this(Configuration.getDefaultApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + * @return a {@code FooGetDefaultResponse} + * @throws ApiException if fails to make API call + */ + public FooGetDefaultResponse fooGet() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/foo".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java index d5d420a9852..73d27c887ca 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java @@ -9,13 +9,17 @@ import javax.ws.rs.core.GenericType; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import java.util.ArrayList; import java.util.HashMap; @@ -43,21 +47,16 @@ public class FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + * @return a {@code FakeBigDecimalMap200Response} * @throws ApiException if fails to make API call */ - public void createXmlItem(XmlItem xmlItem) throws ApiException { - Object localVarPostBody = xmlItem; - - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) { - throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem"); - } + public FakeBigDecimalMap200Response fakeBigDecimalMap() throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fake/create_xml_item".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake/BigDecimalMap".replaceAll("\\{format\\}","json"); // query params List localVarQueryParams = new ArrayList(); @@ -70,19 +69,103 @@ public class FakeApi { final String[] localVarAccepts = { - + "*/*" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" + }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Health check endpoint + * + * @return a {@code HealthCheckResult} + * @throws ApiException if fails to make API call + */ + public HealthCheckResult fakeHealthGet() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/fake/health".replaceAll("\\{format\\}","json"); - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @throws ApiException if fails to make API call + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException { + Object localVarPostBody = pet; + + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); + } + + // create path and map variables + String localVarPath = "/fake/http-signature-test".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_1", query1)); + + if (header1 != null) + localVarHeaderParams.put("header_1", apiClient.parameterToString(header1)); + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json", "application/xml" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_signature_test" }; + + + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * @@ -113,7 +196,7 @@ public class FakeApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -125,12 +208,12 @@ public class FakeApi { /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return a {@code OuterComposite} * @throws ApiException if fails to make API call */ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { - Object localVarPostBody = body; + public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException { + Object localVarPostBody = outerComposite; // create path and map variables String localVarPath = "/fake/outer/composite".replaceAll("\\{format\\}","json"); @@ -151,7 +234,7 @@ public class FakeApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -189,7 +272,7 @@ public class FakeApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -227,7 +310,7 @@ public class FakeApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -238,16 +321,101 @@ public class FakeApi { } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return a {@code OuterObjectWithEnumProperty} * @throws ApiException if fails to make API call */ - public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { + public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { + Object localVarPostBody = outerObjectWithEnumProperty; + + // verify the required parameter 'outerObjectWithEnumProperty' is set + if (outerObjectWithEnumProperty == null) { + throw new ApiException(400, "Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize"); + } + + // create path and map variables + String localVarPath = "/fake/property/enum-int".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @throws ApiException if fails to make API call + */ + public void testBodyWithBinary(File 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 testBodyWithFileSchema"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithBinary"); + } + + // create path and map variables + String localVarPath = "/fake/body-with-binary".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "image/png" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + } + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @throws ApiException if fails to make API call + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + Object localVarPostBody = fileSchemaTestClass; + + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) { + throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); } // create path and map variables @@ -282,20 +450,20 @@ public class FakeApi { * * * @param query (required) - * @param body (required) + * @param user (required) * @throws ApiException if fails to make API call */ - public void testBodyWithQueryParams(String query, User body) throws ApiException { - Object localVarPostBody = body; + public void testBodyWithQueryParams(String query, User user) throws ApiException { + Object localVarPostBody = user; // verify the required parameter 'query' is set if (query == null) { throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); } // create path and map variables @@ -330,16 +498,16 @@ public class FakeApi { /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @return a {@code Client} * @throws ApiException if fails to make API call */ - public Client testClientModel(Client body) throws ApiException { - Object localVarPostBody = body; + public Client testClientModel(Client client) throws ApiException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel"); + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel"); } // create path and map variables @@ -371,8 +539,8 @@ public class FakeApi { return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -477,11 +645,12 @@ if (paramCallback != null) * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -493,10 +662,11 @@ if (paramCallback != null) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_model_array", enumQueryModelArray)); if (enumHeaderStringArray != null) localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); @@ -584,7 +754,7 @@ if (booleanGroup != null) }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "bearer_test" }; apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); @@ -592,15 +762,15 @@ if (booleanGroup != null) /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @throws ApiException if fails to make API call */ - public void testInlineAdditionalProperties(Map param) throws ApiException { - Object localVarPostBody = param; + public void testInlineAdditionalProperties(Map requestBody) throws ApiException { + Object localVarPostBody = requestBody; - // verify the required parameter 'param' is set - if (param == null) { - throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"); + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); } // create path and map variables @@ -691,9 +861,11 @@ if (param2 != null) * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @throws ApiException if fails to make API call */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'pipe' is set @@ -721,6 +893,11 @@ if (param2 != null) throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); } + // verify the required parameter 'allowEmpty' is set + if (allowEmpty == null) { + throw new ApiException(400, "Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat"); + } + // create path and map variables String localVarPath = "/fake/test-query-parameters".replaceAll("\\{format\\}","json"); @@ -730,11 +907,13 @@ if (param2 != null) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); + localVarQueryParams.addAll(apiClient.parameterToPairs("pipes", "pipe", pipe)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil)); localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "language", language)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "allowEmpty", allowEmpty)); diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 541c0de0f6a..71d312411e3 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -37,16 +37,16 @@ public class FakeClassnameTags123Api { /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @return a {@code Client} * @throws ApiException if fails to make API call */ - public Client testClassname(Client body) throws ApiException { - Object localVarPostBody = body; + public Client testClassname(Client client) throws ApiException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname"); + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname"); } // create path and map variables diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java index c0174d8f38a..b358dec289a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java @@ -40,15 +40,15 @@ public class PetApi { /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call */ - public void addPet(Pet body) throws ApiException { - Object localVarPostBody = body; + public void addPet(Pet pet) throws ApiException { + Object localVarPostBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling addPet"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet"); } // create path and map variables @@ -262,15 +262,15 @@ public class PetApi { /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call */ - public void updatePet(Pet body) throws ApiException { - Object localVarPostBody = body; + public void updatePet(Pet pet) throws ApiException { + Object localVarPostBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"); } // create path and map variables diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java index d6e587d24b0..0efae2a42a2 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java @@ -161,16 +161,16 @@ public class StoreApi { /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return a {@code Order} * @throws ApiException if fails to make API call */ - public Order placeOrder(Order body) throws ApiException { - Object localVarPostBody = body; + public Order placeOrder(Order order) throws ApiException { + Object localVarPostBody = order; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"); + // verify the required parameter 'order' is set + if (order == null) { + throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"); } // create path and map variables @@ -192,7 +192,7 @@ public class StoreApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java index e96a3b63741..e2c575ca8de 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java @@ -38,15 +38,15 @@ public class UserApi { /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @throws ApiException if fails to make API call */ - public void createUser(User body) throws ApiException { - Object localVarPostBody = body; + public void createUser(User user) throws ApiException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUser"); } // create path and map variables @@ -68,7 +68,7 @@ public class UserApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -80,15 +80,15 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @throws ApiException if fails to make API call */ - public void createUsersWithArrayInput(List body) throws ApiException { - Object localVarPostBody = body; + public void createUsersWithArrayInput(List user) throws ApiException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); } // create path and map variables @@ -110,7 +110,7 @@ public class UserApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -122,15 +122,15 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @throws ApiException if fails to make API call */ - public void createUsersWithListInput(List body) throws ApiException { - Object localVarPostBody = body; + public void createUsersWithListInput(List user) throws ApiException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"); } // create path and map variables @@ -152,7 +152,7 @@ public class UserApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -339,20 +339,20 @@ public class UserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @throws ApiException if fails to make API call */ - public void updateUser(String username, User body) throws ApiException { - Object localVarPostBody = body; + public void updateUser(String username, User user) throws ApiException { + Object localVarPostBody = user; // verify the required parameter 'username' is set if (username == null) { throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser"); } // create path and map variables @@ -375,7 +375,7 @@ public class UserApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 46ec07ac55b..bb18d6f5c2d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -20,9 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -31,403 +29,85 @@ import com.fasterxml.jackson.annotation.JsonTypeName; * AdditionalPropertiesClass */ @JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString = new HashMap<>(); + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; + private Map mapProperty = new HashMap<>(); - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - private Map mapInteger = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - private Map mapBoolean = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - private Map> mapArrayInteger = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - private Map> mapArrayAnytype = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; - private Map> mapMapString = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - private Map> mapMapAnytype = new HashMap<>(); - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - private Object anytype3; + public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; + private Map> mapOfMapProperty = new HashMap<>(); public AdditionalPropertiesClass() { } - public AdditionalPropertiesClass mapString(Map mapString) { + public AdditionalPropertiesClass mapProperty(Map mapProperty) { - this.mapString = mapString; + this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); } - this.mapString.put(key, mapStringItem); + this.mapProperty.put(key, mapPropertyItem); return this; } /** - * Get mapString - * @return mapString + * Get mapProperty + * @return mapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapString() { - return mapString; + public Map getMapProperty() { + return mapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapString(Map mapString) { - this.mapString = mapString; + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { - this.mapNumber = mapNumber; + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); } - this.mapNumber.put(key, mapNumberItem); + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; } /** - * Get mapNumber - * @return mapNumber + * Get mapOfMapProperty + * @return mapOfMapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapNumber() { - return mapNumber; + public Map> getMapOfMapProperty() { + return mapOfMapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapInteger() { - return mapInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapBoolean() { - return mapBoolean; - } - - - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapString() { - return mapMapString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype1() { - return anytype1; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype2() { - return anytype2; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype3() { - return anytype3; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; } @Override @@ -439,39 +119,21 @@ public class AdditionalPropertiesClass { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapProperty, mapOfMapProperty); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 00000000000..ff55e37f2d7 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,136 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private SingleRefType singleRefType; + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SingleRefType getSingleRefType() { + return singleRefType; + } + + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java index a40c65533eb..fd52da7ba5e 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Animal.java @@ -40,9 +40,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Cat.class, name = "CAT"), + @JsonSubTypes.Type(value = Dog.class, name = "DOG"), }) public class Animal { diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java index a0a6af014cd..e9c3b88dd90 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Cat.java @@ -39,9 +39,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName; allowSetters = true // allows the className to be set during deserialization ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), -}) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 00000000000..73cccb0d2d3 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java index 0b2ba27fcb6..dc4dbac1001 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/EnumTest.java @@ -21,6 +21,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -32,7 +39,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE }) @JsonTypeName("Enum_Test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -194,7 +204,16 @@ public class EnumTest { private EnumNumberEnum enumNumber; public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; public EnumTest() { } @@ -304,8 +323,8 @@ public class EnumTest { public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); - this.outerEnum = outerEnum; return this; } @@ -314,18 +333,104 @@ public class EnumTest { * @return outerEnum **/ @javax.annotation.Nullable + @JsonIgnore + + public OuterEnum getOuterEnum() { + return outerEnum.orElse(null); + } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OuterEnum getOuterEnum() { + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + } - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * @return outerEnumInteger + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * @return outerEnumDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + + public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; + } + + /** + * Get outerEnumIntegerDefaultValue + * @return outerEnumIntegerDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } @Override @@ -341,12 +446,26 @@ public class EnumTest { Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && Objects.equals(this.enumInteger, enumTest.enumInteger) && Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + equalsNullable(this.outerEnum, enumTest.outerEnum) && + Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && + Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -358,6 +477,9 @@ public class EnumTest { 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(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java new file mode 100644 index 00000000000..1a6fbe6cb37 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FakeBigDecimalMap200Response + */ +@JsonPropertyOrder({ + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_ID, + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_MAP +}) +@JsonTypeName("fakeBigDecimalMap_200_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FakeBigDecimalMap200Response { + public static final String JSON_PROPERTY_SOME_ID = "someId"; + private BigDecimal someId; + + public static final String JSON_PROPERTY_SOME_MAP = "someMap"; + private Map someMap = new HashMap<>(); + + public FakeBigDecimalMap200Response() { + } + + public FakeBigDecimalMap200Response someId(BigDecimal someId) { + + this.someId = someId; + return this; + } + + /** + * Get someId + * @return someId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getSomeId() { + return someId; + } + + + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSomeId(BigDecimal someId) { + this.someId = someId; + } + + + public FakeBigDecimalMap200Response someMap(Map someMap) { + + this.someMap = someMap; + return this; + } + + public FakeBigDecimalMap200Response putSomeMapItem(String key, BigDecimal someMapItem) { + if (this.someMap == null) { + this.someMap = new HashMap<>(); + } + this.someMap.put(key, someMapItem); + return this; + } + + /** + * Get someMap + * @return someMap + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getSomeMap() { + return someMap; + } + + + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSomeMap(Map someMap) { + this.someMap = someMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o; + return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) && + Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap); + } + + @Override + public int hashCode() { + return Objects.hash(someId, someMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FakeBigDecimalMap200Response {\n"); + sb.append(" someId: ").append(toIndentedString(someId)).append("\n"); + sb.append(" someMap: ").append(toIndentedString(someMap)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 00000000000..0ae068735bd --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,103 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBar(String bar) { + this.bar = bar; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java new file mode 100644 index 00000000000..0626a5810e6 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FooGetDefaultResponse + */ +@JsonPropertyOrder({ + FooGetDefaultResponse.JSON_PROPERTY_STRING +}) +@JsonTypeName("_foo_get_default_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FooGetDefaultResponse { + public static final String JSON_PROPERTY_STRING = "string"; + private Foo string; + + public FooGetDefaultResponse() { + } + + public FooGetDefaultResponse string(Foo string) { + + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(Foo string) { + this.string = string; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; + return Objects.equals(this.string, fooGetDefaultResponse.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooGetDefaultResponse {\n"); + sb.append(" string: ").append(toIndentedString(string)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java index 9831eac4992..1efd4270dd5 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/FormatTest.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; FormatTest.JSON_PROPERTY_NUMBER, FormatTest.JSON_PROPERTY_FLOAT, FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_DECIMAL, FormatTest.JSON_PROPERTY_STRING, FormatTest.JSON_PROPERTY_BYTE, FormatTest.JSON_PROPERTY_BINARY, @@ -45,7 +46,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER }) @JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -68,6 +70,9 @@ public class FormatTest { public static final String JSON_PROPERTY_DOUBLE = "double"; private Double _double; + public static final String JSON_PROPERTY_DECIMAL = "decimal"; + private BigDecimal decimal; + public static final String JSON_PROPERTY_STRING = "string"; private String string; @@ -89,8 +94,11 @@ public class FormatTest { public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + private String patternWithDigits; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; + private String patternWithDigitsAndDelimiter; public FormatTest() { } @@ -261,6 +269,32 @@ public class FormatTest { } + public FormatTest decimal(BigDecimal decimal) { + + this.decimal = decimal; + return this; + } + + /** + * Get decimal + * @return decimal + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDecimal() { + return decimal; + } + + + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecimal(BigDecimal decimal) { + this.decimal = decimal; + } + + public FormatTest string(String string) { this.string = string; @@ -443,29 +477,55 @@ public class FormatTest { } - public FormatTest bigDecimal(BigDecimal bigDecimal) { + public FormatTest patternWithDigits(String patternWithDigits) { - this.bigDecimal = bigDecimal; + this.patternWithDigits = patternWithDigits; return this; } /** - * Get bigDecimal - * @return bigDecimal + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getBigDecimal() { - return bigDecimal; + public String getPatternWithDigits() { + return patternWithDigits; } - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } @Override @@ -483,6 +543,7 @@ public class FormatTest { Objects.equals(this.number, formatTest.number) && Objects.equals(this._float, formatTest._float) && Objects.equals(this._double, formatTest._double) && + Objects.equals(this.decimal, formatTest.decimal) && Objects.equals(this.string, formatTest.string) && Arrays.equals(this._byte, formatTest._byte) && Objects.equals(this.binary, formatTest.binary) && @@ -490,12 +551,13 @@ public class FormatTest { Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -508,6 +570,7 @@ public class FormatTest { 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(" decimal: ").append(toIndentedString(decimal)).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"); @@ -515,7 +578,8 @@ public class FormatTest { 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(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 00000000000..b156198397f --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,126 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 00000000000..44ae6b98f11 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,625 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullableClass extends HashMap { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + private List arrayItemsNullable; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + private Map objectItemsNullable = new HashMap<>(); + + public NullableClass() { + + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 00000000000..1a3e502685b --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,218 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + private List bars; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBars(List bars) { + this.bars = bars; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnum.java index d2924eb9c29..4cd955b63dc 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -55,7 +55,7 @@ public enum OuterEnum { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } } diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 00000000000..73077cc8c31 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 00000000000..e6c2e38c2e7 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 00000000000..ef61373b187 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java new file mode 100644 index 00000000000..0b8b5f66164 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.OuterEnumInteger; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * OuterObjectWithEnumProperty + */ +@JsonPropertyOrder({ + OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OuterObjectWithEnumProperty { + public static final String JSON_PROPERTY_VALUE = "value"; + private OuterEnumInteger value; + + public OuterObjectWithEnumProperty() { + } + + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { + + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OuterEnumInteger getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(OuterEnumInteger value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; + return Objects.equals(this.value, outerObjectWithEnumProperty.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterObjectWithEnumProperty {\n"); + sb.append(" value: ").append(toIndentedString(value)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 00000000000..f9922454755 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java index bedacb16913..8c6588d73f4 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; @JsonPropertyOrder({ SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME }) -@JsonTypeName("$special[model.name]") +@JsonTypeName("_special_model.name_") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SpecialModelName { public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; @@ -71,8 +71,8 @@ public class SpecialModelName { if (o == null || getClass() != o.getClass()) { return false; } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); } @Override diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index b6db8d2a2c3..9f3d3543c84 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,10 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,12 +29,10 @@ import java.util.Map; /** * API tests for AnotherFakeApi */ -@Ignore public class AnotherFakeApiTest { private final AnotherFakeApi api = new AnotherFakeApi(); - /** * To test special tags * @@ -42,10 +43,11 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() throws ApiException { - Client client = null; - Client response = api.call123testSpecialTags(client); + // + //Client client = null; + // + //Client response = api.call123testSpecialTags(client); // TODO: test validations } - } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 00000000000..6e55220f09e --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,47 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.model.FooGetDefaultResponse; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DefaultApi + */ +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + /** + * @throws ApiException + * if the Api call fails + */ + @Test + public void fooGetTest() throws ApiException { + // + //FooGetDefaultResponse response = api.fooGet(); + + // TODO: test validations + } +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/FakeApiTest.java index 4731d235db3..ee35df281fb 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,15 +16,23 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -33,15 +41,56 @@ import java.util.Map; /** * API tests for FakeApi */ -@Ignore public class FakeApiTest { private final FakeApi api = new FakeApi(); - /** - * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeBigDecimalMapTest() throws ApiException { + // + //FakeBigDecimalMap200Response response = api.fakeBigDecimalMap(); + + // TODO: test validations + } + /** + * Health check endpoint + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHealthGetTest() throws ApiException { + // + //HealthCheckResult response = api.fakeHealthGet(); + + // TODO: test validations + } + /** + * test http signature authentication + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHttpSignatureTestTest() throws ApiException { + // + //Pet pet = null; + // + //String query1 = null; + // + //String header1 = null; + // + //api.fakeHttpSignatureTest(pet, query1, header1); + + // TODO: test validations + } + /** * Test serialization of outer boolean types * * @throws ApiException @@ -49,15 +98,14 @@ public class FakeApiTest { */ @Test public void fakeOuterBooleanSerializeTest() throws ApiException { - Boolean body = null; - Boolean response = api.fakeOuterBooleanSerialize(body); + // + //Boolean body = null; + // + //Boolean response = api.fakeOuterBooleanSerialize(body); // TODO: test validations } - /** - * - * * Test serialization of object with outer number type * * @throws ApiException @@ -65,15 +113,14 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { - OuterComposite outerComposite = null; - OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); + // + //OuterComposite outerComposite = null; + // + //OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); // TODO: test validations } - /** - * - * * Test serialization of outer number types * * @throws ApiException @@ -81,15 +128,14 @@ public class FakeApiTest { */ @Test public void fakeOuterNumberSerializeTest() throws ApiException { - BigDecimal body = null; - BigDecimal response = api.fakeOuterNumberSerialize(body); + // + //BigDecimal body = null; + // + //BigDecimal response = api.fakeOuterNumberSerialize(body); // TODO: test validations } - /** - * - * * Test serialization of outer string types * * @throws ApiException @@ -97,45 +143,73 @@ public class FakeApiTest { */ @Test public void fakeOuterStringSerializeTest() throws ApiException { - String body = null; - String response = api.fakeOuterStringSerialize(body); + // + //String body = null; + // + //String response = api.fakeOuterStringSerialize(body); // TODO: test validations } - /** - * + * Test serialization of enum (int) properties with examples * - * For this test, the body for this request much reference a schema named `File`. + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakePropertyEnumIntegerSerializeTest() throws ApiException { + // + //OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; + // + //OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + + // TODO: test validations + } + /** + * For this test, the body has to be a binary file. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithBinaryTest() throws ApiException { + // + //File body = null; + // + //api.testBodyWithBinary(body); + + // TODO: test validations + } + /** + * For this test, the body for this request must reference a schema named `File`. * * @throws ApiException * if the Api call fails */ @Test public void testBodyWithFileSchemaTest() throws ApiException { - FileSchemaTestClass fileSchemaTestClass = null; - api.testBodyWithFileSchema(fileSchemaTestClass); + // + //FileSchemaTestClass fileSchemaTestClass = null; + // + //api.testBodyWithFileSchema(fileSchemaTestClass); // TODO: test validations } - /** - * - * - * - * * @throws ApiException * if the Api call fails */ @Test public void testBodyWithQueryParamsTest() throws ApiException { - String query = null; - User user = null; - api.testBodyWithQueryParams(query, user); + // + //String query = null; + // + //User user = null; + // + //api.testBodyWithQueryParams(query, user); // TODO: test validations } - /** * To test \"client\" model * @@ -146,12 +220,13 @@ public class FakeApiTest { */ @Test public void testClientModelTest() throws ApiException { - Client client = null; - Client response = api.testClientModel(client); + // + //Client client = null; + // + //Client response = api.testClientModel(client); // TODO: test validations } - /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -162,25 +237,39 @@ public class FakeApiTest { */ @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; - File binary = null; - LocalDate date = null; - OffsetDateTime dateTime = null; - String password = null; - String paramCallback = null; - api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + // + //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; + // + //File binary = null; + // + //LocalDate date = null; + // + //OffsetDateTime 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 * @@ -191,19 +280,29 @@ public class FakeApiTest { */ @Test public void testEnumParametersTest() throws ApiException { - List enumHeaderStringArray = null; - String enumHeaderString = null; - List enumQueryStringArray = null; - String enumQueryString = null; - Integer enumQueryInteger = null; - Double enumQueryDouble = null; - List enumFormStringArray = null; - String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + // + //List enumHeaderStringArray = null; + // + //String enumHeaderString = null; + // + //List enumQueryStringArray = null; + // + //String enumQueryString = null; + // + //Integer enumQueryInteger = null; + // + //Double enumQueryDouble = null; + // + //List enumQueryModelArray = null; + // + //List enumFormStringArray = null; + // + //String enumFormString = null; + // + //api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); // TODO: test validations } - /** * Fake endpoint to test group parameters (optional) * @@ -214,17 +313,23 @@ public class FakeApiTest { */ @Test public void testGroupParametersTest() throws ApiException { - Integer requiredStringGroup = null; - Boolean requiredBooleanGroup = null; - Long requiredInt64Group = null; - Integer stringGroup = null; - Boolean booleanGroup = null; - Long int64Group = null; - api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + // + //Integer requiredStringGroup = null; + // + //Boolean requiredBooleanGroup = null; + // + //Long requiredInt64Group = null; + // + //Integer stringGroup = null; + // + //Boolean booleanGroup = null; + // + //Long int64Group = null; + // + //api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); // TODO: test validations } - /** * test inline additionalProperties * @@ -235,12 +340,13 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { - Map requestBody = null; - api.testInlineAdditionalProperties(requestBody); + // + //Map requestBody = null; + // + //api.testInlineAdditionalProperties(requestBody); // TODO: test validations } - /** * test json serialization of form data * @@ -251,11 +357,40 @@ public class FakeApiTest { */ @Test public void testJsonFormDataTest() throws ApiException { - String param = null; - String param2 = null; - api.testJsonFormData(param, param2); + // + //String param = null; + // + //String param2 = null; + // + //api.testJsonFormData(param, param2); + + // TODO: test validations + } + /** + * To test the collection format in query parameters + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() throws ApiException { + // + //List pipe = null; + // + //List ioutil = null; + // + //List http = null; + // + //List url = null; + // + //List context = null; + // + //String allowEmpty = null; + // + //Map language = null; + // + //api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); // TODO: test validations } - } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index e2ac28cb12a..4369000f256 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,10 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Client; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,12 +29,10 @@ import java.util.Map; /** * API tests for FakeClassnameTags123Api */ -@Ignore public class FakeClassnameTags123ApiTest { private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); - /** * To test class name in snake case * @@ -42,10 +43,11 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() throws ApiException { - Client client = null; - Client response = api.testClassname(client); + // + //Client client = null; + // + //Client response = api.testClassname(client); // TODO: test validations } - } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/PetApiTest.java index 5f67e0d3b78..2f86327bab9 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,24 +17,25 @@ import org.openapitools.client.ApiException; import java.io.File; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; +import java.util.Set; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; /** * API tests for PetApi */ -@Ignore public class PetApiTest { private final PetApi api = new PetApi(); - /** * Add a new pet to the store * @@ -45,12 +46,13 @@ public class PetApiTest { */ @Test public void addPetTest() throws ApiException { - Pet pet = null; - api.addPet(pet); + // + //Pet pet = null; + // + //api.addPet(pet); // TODO: test validations } - /** * Deletes a pet * @@ -61,13 +63,15 @@ public class PetApiTest { */ @Test public void deletePetTest() throws ApiException { - Long petId = null; - String apiKey = null; - api.deletePet(petId, apiKey); + // + //Long petId = null; + // + //String apiKey = null; + // + //api.deletePet(petId, apiKey); // TODO: test validations } - /** * Finds Pets by status * @@ -78,12 +82,13 @@ public class PetApiTest { */ @Test public void findPetsByStatusTest() throws ApiException { - List status = null; - List response = api.findPetsByStatus(status); + // + //List status = null; + // + //List response = api.findPetsByStatus(status); // TODO: test validations } - /** * Finds Pets by tags * @@ -94,12 +99,13 @@ public class PetApiTest { */ @Test public void findPetsByTagsTest() throws ApiException { - Set tags = null; - Set response = api.findPetsByTags(tags); + // + //Set tags = null; + // + //Set response = api.findPetsByTags(tags); // TODO: test validations } - /** * Find pet by ID * @@ -110,12 +116,13 @@ public class PetApiTest { */ @Test public void getPetByIdTest() throws ApiException { - Long petId = null; - Pet response = api.getPetById(petId); + // + //Long petId = null; + // + //Pet response = api.getPetById(petId); // TODO: test validations } - /** * Update an existing pet * @@ -126,12 +133,13 @@ public class PetApiTest { */ @Test public void updatePetTest() throws ApiException { - Pet pet = null; - api.updatePet(pet); + // + //Pet pet = null; + // + //api.updatePet(pet); // TODO: test validations } - /** * Updates a pet in the store with form data * @@ -142,14 +150,17 @@ public class PetApiTest { */ @Test public void updatePetWithFormTest() throws ApiException { - Long petId = null; - String name = null; - String status = null; - api.updatePetWithForm(petId, name, status); + // + //Long petId = null; + // + //String name = null; + // + //String status = null; + // + //api.updatePetWithForm(petId, name, status); // TODO: test validations } - /** * uploads an image * @@ -160,12 +171,36 @@ public class PetApiTest { */ @Test public void uploadFileTest() throws ApiException { - Long petId = null; - String additionalMetadata = null; - File file = null; - ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + // + //Long petId = null; + // + //String additionalMetadata = null; + // + //File _file = null; + // + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); + + // TODO: test validations + } + /** + * uploads an image (required) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() throws ApiException { + // + //Long petId = null; + // + //File requiredFile = null; + // + //String additionalMetadata = null; + // + //ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); // TODO: test validations } - } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/StoreApiTest.java index a43d64debf1..f0456cb1998 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,7 +17,10 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.Order; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,12 +29,10 @@ import java.util.Map; /** * API tests for StoreApi */ -@Ignore public class StoreApiTest { private final StoreApi api = new StoreApi(); - /** * Delete purchase order by ID * @@ -42,12 +43,13 @@ public class StoreApiTest { */ @Test public void deleteOrderTest() throws ApiException { - String orderId = null; - api.deleteOrder(orderId); + // + //String orderId = null; + // + //api.deleteOrder(orderId); // TODO: test validations } - /** * Returns pet inventories by status * @@ -58,11 +60,11 @@ public class StoreApiTest { */ @Test public void getInventoryTest() throws ApiException { - Map response = api.getInventory(); + // + //Map response = api.getInventory(); // TODO: test validations } - /** * Find purchase order by ID * @@ -73,12 +75,13 @@ public class StoreApiTest { */ @Test public void getOrderByIdTest() throws ApiException { - Long orderId = null; - Order response = api.getOrderById(orderId); + // + //Long orderId = null; + // + //Order response = api.getOrderById(orderId); // TODO: test validations } - /** * Place an order for a pet * @@ -89,10 +92,11 @@ public class StoreApiTest { */ @Test public void placeOrderTest() throws ApiException { - Order order = null; - Order response = api.placeOrder(order); + // + //Order order = null; + // + //Order response = api.placeOrder(order); // TODO: test validations } - } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/UserApiTest.java index 79e0b6b2bb5..6a405a0ae6f 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,14 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; +import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -26,12 +30,10 @@ import java.util.Map; /** * API tests for UserApi */ -@Ignore public class UserApiTest { private final UserApi api = new UserApi(); - /** * Create user * @@ -42,12 +44,13 @@ public class UserApiTest { */ @Test public void createUserTest() throws ApiException { - User user = null; - api.createUser(user); + // + //User user = null; + // + //api.createUser(user); // TODO: test validations } - /** * Creates list of users with given input array * @@ -58,12 +61,13 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() throws ApiException { - List user = null; - api.createUsersWithArrayInput(user); + // + //List user = null; + // + //api.createUsersWithArrayInput(user); // TODO: test validations } - /** * Creates list of users with given input array * @@ -74,12 +78,13 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() throws ApiException { - List user = null; - api.createUsersWithListInput(user); + // + //List user = null; + // + //api.createUsersWithListInput(user); // TODO: test validations } - /** * Delete user * @@ -90,12 +95,13 @@ public class UserApiTest { */ @Test public void deleteUserTest() throws ApiException { - String username = null; - api.deleteUser(username); + // + //String username = null; + // + //api.deleteUser(username); // TODO: test validations } - /** * Get user by user name * @@ -106,12 +112,13 @@ public class UserApiTest { */ @Test public void getUserByNameTest() throws ApiException { - String username = null; - User response = api.getUserByName(username); + // + //String username = null; + // + //User response = api.getUserByName(username); // TODO: test validations } - /** * Logs user into the system * @@ -122,13 +129,15 @@ public class UserApiTest { */ @Test public void loginUserTest() throws ApiException { - String username = null; - String password = null; - String response = api.loginUser(username, password); + // + //String username = null; + // + //String password = null; + // + //String response = api.loginUser(username, password); // TODO: test validations } - /** * Logs out current logged in user session * @@ -139,11 +148,11 @@ public class UserApiTest { */ @Test public void logoutUserTest() throws ApiException { - api.logoutUser(); + // + //api.logoutUser(); // TODO: test validations } - /** * Updated user * @@ -154,11 +163,13 @@ public class UserApiTest { */ @Test public void updateUserTest() throws ApiException { - String username = null; - User user = null; - api.updateUser(username, user); + // + //String username = null; + // + //User user = null; + // + //api.updateUser(username, user); // TODO: test validations } - } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 14fd8022feb..29bc5ae9694 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -18,15 +18,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesClass */ @@ -42,91 +39,19 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapString' + * Test the property 'mapProperty' */ @Test - public void mapStringTest() { - // TODO: test mapString + public void mapPropertyTest() { + // TODO: test mapProperty } /** - * Test the property 'mapNumber' + * Test the property 'mapOfMapProperty' */ @Test - public void mapNumberTest() { - // TODO: test mapNumber - } - - /** - * Test the property 'mapInteger' - */ - @Test - public void mapIntegerTest() { - // TODO: test mapInteger - } - - /** - * Test the property 'mapBoolean' - */ - @Test - public void mapBooleanTest() { - // TODO: test mapBoolean - } - - /** - * Test the property 'mapArrayInteger' - */ - @Test - public void mapArrayIntegerTest() { - // TODO: test mapArrayInteger - } - - /** - * Test the property 'mapArrayAnytype' - */ - @Test - public void mapArrayAnytypeTest() { - // TODO: test mapArrayAnytype - } - - /** - * Test the property 'mapMapString' - */ - @Test - public void mapMapStringTest() { - // TODO: test mapMapString - } - - /** - * Test the property 'mapMapAnytype' - */ - @Test - public void mapMapAnytypeTest() { - // TODO: test mapMapAnytype - } - - /** - * Test the property 'anytype1' - */ - @Test - public void anytype1Test() { - // TODO: test anytype1 - } - - /** - * Test the property 'anytype2' - */ - @Test - public void anytype2Test() { - // TODO: test anytype2 - } - - /** - * Test the property 'anytype3' - */ - @Test - public void anytype3Test() { - // TODO: test anytype3 + public void mapOfMapPropertyTest() { + // TODO: test mapOfMapProperty } } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java new file mode 100644 index 00000000000..dad0e9235de --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -0,0 +1,56 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AllOfWithSingleRef + */ +public class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); + + /** + * Model tests for AllOfWithSingleRef + */ + @Test + public void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + public void singleRefTypeTest() { + // TODO: test singleRefType + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AnimalTest.java index 930e5c17d07..da5609b5489 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,14 +21,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.Cat; -import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Animal */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 57a1c4f37ec..cbc199f1575 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 4f127b838bc..762f9d6dc33 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 5874400602c..20dc34a8c51 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayTest */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 765bd150512..00000000000 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,75 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CapitalizationTest.java index c69ffc12a07..4fd3728ab89 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Capitalization */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CatTest.java index 90fdba14c24..d591bdd30ef 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CatTest.java @@ -22,12 +22,10 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Cat */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CategoryTest.java index 393f73bd5e6..12de38c0c08 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Category */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ClassModelTest.java index 5005bcb800e..d1936d85e81 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ClassModel */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ClientTest.java index bda3b360b74..7aa0f5859ff 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ClientTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Client */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java similarity index 71% rename from samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java rename to samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index f7662d6c469..65fd3cc0b76 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -18,25 +18,22 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesString + * Model tests for DeprecatedObject */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); +public class DeprecatedObjectTest { + private final DeprecatedObject model = new DeprecatedObject(); /** - * Model tests for AdditionalPropertiesString + * Model tests for DeprecatedObject */ @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString + public void testDeprecatedObject() { + // TODO: test DeprecatedObject } /** diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DogTest.java index de77d6711bd..744c8a406fe 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DogTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Dog */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 73206626b9c..694e4196138 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -19,12 +19,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumArrays */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd..3f50e1bfb9e 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumClass */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumTestTest.java index 8907cfa8e8f..0a1fd0f4268 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -19,11 +19,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumTest */ @@ -78,4 +84,28 @@ public class EnumTestTest { // TODO: test outerEnum } + /** + * Test the property 'outerEnumInteger' + */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } + + /** + * Test the property 'outerEnumDefaultValue' + */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + + /** + * Test the property 'outerEnumIntegerDefaultValue' + */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } + } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java similarity index 62% rename from samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java rename to samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java index 10ad938f52c..88c1d374be6 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java @@ -25,27 +25,34 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesNumber + * Model tests for FakeBigDecimalMap200Response */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); +public class FakeBigDecimalMap200ResponseTest { + private final FakeBigDecimalMap200Response model = new FakeBigDecimalMap200Response(); /** - * Model tests for AdditionalPropertiesNumber + * Model tests for FakeBigDecimalMap200Response */ @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber + public void testFakeBigDecimalMap200Response() { + // TODO: test FakeBigDecimalMap200Response } /** - * Test the property 'name' + * Test the property 'someId' */ @Test - public void nameTest() { - // TODO: test name + public void someIdTest() { + // TODO: test someId + } + + /** + * Test the property 'someMap' + */ + @Test + public void someMapTest() { + // TODO: test someMap } } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index 493d84aa1bc..fb8827a1e88 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ModelFile; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FileSchemaTestClass */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java new file mode 100644 index 00000000000..cd15af86ee9 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FooGetDefaultResponse + */ +public class FooGetDefaultResponseTest { + private final FooGetDefaultResponse model = new FooGetDefaultResponse(); + + /** + * Model tests for FooGetDefaultResponse + */ + @Test + public void testFooGetDefaultResponse() { + // TODO: test FooGetDefaultResponse + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FooTest.java new file mode 100644 index 00000000000..2a92367019b --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FooTest.java @@ -0,0 +1,47 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Foo + */ +public class FooTest { + private final Foo model = new Foo(); + + /** + * Model tests for Foo + */ + @Test + public void testFoo() { + // TODO: test Foo + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FormatTestTest.java index 48bec93d994..8a9d3adfc01 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FormatTest */ @@ -90,6 +89,14 @@ public class FormatTestTest { // TODO: test _double } + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + /** * Test the property 'string' */ @@ -147,11 +154,19 @@ public class FormatTestTest { } /** - * Test the property 'bigDecimal' + * Test the property 'patternWithDigits' */ @Test - public void bigDecimalTest() { - // TODO: test bigDecimal + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** + * Test the property 'patternWithDigitsAndDelimiter' + */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter } } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index da9073d4500..bf777b061cc 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for HasOnlyReadOnly */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 00000000000..e96ffaa18f4 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for HealthCheckResult + */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** + * Model tests for HealthCheckResult + */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** + * Test the property 'nullableMessage' + */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/MapTestTest.java index 22c8519472b..50e909f0381 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MapTest */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index f29932e96be..b16858dc17e 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 0cd3f976198..dd90f6799d3 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Model200Response */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index be8cca35e3e..e63f2ae5e9c 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelApiResponse */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelFileTest.java index a0247ae71be..264249edc1c 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelFile */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelListTest.java index 0ead99db3a5..81fd2dcc6a6 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelList */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b6ca02f8d23..5840d4f8f0c 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelReturn */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NameTest.java index 07684c9eb40..9280c171539 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Name */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 00000000000..c79c6366f83 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for NullableClass + */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** + * Model tests for NullableClass + */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** + * Test the property 'integerProp' + */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** + * Test the property 'numberProp' + */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** + * Test the property 'booleanProp' + */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** + * Test the property 'stringProp' + */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** + * Test the property 'dateProp' + */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** + * Test the property 'datetimeProp' + */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** + * Test the property 'arrayNullableProp' + */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** + * Test the property 'arrayAndItemsNullableProp' + */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** + * Test the property 'arrayItemsNullable' + */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** + * Test the property 'objectNullableProp' + */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** + * Test the property 'objectAndItemsNullableProp' + */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** + * Test the property 'objectItemsNullable' + */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 878095093ad..63b5bc0440e 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for NumberOnly */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java similarity index 55% rename from samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java rename to samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index 8c096c188fc..4203b62f784 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -20,64 +20,57 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.DeprecatedObject; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); +public class ObjectWithDeprecatedFieldsTest { + private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault + public void testObjectWithDeprecatedFields() { + // TODO: test ObjectWithDeprecatedFields } /** - * Test the property 'stringItem' + * Test the property 'uuid' */ @Test - public void stringItemTest() { - // TODO: test stringItem + public void uuidTest() { + // TODO: test uuid } /** - * Test the property 'numberItem' + * Test the property 'id' */ @Test - public void numberItemTest() { - // TODO: test numberItem + public void idTest() { + // TODO: test id } /** - * Test the property 'integerItem' + * Test the property 'deprecatedRef' */ @Test - public void integerItemTest() { - // TODO: test integerItem + public void deprecatedRefTest() { + // TODO: test deprecatedRef } /** - * Test the property 'boolItem' + * Test the property 'bars' */ @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem + public void barsTest() { + // TODO: test bars } } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OrderTest.java index f31e10a9df1..e0fbb529af6 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OrderTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Order */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 8b823572e5e..840cf65c8d0 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterComposite */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 00000000000..5b9bae28ec6 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumDefaultValue + */ +public class OuterEnumDefaultValueTest { + /** + * Model tests for OuterEnumDefaultValue + */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 00000000000..731acbf905f --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumIntegerDefaultValue + */ +public class OuterEnumIntegerDefaultValueTest { + /** + * Model tests for OuterEnumIntegerDefaultValue + */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 00000000000..234945cec0f --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumInteger + */ +public class OuterEnumIntegerTest { + /** + * Model tests for OuterEnumInteger + */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf..b312b11a09e 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterEnum */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java similarity index 64% rename from samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java rename to samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java index 41e6497ecee..964d1281b21 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java @@ -18,34 +18,31 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.model.OuterEnumInteger; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesArray + * Model tests for OuterObjectWithEnumProperty */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); +public class OuterObjectWithEnumPropertyTest { + private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty(); /** - * Model tests for AdditionalPropertiesArray + * Model tests for OuterObjectWithEnumProperty */ @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray + public void testOuterObjectWithEnumProperty() { + // TODO: test OuterObjectWithEnumProperty } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/PetTest.java index b48657d0c9a..ca23198fbf1 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/PetTest.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -29,7 +30,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Pet */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index 26356ec2048..b356d6993c5 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ReadOnlyFirst */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 00000000000..920d02c930c --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SingleRefType + */ +public class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + public void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 4e59989875a..8eb0b1bd269 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for SpecialModelName */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TagTest.java index 5aeb2f3f948..6dc0868167c 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TagTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Tag */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index b1655df6165..00000000000 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'floatItem' - */ - @Test - public void floatItemTest() { - // TODO: test floatItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/UserTest.java index e0153a4cf1b..b029d279409 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/UserTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for User */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 4bab95a9126..00000000000 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,275 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNsString' - */ - @Test - public void prefixNsStringTest() { - // TODO: test prefixNsString - } - - /** - * Test the property 'prefixNsNumber' - */ - @Test - public void prefixNsNumberTest() { - // TODO: test prefixNsNumber - } - - /** - * Test the property 'prefixNsInteger' - */ - @Test - public void prefixNsIntegerTest() { - // TODO: test prefixNsInteger - } - - /** - * Test the property 'prefixNsBoolean' - */ - @Test - public void prefixNsBooleanTest() { - // TODO: test prefixNsBoolean - } - - /** - * Test the property 'prefixNsArray' - */ - @Test - public void prefixNsArrayTest() { - // TODO: test prefixNsArray - } - - /** - * Test the property 'prefixNsWrappedArray' - */ - @Test - public void prefixNsWrappedArrayTest() { - // TODO: test prefixNsWrappedArray - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES index c298b2c2941..76a53947ccf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES @@ -5,34 +5,33 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md -docs/BigCat.md docs/Capitalization.md docs/Cat.md docs/Category.md docs/ClassModel.md docs/Client.md +docs/DefaultApi.md +docs/DeprecatedObject.md docs/Dog.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md docs/FakeApi.md +docs/FakeBigDecimalMap200Response.md docs/FakeClassnameTags123Api.md docs/FileSchemaTestClass.md +docs/Foo.md +docs/FooGetDefaultResponse.md docs/FormatTest.md docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -41,21 +40,25 @@ docs/ModelFile.md docs/ModelList.md docs/ModelReturn.md docs/Name.md +docs/NullableClass.md docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md docs/OuterComposite.md docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md docs/User.md docs/UserApi.md -docs/XmlItem.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -71,6 +74,7 @@ src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/api/AnotherFakeApi.java +src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java src/main/java/org/openapitools/client/api/PetApi.java @@ -82,31 +86,29 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/auth/OAuth.java src/main/java/org/openapitools/client/auth/OAuthFlow.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java +src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java +src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +src/main/java/org/openapitools/client/model/Foo.java +src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/client/model/HealthCheckResult.java src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/Model200Response.java @@ -115,15 +117,19 @@ src/main/java/org/openapitools/client/model/ModelFile.java src/main/java/org/openapitools/client/model/ModelList.java src/main/java/org/openapitools/client/model/ModelReturn.java src/main/java/org/openapitools/client/model/Name.java +src/main/java/org/openapitools/client/model/NullableClass.java src/main/java/org/openapitools/client/model/NumberOnly.java +src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/OuterComposite.java src/main/java/org/openapitools/client/model/OuterEnum.java +src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +src/main/java/org/openapitools/client/model/OuterEnumInteger.java +src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/resttemplate-withXml/README.md b/samples/client/petstore/java/resttemplate-withXml/README.md index 1e94e69e786..d450bd82c64 100644 --- a/samples/client/petstore/java/resttemplate-withXml/README.md +++ b/samples/client/petstore/java/resttemplate-withXml/README.md @@ -91,10 +91,9 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(uuidTest, body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -115,15 +114,20 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem +*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | +*FakeApi* | [**fakeBigDecimalMap**](docs/FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | +*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication *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* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | *FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -155,31 +159,29 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [BigCat](docs/BigCat.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) + - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) + - [FakeBigDecimalMap200Response](docs/FakeBigDecimalMap200Response.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - [FormatTest](docs/FormatTest.md) - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -188,18 +190,22 @@ Class | Method | HTTP request | Description - [ModelList](docs/ModelList.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) + - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) - [OuterEnum](docs/OuterEnum.md) + - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OuterEnumInteger](docs/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) @@ -240,6 +246,18 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### bearer_test + + +- **Type**: HTTP Bearer Token authentication (JWT) + + +### http_signature_test + + +- **Type**: HTTP signature authentication + ## Recommendation diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 933d7332521..9f0affe779f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ @@ -9,7 +9,30 @@ info: title: OpenAPI Petstore version: 1.0.0 servers: -- url: http://petstore.swagger.io:80/v2 +- description: petstore server + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: "https://localhost:8080/{version}" + variables: + version: + default: v2 + enum: + - v1 + - v2 +- description: The local server without variables + url: https://127.0.0.1/no_varaible tags: - description: Everything about your Pets name: pet @@ -18,25 +41,26 @@ tags: - description: Operations about user name: user paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/_foo_get_default_response' + description: response + x-accepts: application/json /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,33 +69,21 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json put: + description: "" operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -80,15 +92,34 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body + x-webclient-blocking: true x-content-type: application/json x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -118,7 +149,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: @@ -127,6 +157,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -163,7 +194,6 @@ paths: uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: @@ -172,28 +202,33 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -208,12 +243,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -225,35 +262,38 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/updatePetWithForm_request' responses: + "200": + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -266,15 +306,18 @@ paths: x-accepts: application/json /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -315,13 +358,15 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -337,13 +382,11 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -352,17 +395,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: order_id required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -374,6 +417,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: order_id required: true @@ -382,6 +426,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -393,10 +438,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -408,81 +451,68 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -496,16 +526,19 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -513,10 +546,10 @@ paths: x-accepts: application/json /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -528,31 +561,34 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Delete user tags: - user x-accepts: application/json get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -564,10 +600,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -578,42 +612,36 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -626,7 +654,6 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake: @@ -635,44 +662,60 @@ paths: operationId: testGroupParameters parameters: - description: Required String in group parameters + explode: true in: query name: required_string_group required: true schema: type: integer + style: form - description: Required Boolean in group parameters + explode: false in: header name: required_boolean_group required: true schema: type: boolean + style: simple - description: Required Integer in group parameters + explode: true in: query name: required_int64_group required: true schema: format: int64 type: integer + style: form - description: String in group parameters + explode: true in: query name: string_group + required: false schema: type: integer + style: form - description: Boolean in group parameters + explode: false in: header name: boolean_group + required: false schema: type: boolean + style: simple - description: Integer in group parameters + explode: true in: query name: int64_group + required: false schema: format: int64 type: integer + style: form responses: "400": - content: {} description: Something wrong + security: + - bearer_test: [] summary: Fake endpoint to test group parameters (optional) tags: - fake @@ -686,6 +729,7 @@ paths: explode: false in: header name: enum_header_string_array + required: false schema: items: default: $ @@ -696,8 +740,10 @@ paths: type: array style: simple - description: Header parameter enum test (string) + explode: false in: header name: enum_header_string + required: false schema: default: -efg enum: @@ -705,10 +751,12 @@ paths: - -efg - (xyz) type: string + style: simple - description: Query parameter enum test (string array) - explode: false + explode: true in: query name: enum_query_string_array + required: false schema: items: default: $ @@ -719,8 +767,10 @@ paths: type: array style: form - description: Query parameter enum test (string) + explode: true in: query name: enum_query_string + required: false schema: default: -efg enum: @@ -728,24 +778,40 @@ paths: - -efg - (xyz) type: string + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_integer + required: false schema: enum: - 1 - -2 format: int32 type: integer + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_double + required: false schema: enum: - 1.1 - -1.2 format: double type: number + style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: content: application/x-www-form-urlencoded: @@ -753,10 +819,8 @@ paths: $ref: '#/components/schemas/testEnumParameters_request' responses: "400": - content: {} description: Invalid request "404": - content: {} description: Not found summary: To test enum parameters tags: @@ -767,12 +831,7 @@ paths: description: To test "client" model operationId: testClientModel requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -783,36 +842,32 @@ paths: summary: To test "client" model tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json post: - description: |- + description: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testEndpointParameters_request' - required: true responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found security: - http_basic_test: [] - summary: |- + summary: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-content-type: application/x-www-form-urlencoded @@ -823,11 +878,10 @@ paths: operationId: fakeOuterNumberSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' description: Input number as post body - required: false responses: "200": content: @@ -837,8 +891,29 @@ paths: description: Output number tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/property/enum-int: + post: + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + required: true + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Output enum (int) + tags: + - fake + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -846,11 +921,10 @@ paths: operationId: fakeOuterStringSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' description: Input string as post body - required: false responses: "200": content: @@ -860,8 +934,7 @@ paths: description: Output string tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -869,11 +942,10 @@ paths: operationId: fakeOuterBooleanSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body - required: false responses: "200": content: @@ -883,8 +955,7 @@ paths: description: Output boolean tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -892,11 +963,10 @@ paths: operationId: fakeOuterCompositeSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body - required: false responses: "200": content: @@ -906,21 +976,34 @@ paths: description: Output composite tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/BigDecimalMap: + get: + description: "for Java apache and Java native, test toUrlQueryString for maps\ + \ with BegDecimal keys" + operationId: fakeBigDecimalMap + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/fakeBigDecimalMap_200_response' + description: successful operation + tags: + - fake x-accepts: '*/*' /fake/jsonFormData: get: + description: "" operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testJsonFormData_request' - required: true responses: "200": - content: {} description: successful operation summary: test json serialization of form data tags: @@ -929,6 +1012,7 @@ paths: x-accepts: application/json /fake/inline-additionalProperties: post: + description: "" operationId: testInlineAdditionalProperties requestBody: content: @@ -941,23 +1025,23 @@ paths: required: true responses: "200": - content: {} description: successful operation summary: test inline additionalProperties tags: - fake - x-codegen-request-body-name: param x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams parameters: - - in: query + - explode: true + in: query name: query required: true schema: type: string + style: form requestBody: content: application/json: @@ -966,68 +1050,17 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: application/json /another-fake/dummy: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags - parameters: - - description: to test uuid example value - in: header - name: uuid_test - required: true - schema: - format: uuid - type: string requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -1038,12 +1071,11 @@ paths: summary: To test special tags tags: - $another-fake? - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: - description: "For this test, the body for this request much reference a schema\ + description: "For this test, the body for this request must reference a schema\ \ named `File`." operationId: testBodyWithFileSchema requestBody: @@ -1054,13 +1086,31 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json + /fake/body-with-binary: + put: + description: "For this test, the body has to be a binary file." + operationId: testBodyWithBinary + requestBody: + content: + image/png: + schema: + format: binary + nullable: true + type: string + description: image to upload + required: true + responses: + "200": + description: Success + tags: + - fake + x-content-type: image/png + x-accepts: application/json /fake/test-query-parameters: put: description: To test the collection format in query parameters @@ -1074,15 +1124,18 @@ paths: items: type: string type: array - style: form - - in: query + style: pipeDelimited + - explode: false + in: query name: ioutil required: true schema: items: type: string type: array - - in: query + style: form + - explode: false + in: query name: http required: true schema: @@ -1108,30 +1161,49 @@ paths: type: string type: array style: form + - explode: true + in: query + name: language + required: false + schema: + additionalProperties: + format: string + type: string + type: object + style: form + - allowEmptyValue: true + explode: true + in: query + name: allowEmpty + required: true + schema: + type: string + style: form responses: "200": - content: {} description: Success tags: - fake x-accepts: application/json /fake/{petId}/uploadImageWithRequiredFile: post: + description: "" operationId: uploadFileWithRequiredFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - required: true responses: "200": content: @@ -1148,8 +1220,91 @@ paths: - pet x-content-type: multipart/form-data x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string Order: example: petId: 6 @@ -1315,21 +1470,12 @@ components: message: type: string type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" Return: description: Model for testing reserved words properties: return: format: int32 type: integer - type: object xml: name: Return Name: @@ -1349,7 +1495,6 @@ components: type: integer required: - name - type: object xml: name: Name "200_response": @@ -1360,7 +1505,6 @@ components: type: integer class: type: string - type: object xml: name: Name ClassModel: @@ -1368,7 +1512,6 @@ components: properties: _class: type: string - type: object Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -1383,20 +1526,11 @@ components: declawed: type: boolean type: object - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object Animal: discriminator: + mapping: + DOG: '#/components/schemas/Dog' + CAT: '#/components/schemas/Cat' propertyName: className properties: className: @@ -1439,12 +1573,14 @@ components: maximum: 123.4 minimum: 67.8 type: number + decimal: + format: number + type: string string: pattern: "/[a-z]/i" type: string byte: format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" type: string binary: format: binary @@ -1464,8 +1600,14 @@ components: maxLength: 64 minLength: 10 type: string - BigDecimal: - format: number + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: "^\\d{10}$" + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: "/^image_\\d{1,3}$/i" type: string required: - byte @@ -1508,117 +1650,27 @@ components: type: number outerEnum: $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' required: - enum_string_required type: object AdditionalPropertiesClass: properties: - map_string: + map_property: additionalProperties: type: string type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: + map_of_map_property: additionalProperties: additionalProperties: type: string type: object type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -1708,6 +1760,8 @@ components: array_of_string: items: type: string + maxItems: 3 + minItems: 0 type: array array_array_of_integer: items: @@ -1764,7 +1818,29 @@ components: - placed - approved - delivered + nullable: true type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + example: 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer OuterComposite: example: my_string: my_string @@ -1814,243 +1890,133 @@ components: description: Test capitalization type: string type: object - TypeHolderDefault: + _special_model.name_: properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: + $special[property.name]: + format: int64 type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object xml: - namespace: http://a.com/schema - prefix: pre + name: "$special[model.name]" + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + OuterObjectWithEnumProperty: + example: + value: 2 + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + required: + - value + type: object + DeprecatedObject: + deprecated: true + properties: + name: + type: string + type: object + ObjectWithDeprecatedFields: + properties: + uuid: + type: string + id: + deprecated: true + type: number + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + deprecated: true + items: + $ref: '#/components/schemas/Bar' + type: array + type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string + _foo_get_default_response: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + type: object updatePetWithForm_request: properties: name: @@ -2094,7 +2060,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -2163,6 +2128,19 @@ components: - number - pattern_without_delimiter type: object + fakeBigDecimalMap_200_response: + example: + someId: 0.8008281904610115 + someMap: + key: 6.027456183070403 + properties: + someId: + type: number + someMap: + additionalProperties: + type: number + type: object + type: object testJsonFormData_request: properties: param: @@ -2207,5 +2185,11 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: "2.0" + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md index 79402f75c68..fe69a56eebf 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AdditionalPropertiesClass.md @@ -7,17 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mapString** | **Map<String, String>** | | [optional] | -|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | -|**mapInteger** | **Map<String, Integer>** | | [optional] | -|**mapBoolean** | **Map<String, Boolean>** | | [optional] | -|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | -|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | -|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | -|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | -|**anytype1** | **Object** | | [optional] | -|**anytype2** | **Object** | | [optional] | -|**anytype3** | **Object** | | [optional] | +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/resttemplate-withXml/docs/AllOfWithSingleRef.md new file mode 100644 index 00000000000..4146d56a372 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | **SingleRefType** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md index e2b1f04ce7f..73c966d2d54 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(uuidTest, body) +> Client call123testSpecialTags(client) To test special tags @@ -32,10 +32,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(uuidTest, body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -53,8 +52,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **uuidTest** | **UUID**| to test uuid example value | | -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/DefaultApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/DefaultApi.md new file mode 100644 index 00000000000..2c56e1f90e5 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/DefaultApi.md @@ -0,0 +1,69 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | + + + +## fooGet + +> FooGetDefaultResponse fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + FooGetDefaultResponse result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/DeprecatedObject.md b/samples/client/petstore/java/resttemplate-withXml/docs/DeprecatedObject.md new file mode 100644 index 00000000000..48de1d62442 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md index bf2def484c6..380a2aef0bc 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/EnumTest.md @@ -12,6 +12,9 @@ |**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | |**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | |**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 627366e41db..6eb12aee357 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -4,15 +4,19 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeBigDecimalMap**](FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | | +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | | [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | | [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | -| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | | [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | @@ -21,13 +25,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -## createXmlItem +## fakeBigDecimalMap -> createXmlItem(xmlItem) +> FakeBigDecimalMap200Response fakeBigDecimalMap() -creates an XmlItem -this route creates an XmlItem + +for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys ### Example @@ -45,11 +49,135 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - apiInstance.createXmlItem(xmlItem); + FakeBigDecimalMap200Response result = apiInstance.fakeBigDecimalMap(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeBigDecimalMap"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## fakeHealthGet + +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + HealthCheckResult result = apiInstance.fakeHealthGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeHttpSignatureTest + +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + apiInstance.fakeHttpSignatureTest(pet, query1, header1); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -64,7 +192,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | ### Return type @@ -72,18 +202,18 @@ null (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Content-Type**: application/json, application/xml - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | ## fakeOuterBooleanSerialize @@ -142,7 +272,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -154,7 +284,7 @@ No authorization required ## fakeOuterCompositeSerialize -> OuterComposite fakeOuterCompositeSerialize(body) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -176,9 +306,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -196,7 +326,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -208,7 +338,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -274,7 +404,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -340,7 +470,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -350,13 +480,13 @@ No authorization required | **200** | Output string | - | -## testBodyWithFileSchema +## fakePropertyEnumIntegerSerialize -> testBodyWithFileSchema(body) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) -For this test, the body for this request much reference a schema named `File`. +Test serialization of enum (int) properties with examples ### Example @@ -374,9 +504,140 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - apiInstance.testBodyWithFileSchema(body); + OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + + +## testBodyWithBinary + +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + File body = new File("/path/to/file"); // File | image to upload + try { + apiInstance.testBodyWithBinary(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testBodyWithFileSchema + +> testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(fileSchemaTestClass); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -393,7 +654,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -417,7 +678,7 @@ No authorization required ## testBodyWithQueryParams -> testBodyWithQueryParams(query, body) +> testBodyWithQueryParams(query, user) @@ -438,9 +699,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - apiInstance.testBodyWithQueryParams(query, body); + apiInstance.testBodyWithQueryParams(query, user); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -458,7 +719,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -482,7 +743,7 @@ No authorization required ## testClientModel -> Client testClientModel(body) +> Client testClientModel(client) To test \"client\" model @@ -504,9 +765,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClientModel(body); + Client result = apiInstance.testClientModel(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -524,7 +785,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -550,9 +811,9 @@ No authorization required > 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 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -646,7 +907,7 @@ null (empty response body) ## testEnumParameters -> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -674,10 +935,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -700,6 +962,7 @@ public class Example { | **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] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -739,6 +1002,7 @@ Fake endpoint to test group parameters (optional) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; @@ -746,6 +1010,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -785,7 +1053,7 @@ null (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -801,10 +1069,12 @@ No authorization required ## testInlineAdditionalProperties -> testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(requestBody) test inline additionalProperties + + ### Example ```java @@ -821,9 +1091,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - apiInstance.testInlineAdditionalProperties(param); + apiInstance.testInlineAdditionalProperties(requestBody); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -840,7 +1110,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -868,6 +1138,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -929,7 +1201,7 @@ No authorization required ## testQueryParameterCollectionFormat -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -956,8 +1228,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); @@ -979,6 +1253,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeBigDecimalMap200Response.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeBigDecimalMap200Response.md new file mode 100644 index 00000000000..475be1d2d73 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeBigDecimalMap200Response.md @@ -0,0 +1,14 @@ + + +# FakeBigDecimalMap200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**someId** | **BigDecimal** | | [optional] | +|**someMap** | **Map<String, BigDecimal>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md index 10d5ea30aa2..e4ff70ed909 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeClassnameTags123Api.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## testClassname -> Client testClassname(body) +> Client testClassname(client) To test class name in snake case @@ -39,9 +39,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClassname(body); + Client result = apiInstance.testClassname(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); @@ -59,7 +59,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/Foo.md b/samples/client/petstore/java/resttemplate-withXml/docs/Foo.md new file mode 100644 index 00000000000..6b3f0556528 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/resttemplate-withXml/docs/FooGetDefaultResponse.md new file mode 100644 index 00000000000..ff3d7a3a56c --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FooGetDefaultResponse.md @@ -0,0 +1,13 @@ + + +# FooGetDefaultResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md b/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md index 9c68c3080e1..01b8c777ae0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FormatTest.md @@ -13,6 +13,7 @@ |**number** | **BigDecimal** | | | |**_float** | **Float** | | [optional] | |**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | |**string** | **String** | | [optional] | |**_byte** | **byte[]** | | | |**binary** | **File** | | [optional] | @@ -20,7 +21,8 @@ |**dateTime** | **OffsetDateTime** | | [optional] | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | -|**bigDecimal** | **BigDecimal** | | [optional] | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/HealthCheckResult.md b/samples/client/petstore/java/resttemplate-withXml/docs/HealthCheckResult.md new file mode 100644 index 00000000000..4885e6f1cad --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/NullableClass.md b/samples/client/petstore/java/resttemplate-withXml/docs/NullableClass.md new file mode 100644 index 00000000000..fa98c5c6d98 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/resttemplate-withXml/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 00000000000..f1cf571f4c0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumDefaultValue.md new file mode 100644 index 00000000000..cbc7f4ba54d --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumInteger.md b/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumInteger.md new file mode 100644 index 00000000000..f71dea30ad0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 00000000000..99e6389f427 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/resttemplate-withXml/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 00000000000..0fafaaa2715 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,13 @@ + + +# OuterObjectWithEnumProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md index 1e79e30ef6c..e2515d9bb9b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md @@ -18,10 +18,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## addPet -> addPet(body) +> addPet(pet) Add a new pet to the store + + ### Example ```java @@ -43,9 +45,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.addPet(body); + apiInstance.addPet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -62,7 +64,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -81,7 +83,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -91,6 +93,8 @@ null (empty response body) Deletes a pet + + ### Example ```java @@ -152,7 +156,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | @@ -377,10 +381,12 @@ public class Example { ## updatePet -> updatePet(body) +> updatePet(pet) Update an existing pet + + ### Example ```java @@ -402,9 +408,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -421,7 +427,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -440,7 +446,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | @@ -452,6 +458,8 @@ null (empty response body) Updates a pet in the store with form data + + ### Example ```java @@ -515,6 +523,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -524,6 +533,8 @@ null (empty response body) uploads an image + + ### Example ```java @@ -597,6 +608,8 @@ public class Example { uploads an image (required) + + ### Example ```java diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/SingleRefType.md b/samples/client/petstore/java/resttemplate-withXml/docs/SingleRefType.md new file mode 100644 index 00000000000..cc269bb871f --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md index b64e208a83a..ce91137cc6f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md @@ -216,10 +216,12 @@ No authorization required ## placeOrder -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet + + ### Example ```java @@ -236,9 +238,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - Order result = apiInstance.placeOrder(body); + Order result = apiInstance.placeOrder(order); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); @@ -256,7 +258,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -268,7 +270,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md index dfdb4a7c0eb..305fd6e66df 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/UserApi.md @@ -17,7 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## createUser -> createUser(body) +> createUser(user) Create user @@ -39,9 +39,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -58,7 +58,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -70,7 +70,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -82,10 +82,12 @@ No authorization required ## createUsersWithArrayInput -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(user) Creates list of users with given input array + + ### Example ```java @@ -102,9 +104,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -121,7 +123,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -133,7 +135,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -145,10 +147,12 @@ No authorization required ## createUsersWithListInput -> createUsersWithListInput(body) +> createUsersWithListInput(user) Creates list of users with given input array + + ### Example ```java @@ -165,9 +169,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -184,7 +188,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -196,7 +200,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -278,6 +282,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -344,6 +350,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -411,6 +419,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -466,7 +476,7 @@ No authorization required ## updateUser -> updateUser(username, body) +> updateUser(username, user) Updated user @@ -489,9 +499,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - apiInstance.updateUser(username, body); + apiInstance.updateUser(username, user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); @@ -509,7 +519,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -521,7 +531,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java index 4d3d63d9652..66e62a9a78f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java @@ -60,6 +60,7 @@ import java.time.OffsetDateTime; import org.openapitools.client.auth.Authentication; import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.ApiKeyAuth; import org.openapitools.client.auth.OAuth; @@ -119,6 +120,7 @@ public class ApiClient extends JavaTimeFormatter { authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); authentications.put("http_basic_test", new HttpBasicAuth()); + authentications.put("bearer_test", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -162,6 +164,21 @@ public class ApiClient extends JavaTimeFormatter { return authentications.get(authName); } + /** + * Helper method to set token for HTTP bearer authentication. + * + * @param bearerToken the token + */ + public void setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + /** * Helper method to set username for the first HTTP basic authentication. diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 6c611d3a66e..8854c9af946 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -3,7 +3,6 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; -import java.util.UUID; import java.util.Collections; import java.util.HashMap; @@ -50,35 +49,28 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client call123testSpecialTags(UUID uuidTest, Client body) throws RestClientException { - return call123testSpecialTagsWithHttpInfo(uuidTest, body).getBody(); + public Client call123testSpecialTags(Client client) throws RestClientException { + return call123testSpecialTagsWithHttpInfo(client).getBody(); } /** * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity call123testSpecialTagsWithHttpInfo(Client client) throws RestClientException { + Object localVarPostBody = client; - // verify the required parameter 'uuidTest' is set - if (uuidTest == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling call123testSpecialTags"); + // verify the required parameter 'client' is set + if (client == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'client' when calling call123testSpecialTags"); } @@ -87,9 +79,6 @@ public class AnotherFakeApi { final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); - if (uuidTest != null) - localVarHeaderParams.add("uuid_test", apiClient.parameterToString(uuidTest)); - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 00000000000..025bc870fba --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,87 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.FooGetDefaultResponse; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private ApiClient apiClient; + + public DefaultApi() { + this(new ApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + *

0 - response + * @return FooGetDefaultResponse + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public FooGetDefaultResponse fooGet() throws RestClientException { + return fooGetWithHttpInfo().getBody(); + } + + /** + * + * + *

0 - response + * @return ResponseEntity<FooGetDefaultResponse> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fooGetWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/foo", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index 5e074c80d11..ea18b45cd97 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -4,13 +4,17 @@ import org.openapitools.client.ApiClient; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import java.util.Collections; import java.util.HashMap; @@ -54,30 +58,112 @@ public class FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys *

200 - successful operation - * @param xmlItem XmlItem Body (required) + * @return FakeBigDecimalMap200Response * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createXmlItem(XmlItem xmlItem) throws RestClientException { - createXmlItemWithHttpInfo(xmlItem); + public FakeBigDecimalMap200Response fakeBigDecimalMap() throws RestClientException { + return fakeBigDecimalMapWithHttpInfo().getBody(); } /** - * creates an XmlItem - * this route creates an XmlItem + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys *

200 - successful operation - * @param xmlItem XmlItem Body (required) + * @return ResponseEntity<FakeBigDecimalMap200Response> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeBigDecimalMapWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "*/*" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/BigDecimalMap", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Health check endpoint + * + *

200 - The instance started successfully + * @return HealthCheckResult + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public HealthCheckResult fakeHealthGet() throws RestClientException { + return fakeHealthGetWithHttpInfo().getBody(); + } + + /** + * Health check endpoint + * + *

200 - The instance started successfully + * @return ResponseEntity<HealthCheckResult> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeHealthGetWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/health", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * test http signature authentication + * + *

200 - The instance started successfully + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws RestClientException { + fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); + } + + /** + * test http signature authentication + * + *

200 - The instance started successfully + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createXmlItemWithHttpInfo(XmlItem xmlItem) throws RestClientException { - Object localVarPostBody = xmlItem; + public ResponseEntity fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) throws RestClientException { + Object localVarPostBody = pet; - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xmlItem' when calling createXmlItem"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); } @@ -86,17 +172,23 @@ public class FakeApi { final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "query_1", query1)); + + + if (header1 != null) + localVarHeaderParams.add("header_1", apiClient.parameterToString(header1)); + final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" + "application/json", "application/xml" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "http_signature_test" }; ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI("/fake/create_xml_item", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + return apiClient.invokeAPI("/fake/http-signature-test", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); } /** * @@ -131,7 +223,9 @@ public class FakeApi { "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -143,24 +237,24 @@ public class FakeApi { * * Test serialization of object with outer number type *

200 - Output composite - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return OuterComposite * @throws RestClientException if an error occurs while attempting to invoke the API */ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws RestClientException { - return fakeOuterCompositeSerializeWithHttpInfo(body).getBody(); + public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws RestClientException { + return fakeOuterCompositeSerializeWithHttpInfo(outerComposite).getBody(); } /** * * Test serialization of object with outer number type *

200 - Output composite - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return ResponseEntity<OuterComposite> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws RestClientException { + Object localVarPostBody = outerComposite; final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); @@ -172,7 +266,9 @@ public class FakeApi { "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -213,7 +309,9 @@ public class FakeApi { "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -254,7 +352,9 @@ public class FakeApi { "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -264,29 +364,122 @@ public class FakeApi { } /** * - * For this test, the body for this request much reference a schema named `File`. - *

200 - Success - * @param body (required) + * Test serialization of enum (int) properties with examples + *

200 - Output enum (int) + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return OuterObjectWithEnumProperty * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testBodyWithFileSchema(FileSchemaTestClass body) throws RestClientException { - testBodyWithFileSchemaWithHttpInfo(body); + public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { + return fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty).getBody(); } /** * - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples + *

200 - Output enum (int) + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return ResponseEntity<OuterObjectWithEnumProperty> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { + Object localVarPostBody = outerObjectWithEnumProperty; + + // verify the required parameter 'outerObjectWithEnumProperty' is set + if (outerObjectWithEnumProperty == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize"); + } + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "*/*" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/property/enum-int", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * + * For this test, the body has to be a binary file. *

200 - Success - * @param body (required) + * @param body image to upload (required) + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void testBodyWithBinary(File body) throws RestClientException { + testBodyWithBinaryWithHttpInfo(body); + } + + /** + * + * For this test, the body has to be a binary file. + *

200 - Success + * @param body image to upload (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws RestClientException { + public ResponseEntity testBodyWithBinaryWithHttpInfo(File body) throws RestClientException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testBodyWithFileSchema"); + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testBodyWithBinary"); + } + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "image/png" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/body-with-binary", HttpMethod.PUT, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * + * For this test, the body for this request must reference a schema named `File`. + *

200 - Success + * @param fileSchemaTestClass (required) + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws RestClientException { + testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + *

200 - Success + * @param fileSchemaTestClass (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws RestClientException { + Object localVarPostBody = fileSchemaTestClass; + + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); } @@ -312,11 +505,11 @@ public class FakeApi { * *

200 - Success * @param query (required) - * @param body (required) + * @param user (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testBodyWithQueryParams(String query, User body) throws RestClientException { - testBodyWithQueryParamsWithHttpInfo(query, body); + public void testBodyWithQueryParams(String query, User user) throws RestClientException { + testBodyWithQueryParamsWithHttpInfo(query, user); } /** @@ -324,21 +517,21 @@ public class FakeApi { * *

200 - Success * @param query (required) - * @param body (required) + * @param user (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, User body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, User user) throws RestClientException { + Object localVarPostBody = user; // verify the required parameter 'query' is set if (query == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testBodyWithQueryParams"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); } @@ -366,28 +559,28 @@ public class FakeApi { * To test \"client\" model * To test \"client\" model *

200 - successful operation - * @param body client model (required) + * @param client client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client testClientModel(Client body) throws RestClientException { - return testClientModelWithHttpInfo(body).getBody(); + public Client testClientModel(Client client) throws RestClientException { + return testClientModelWithHttpInfo(client).getBody(); } /** * To test \"client\" model * To test \"client\" model *

200 - successful operation - * @param body client model (required) + * @param client client model (required) * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testClientModelWithHttpInfo(Client body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity testClientModelWithHttpInfo(Client client) throws RestClientException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testClientModel"); + // verify the required parameter 'client' is set + if (client == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'client' when calling testClientModel"); } @@ -411,8 +604,8 @@ public class FakeApi { return apiClient.invokeAPI("/fake", HttpMethod.PATCH, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

400 - Invalid username supplied *

404 - User not found * @param number None (required) @@ -436,8 +629,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

400 - Invalid username supplied *

404 - User not found * @param number None (required) @@ -538,12 +731,13 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { - testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws RestClientException { + testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } /** @@ -557,12 +751,13 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { + public ResponseEntity testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws RestClientException { Object localVarPostBody = null; @@ -571,10 +766,11 @@ public class FakeApi { final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); - localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_string", enumQueryString)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_integer", enumQueryInteger)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_double", enumQueryDouble)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "enum_query_model_array", enumQueryModelArray)); if (enumHeaderStringArray != null) @@ -668,7 +864,7 @@ public class FakeApi { final String[] localVarContentTypes = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "bearer_test" }; ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/fake", HttpMethod.DELETE, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); @@ -677,27 +873,27 @@ public class FakeApi { * test inline additionalProperties * *

200 - successful operation - * @param param request body (required) + * @param requestBody request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testInlineAdditionalProperties(Map param) throws RestClientException { - testInlineAdditionalPropertiesWithHttpInfo(param); + public void testInlineAdditionalProperties(Map requestBody) throws RestClientException { + testInlineAdditionalPropertiesWithHttpInfo(requestBody); } /** * test inline additionalProperties * *

200 - successful operation - * @param param request body (required) + * @param requestBody request body (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map param) throws RestClientException { - Object localVarPostBody = param; + public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) throws RestClientException { + Object localVarPostBody = requestBody; - // verify the required parameter 'param' is set - if (param == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"); + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); } @@ -784,10 +980,12 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws RestClientException { - testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws RestClientException { + testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language); } /** @@ -799,10 +997,12 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws RestClientException { + public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'pipe' is set @@ -830,17 +1030,24 @@ public class FakeApi { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); } + // verify the required parameter 'allowEmpty' is set + if (allowEmpty == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat"); + } + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); final HttpHeaders localVarHeaderParams = new HttpHeaders(); final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); - localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "pipe", pipe)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("pipes".toUpperCase(Locale.ROOT)), "pipe", pipe)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "ioutil", ioutil)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("ssv".toUpperCase(Locale.ROOT)), "http", http)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "url", url)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "context", context)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "language", language)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "allowEmpty", allowEmpty)); final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 6744a0f8826..c4970bdf15a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -49,28 +49,28 @@ public class FakeClassnameTags123Api { * To test class name in snake case * To test class name in snake case *

200 - successful operation - * @param body client model (required) + * @param client client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client testClassname(Client body) throws RestClientException { - return testClassnameWithHttpInfo(body).getBody(); + public Client testClassname(Client client) throws RestClientException { + return testClassnameWithHttpInfo(client).getBody(); } /** * To test class name in snake case * To test class name in snake case *

200 - successful operation - * @param body client model (required) + * @param client client model (required) * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testClassnameWithHttpInfo(Client body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity testClassnameWithHttpInfo(Client client) throws RestClientException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testClassname"); + // verify the required parameter 'client' is set + if (client == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'client' when calling testClassname"); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java index 1f5ad5f5e9b..75b0825e2e5 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java @@ -51,30 +51,30 @@ public class PetApi { /** * Add a new pet to the store * - *

200 - successful operation + *

200 - Successful operation *

405 - Invalid input - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void addPet(Pet body) throws RestClientException { - addPetWithHttpInfo(body); + public void addPet(Pet pet) throws RestClientException { + addPetWithHttpInfo(pet); } /** * Add a new pet to the store * - *

200 - successful operation + *

200 - Successful operation *

405 - Invalid input - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + Object localVarPostBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling addPet"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pet' when calling addPet"); } @@ -98,7 +98,7 @@ public class PetApi { /** * Deletes a pet * - *

200 - successful operation + *

200 - Successful operation *

400 - Invalid pet value * @param petId Pet id to delete (required) * @param apiKey (optional) @@ -111,7 +111,7 @@ public class PetApi { /** * Deletes a pet * - *

200 - successful operation + *

200 - Successful operation *

400 - Invalid pet value * @param petId Pet id to delete (required) * @param apiKey (optional) @@ -310,34 +310,34 @@ public class PetApi { /** * Update an existing pet * - *

200 - successful operation + *

200 - Successful operation *

400 - Invalid ID supplied *

404 - Pet not found *

405 - Validation exception - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePet(Pet body) throws RestClientException { - updatePetWithHttpInfo(body); + public void updatePet(Pet pet) throws RestClientException { + updatePetWithHttpInfo(pet); } /** * Update an existing pet * - *

200 - successful operation + *

200 - Successful operation *

400 - Invalid ID supplied *

404 - Pet not found *

405 - Validation exception - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithHttpInfo(Pet body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientException { + Object localVarPostBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updatePet"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pet' when calling updatePet"); } @@ -361,6 +361,7 @@ public class PetApi { /** * Updates a pet in the store with form data * + *

200 - Successful operation *

405 - Invalid input * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) @@ -374,6 +375,7 @@ public class PetApi { /** * Updates a pet in the store with form data * + *

200 - Successful operation *

405 - Invalid input * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java index 2ece51a779c..ba2b8643176 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java @@ -190,12 +190,12 @@ public class StoreApi { * *

200 - successful operation *

400 - Invalid Order - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order placeOrder(Order body) throws RestClientException { - return placeOrderWithHttpInfo(body).getBody(); + public Order placeOrder(Order order) throws RestClientException { + return placeOrderWithHttpInfo(order).getBody(); } /** @@ -203,16 +203,16 @@ public class StoreApi { * *

200 - successful operation *

400 - Invalid Order - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity placeOrderWithHttpInfo(Order body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity placeOrderWithHttpInfo(Order order) throws RestClientException { + Object localVarPostBody = order; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling placeOrder"); + // verify the required parameter 'order' is set + if (order == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'order' when calling placeOrder"); } @@ -225,7 +225,9 @@ public class StoreApi { "application/xml", "application/json" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java index 749e18012fc..72054f302d6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java @@ -50,27 +50,27 @@ public class UserApi { * Create user * This can only be done by the logged in user. *

0 - successful operation - * @param body Created user object (required) + * @param user Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUser(User body) throws RestClientException { - createUserWithHttpInfo(body); + public void createUser(User user) throws RestClientException { + createUserWithHttpInfo(user); } /** * Create user * This can only be done by the logged in user. *

0 - successful operation - * @param body Created user object (required) + * @param user Created user object (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUserWithHttpInfo(User body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity createUserWithHttpInfo(User user) throws RestClientException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling createUser"); } @@ -81,7 +81,9 @@ public class UserApi { final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -93,27 +95,27 @@ public class UserApi { * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object (required) + * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithArrayInput(List body) throws RestClientException { - createUsersWithArrayInputWithHttpInfo(body); + public void createUsersWithArrayInput(List user) throws RestClientException { + createUsersWithArrayInputWithHttpInfo(user); } /** * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object (required) + * @param user List of user object (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithArrayInputWithHttpInfo(List body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity createUsersWithArrayInputWithHttpInfo(List user) throws RestClientException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); } @@ -124,7 +126,9 @@ public class UserApi { final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -136,27 +140,27 @@ public class UserApi { * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object (required) + * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithListInput(List body) throws RestClientException { - createUsersWithListInputWithHttpInfo(body); + public void createUsersWithListInput(List user) throws RestClientException { + createUsersWithListInputWithHttpInfo(user); } /** * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object (required) + * @param user List of user object (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithListInputWithHttpInfo(List body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity createUsersWithListInputWithHttpInfo(List user) throws RestClientException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createUsersWithListInput"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling createUsersWithListInput"); } @@ -167,7 +171,9 @@ public class UserApi { final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -377,11 +383,11 @@ public class UserApi { *

400 - Invalid user supplied *

404 - User not found * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updateUser(String username, User body) throws RestClientException { - updateUserWithHttpInfo(username, body); + public void updateUser(String username, User user) throws RestClientException { + updateUserWithHttpInfo(username, user); } /** @@ -390,21 +396,21 @@ public class UserApi { *

400 - Invalid user supplied *

404 - User not found * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updateUserWithHttpInfo(String username, User body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity updateUserWithHttpInfo(String username, User user) throws RestClientException { + Object localVarPostBody = user; // verify the required parameter 'username' is set if (username == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'username' when calling updateUser"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updateUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling updateUser"); } // create path and map variables @@ -418,7 +424,9 @@ public class UserApi { final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 43a2a35b5a4..44aa3f9511d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -20,9 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -35,479 +33,104 @@ import io.github.threetenjaxb.core.*; * AdditionalPropertiesClass */ @JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @XmlRootElement(name = "AdditionalPropertiesClass") @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "AdditionalPropertiesClass") public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=String @XmlElement(name = "inner") - private Map mapString = new HashMap<>(); + private Map mapProperty = new HashMap<>(); - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - // Is a container wrapped=false - // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= - // items.example= items.type=BigDecimal - @XmlElement(name = "inner") - private Map mapNumber = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - // Is a container wrapped=false - // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= - // items.example= items.type=Integer - @XmlElement(name = "inner") - private Map mapInteger = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - // Is a container wrapped=false - // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= - // items.example= items.type=Boolean - @XmlElement(name = "inner") - private Map mapBoolean = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - // Is a container wrapped=false - // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= - // items.example= items.type=List<Integer> - @XmlElement(name = "inner") - private Map> mapArrayInteger = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - // Is a container wrapped=false - // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= - // items.example= items.type=List<Object> - @XmlElement(name = "inner") - private Map> mapArrayAnytype = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; + public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; // Is a container wrapped=false // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= // items.example= items.type=Map<String, String> @XmlElement(name = "inner") - private Map> mapMapString = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - // Is a container wrapped=false - // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= - // items.example= items.type=Map<String, Object> - @XmlElement(name = "inner") - private Map> mapMapAnytype = new HashMap<>(); - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - @XmlElement(name = "anytype_1") - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - @XmlElement(name = "anytype_2") - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - @XmlElement(name = "anytype_3") - private Object anytype3; + private Map> mapOfMapProperty = new HashMap<>(); public AdditionalPropertiesClass() { } - public AdditionalPropertiesClass mapString(Map mapString) { + public AdditionalPropertiesClass mapProperty(Map mapProperty) { - this.mapString = mapString; + this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); } - this.mapString.put(key, mapStringItem); + this.mapProperty.put(key, mapPropertyItem); return this; } /** - * Get mapString - * @return mapString + * Get mapProperty + * @return mapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_string") + @JacksonXmlProperty(localName = "map_property") @JacksonXmlElementWrapper(useWrapping = false) - public Map getMapString() { - return mapString; + public Map getMapProperty() { + return mapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_string") + @JacksonXmlProperty(localName = "map_property") @JacksonXmlElementWrapper(useWrapping = false) - public void setMapString(Map mapString) { - this.mapString = mapString; + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { - this.mapNumber = mapNumber; + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); } - this.mapNumber.put(key, mapNumberItem); + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; } /** - * Get mapNumber - * @return mapNumber + * Get mapOfMapProperty + * @return mapOfMapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_number") + @JacksonXmlProperty(localName = "map_of_map_property") @JacksonXmlElementWrapper(useWrapping = false) - public Map getMapNumber() { - return mapNumber; + public Map> getMapOfMapProperty() { + return mapOfMapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_number") + @JacksonXmlProperty(localName = "map_of_map_property") @JacksonXmlElementWrapper(useWrapping = false) - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_integer") - @JacksonXmlElementWrapper(useWrapping = false) - - public Map getMapInteger() { - return mapInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_integer") - @JacksonXmlElementWrapper(useWrapping = false) - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_boolean") - @JacksonXmlElementWrapper(useWrapping = false) - - public Map getMapBoolean() { - return mapBoolean; - } - - - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_boolean") - @JacksonXmlElementWrapper(useWrapping = false) - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_array_integer") - @JacksonXmlElementWrapper(useWrapping = false) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_array_integer") - @JacksonXmlElementWrapper(useWrapping = false) - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_array_anytype") - @JacksonXmlElementWrapper(useWrapping = false) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_array_anytype") - @JacksonXmlElementWrapper(useWrapping = false) - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_map_string") - @JacksonXmlElementWrapper(useWrapping = false) - - public Map> getMapMapString() { - return mapMapString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_map_string") - @JacksonXmlElementWrapper(useWrapping = false) - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_map_anytype") - @JacksonXmlElementWrapper(useWrapping = false) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "map_map_anytype") - @JacksonXmlElementWrapper(useWrapping = false) - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "anytype_1") - - public Object getAnytype1() { - return anytype1; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "anytype_1") - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "anytype_2") - - public Object getAnytype2() { - return anytype2; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "anytype_2") - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "anytype_3") - - public Object getAnytype3() { - return anytype3; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "anytype_3") - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; } @Override @@ -519,39 +142,21 @@ public class AdditionalPropertiesClass { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapProperty, mapOfMapProperty); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 00000000000..829523bbc9a --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,149 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "AllOfWithSingleRef") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "AllOfWithSingleRef") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + @XmlElement(name = "username") + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + @XmlElement(name = "SingleRefType") + private SingleRefType singleRefType; + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "username") + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "username") + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "SingleRefType") + + public SingleRefType getSingleRefType() { + return singleRefType; + } + + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "SingleRefType") + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java index 5d517bd7302..ede692bdfe9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Animal.java @@ -44,9 +44,8 @@ import io.github.threetenjaxb.core.*; ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Cat.class, name = "CAT"), + @JsonSubTypes.Type(value = Dog.class, name = "DOG"), }) @XmlRootElement(name = "Animal") diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java index 5d49eac98c8..cd46ca48dad 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Cat.java @@ -43,9 +43,6 @@ import io.github.threetenjaxb.core.*; allowSetters = true // allows the className to be set during deserialization ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), -}) @XmlRootElement(name = "Cat") @XmlAccessorType(XmlAccessType.FIELD) diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 00000000000..81e5bc2c8e6 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,115 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "DeprecatedObject") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "DeprecatedObject") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + @XmlElement(name = "name") + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "name") + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "name") + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java index 4507a8572fe..1b8e6790feb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/EnumTest.java @@ -21,6 +21,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.dataformat.xml.annotation.*; @@ -36,7 +43,10 @@ import io.github.threetenjaxb.core.*; EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE }) @JsonTypeName("Enum_Test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -224,7 +234,19 @@ public class EnumTest { public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; @XmlElement(name = "outerEnum") - private OuterEnum outerEnum; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + @XmlElement(name = "outerEnumInteger") + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + @XmlElement(name = "outerEnumDefaultValue") + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + @XmlElement(name = "outerEnumIntegerDefaultValue") + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; public EnumTest() { } @@ -342,8 +364,8 @@ public class EnumTest { public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); - this.outerEnum = outerEnum; return this; } @@ -352,20 +374,111 @@ public class EnumTest { * @return outerEnum **/ @javax.annotation.Nullable + @JsonIgnore + + public OuterEnum getOuterEnum() { + return outerEnum.orElse(null); + } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JacksonXmlProperty(localName = "outerEnum") - public OuterEnum getOuterEnum() { + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + } - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * @return outerEnumInteger + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "outerEnum") - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + @JacksonXmlProperty(localName = "outerEnumInteger") + + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "outerEnumInteger") + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * @return outerEnumDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "outerEnumDefaultValue") + + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "outerEnumDefaultValue") + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + + public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; + } + + /** + * Get outerEnumIntegerDefaultValue + * @return outerEnumIntegerDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "outerEnumIntegerDefaultValue") + + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "outerEnumIntegerDefaultValue") + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } @Override @@ -381,12 +494,26 @@ public class EnumTest { Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && Objects.equals(this.enumInteger, enumTest.enumInteger) && Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + equalsNullable(this.outerEnum, enumTest.outerEnum) && + Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && + Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -398,6 +525,9 @@ public class EnumTest { 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(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java new file mode 100644 index 00000000000..6a4ec933e55 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -0,0 +1,165 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * FakeBigDecimalMap200Response + */ +@JsonPropertyOrder({ + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_ID, + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_MAP +}) +@JsonTypeName("fakeBigDecimalMap_200_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "FakeBigDecimalMap200Response") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "FakeBigDecimalMap200Response") +public class FakeBigDecimalMap200Response { + public static final String JSON_PROPERTY_SOME_ID = "someId"; + @XmlElement(name = "someId") + private BigDecimal someId; + + public static final String JSON_PROPERTY_SOME_MAP = "someMap"; + // Is a container wrapped=false + // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= + // items.example= items.type=BigDecimal + @XmlElement(name = "inner") + private Map someMap = new HashMap<>(); + + public FakeBigDecimalMap200Response() { + } + + public FakeBigDecimalMap200Response someId(BigDecimal someId) { + + this.someId = someId; + return this; + } + + /** + * Get someId + * @return someId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "someId") + + public BigDecimal getSomeId() { + return someId; + } + + + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "someId") + public void setSomeId(BigDecimal someId) { + this.someId = someId; + } + + + public FakeBigDecimalMap200Response someMap(Map someMap) { + + this.someMap = someMap; + return this; + } + + public FakeBigDecimalMap200Response putSomeMapItem(String key, BigDecimal someMapItem) { + if (this.someMap == null) { + this.someMap = new HashMap<>(); + } + this.someMap.put(key, someMapItem); + return this; + } + + /** + * Get someMap + * @return someMap + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "someMap") + @JacksonXmlElementWrapper(useWrapping = false) + + public Map getSomeMap() { + return someMap; + } + + + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "someMap") + @JacksonXmlElementWrapper(useWrapping = false) + public void setSomeMap(Map someMap) { + this.someMap = someMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o; + return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) && + Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap); + } + + @Override + public int hashCode() { + return Objects.hash(someId, someMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FakeBigDecimalMap200Response {\n"); + sb.append(" someId: ").append(toIndentedString(someId)).append("\n"); + sb.append(" someMap: ").append(toIndentedString(someMap)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 00000000000..ddfa62b908d --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,113 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "Foo") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "Foo") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + @XmlElement(name = "bar") + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "bar") + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "bar") + public void setBar(String bar) { + this.bar = bar; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java new file mode 100644 index 00000000000..104302827b0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -0,0 +1,115 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * FooGetDefaultResponse + */ +@JsonPropertyOrder({ + FooGetDefaultResponse.JSON_PROPERTY_STRING +}) +@JsonTypeName("_foo_get_default_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "FooGetDefaultResponse") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "FooGetDefaultResponse") +public class FooGetDefaultResponse { + public static final String JSON_PROPERTY_STRING = "string"; + @XmlElement(name = "string") + private Foo string; + + public FooGetDefaultResponse() { + } + + public FooGetDefaultResponse string(Foo string) { + + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "string") + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "string") + public void setString(Foo string) { + this.string = string; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; + return Objects.equals(this.string, fooGetDefaultResponse.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooGetDefaultResponse {\n"); + sb.append(" string: ").append(toIndentedString(string)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java index 77e2ae4889c..8caa2379609 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/FormatTest.java @@ -42,6 +42,7 @@ import io.github.threetenjaxb.core.*; FormatTest.JSON_PROPERTY_NUMBER, FormatTest.JSON_PROPERTY_FLOAT, FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_DECIMAL, FormatTest.JSON_PROPERTY_STRING, FormatTest.JSON_PROPERTY_BYTE, FormatTest.JSON_PROPERTY_BINARY, @@ -49,7 +50,8 @@ import io.github.threetenjaxb.core.*; FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER }) @JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -81,6 +83,10 @@ public class FormatTest { @XmlElement(name = "double") private Double _double; + public static final String JSON_PROPERTY_DECIMAL = "decimal"; + @XmlElement(name = "decimal") + private BigDecimal decimal; + public static final String JSON_PROPERTY_STRING = "string"; @XmlElement(name = "string") private String string; @@ -110,9 +116,13 @@ public class FormatTest { @XmlElement(name = "password") private String password; - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - @XmlElement(name = "BigDecimal") - private BigDecimal bigDecimal; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + @XmlElement(name = "pattern_with_digits") + private String patternWithDigits; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; + @XmlElement(name = "pattern_with_digits_and_delimiter") + private String patternWithDigitsAndDelimiter; public FormatTest() { } @@ -295,6 +305,34 @@ public class FormatTest { } + public FormatTest decimal(BigDecimal decimal) { + + this.decimal = decimal; + return this; + } + + /** + * Get decimal + * @return decimal + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "decimal") + + public BigDecimal getDecimal() { + return decimal; + } + + + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "decimal") + public void setDecimal(BigDecimal decimal) { + this.decimal = decimal; + } + + public FormatTest string(String string) { this.string = string; @@ -491,31 +529,59 @@ public class FormatTest { } - public FormatTest bigDecimal(BigDecimal bigDecimal) { + public FormatTest patternWithDigits(String patternWithDigits) { - this.bigDecimal = bigDecimal; + this.patternWithDigits = patternWithDigits; return this; } /** - * Get bigDecimal - * @return bigDecimal + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "BigDecimal") + @JacksonXmlProperty(localName = "pattern_with_digits") - public BigDecimal getBigDecimal() { - return bigDecimal; + public String getPatternWithDigits() { + return patternWithDigits; } - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "BigDecimal") - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + @JacksonXmlProperty(localName = "pattern_with_digits") + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "pattern_with_digits_and_delimiter") + + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "pattern_with_digits_and_delimiter") + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } @Override @@ -533,6 +599,7 @@ public class FormatTest { Objects.equals(this.number, formatTest.number) && Objects.equals(this._float, formatTest._float) && Objects.equals(this._double, formatTest._double) && + Objects.equals(this.decimal, formatTest.decimal) && Objects.equals(this.string, formatTest.string) && Arrays.equals(this._byte, formatTest._byte) && Objects.equals(this.binary, formatTest.binary) && @@ -540,12 +607,13 @@ public class FormatTest { Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -558,6 +626,7 @@ public class FormatTest { 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(" decimal: ").append(toIndentedString(decimal)).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"); @@ -565,7 +634,8 @@ public class FormatTest { 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(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 00000000000..5eac962259c --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,135 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "HealthCheckResult") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "HealthCheckResult") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + @XmlElement(name = "NullableMessage") + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "NullableMessage") + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 00000000000..e5e0d897a24 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,685 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "NullableClass") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "NullableClass") +public class NullableClass extends HashMap { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + @XmlElement(name = "integer_prop") + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + @XmlElement(name = "number_prop") + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + @XmlElement(name = "boolean_prop") + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + @XmlElement(name = "string_prop") + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + @XmlElement(name = "date_prop") + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + @XmlElement(name = "datetime_prop") + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + // Is a container wrapped=false + // items.name=arrayNullableProp items.baseName=arrayNullableProp items.xmlName= items.xmlNamespace= + // items.example= items.type=Object + @XmlElement(name = "arrayNullableProp") + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + // Is a container wrapped=false + // items.name=arrayAndItemsNullableProp items.baseName=arrayAndItemsNullableProp items.xmlName= items.xmlNamespace= + // items.example= items.type=Object + @XmlElement(name = "arrayAndItemsNullableProp") + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + // Is a container wrapped=false + // items.name=arrayItemsNullable items.baseName=arrayItemsNullable items.xmlName= items.xmlNamespace= + // items.example= items.type=Object + @XmlElement(name = "arrayItemsNullable") + private List arrayItemsNullable; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + // Is a container wrapped=false + // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= + // items.example= items.type=Object + @XmlElement(name = "inner") + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + // Is a container wrapped=false + // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= + // items.example= items.type=Object + @XmlElement(name = "inner") + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + // Is a container wrapped=false + // items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace= + // items.example= items.type=Object + @XmlElement(name = "inner") + private Map objectItemsNullable = new HashMap<>(); + + public NullableClass() { + + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "integer_prop") + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "number_prop") + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "boolean_prop") + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "string_prop") + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "date_prop") + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "datetime_prop") + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "array_nullable_prop") + @JacksonXmlElementWrapper(useWrapping = false) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "array_and_items_nullable_prop") + @JacksonXmlElementWrapper(useWrapping = false) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "array_items_nullable") + @JacksonXmlElementWrapper(useWrapping = false) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "array_items_nullable") + @JacksonXmlElementWrapper(useWrapping = false) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "object_nullable_prop") + @JacksonXmlElementWrapper(useWrapping = false) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "object_and_items_nullable_prop") + @JacksonXmlElementWrapper(useWrapping = false) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "object_items_nullable") + @JacksonXmlElementWrapper(useWrapping = false) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "object_items_nullable") + @JacksonXmlElementWrapper(useWrapping = false) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 00000000000..c2fc96f52f2 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,242 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "ObjectWithDeprecatedFields") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "ObjectWithDeprecatedFields") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + @XmlElement(name = "uuid") + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + @XmlElement(name = "id") + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + @XmlElement(name = "deprecatedRef") + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + // Is a container wrapped=false + // items.name=bars items.baseName=bars items.xmlName= items.xmlNamespace= + // items.example= items.type=String + @XmlElement(name = "bars") + private List bars; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "uuid") + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "uuid") + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "id") + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "id") + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "deprecatedRef") + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "deprecatedRef") + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "bars") + @JacksonXmlElementWrapper(useWrapping = false) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "bars") + @JacksonXmlElementWrapper(useWrapping = false) + public void setBars(List bars) { + this.bars = bars; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnum.java index 829a6ff7765..c47ace86d44 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -62,7 +62,7 @@ public enum OuterEnum { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 00000000000..aa3e5b9e54b --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + @XmlEnumValue("placed") + PLACED("placed"), + + @XmlEnumValue("approved") + APPROVED("approved"), + + @XmlEnumValue("delivered") + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 00000000000..9d83bea59d5 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + @XmlEnumValue("0") + NUMBER_0(0), + + @XmlEnumValue("1") + NUMBER_1(1), + + @XmlEnumValue("2") + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 00000000000..fa48c14eafc --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + @XmlEnumValue("0") + NUMBER_0(0), + + @XmlEnumValue("1") + NUMBER_1(1), + + @XmlEnumValue("2") + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java new file mode 100644 index 00000000000..26b2eb5ddac --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -0,0 +1,114 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.OuterEnumInteger; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +/** + * OuterObjectWithEnumProperty + */ +@JsonPropertyOrder({ + OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@XmlRootElement(name = "OuterObjectWithEnumProperty") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "OuterObjectWithEnumProperty") +public class OuterObjectWithEnumProperty { + public static final String JSON_PROPERTY_VALUE = "value"; + @XmlElement(name = "value") + private OuterEnumInteger value; + + public OuterObjectWithEnumProperty() { + } + + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { + + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JacksonXmlProperty(localName = "value") + + public OuterEnumInteger getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JacksonXmlProperty(localName = "value") + public void setValue(OuterEnumInteger value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; + return Objects.equals(this.value, outerObjectWithEnumProperty.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterObjectWithEnumProperty {\n"); + sb.append(" value: ").append(toIndentedString(value)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 00000000000..c3572a33364 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,65 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.dataformat.xml.annotation.*; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + @XmlEnumValue("admin") + ADMIN("admin"), + + @XmlEnumValue("user") + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java index 4b865f05653..e3161dd5854 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -33,7 +33,7 @@ import io.github.threetenjaxb.core.*; @JsonPropertyOrder({ SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME }) -@JsonTypeName("$special[model.name]") +@JsonTypeName("_special_model.name_") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @XmlRootElement(name = "$special[model.name]") @XmlAccessorType(XmlAccessType.FIELD) @@ -81,8 +81,8 @@ public class SpecialModelName { if (o == null || getClass() != o.getClass()) { return false; } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); } @Override diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/ApiClientTest.java deleted file mode 100644 index 6783097e72a..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/ApiClientTest.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.openapitools.client; - -import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.*; - -import java.util.*; -import org.junit.*; -import org.springframework.util.MultiValueMap; -import org.springframework.util.LinkedMultiValueMap; - -public class ApiClientTest { - ApiClient apiClient; - - @Before - public void setup() { - apiClient = new ApiClient(); - } - - /** - * Test uri encoding when params contains comma - */ - @Test - public void testUriEncoderWithComma() { - Map uriParams = new HashMap<>(); - MultiValueMap queryParams = new LinkedMultiValueMap(); - queryParams.add("key", "val,comma"); - apiClient.generateQueryUri(queryParams, uriParams); - - assertEquals("/key=val%2Ccomma", apiClient.expandPath("/key={key0}", uriParams)); - } - - @Test - public void testPathParamEncoding() { - Map uriParams = new HashMap<>(); - MultiValueMap queryParams = new LinkedMultiValueMap(); - uriParams.put("username", "user_name,comma& space"); - assertEquals("user/user_name%2Ccomma%26amp%20space", apiClient.expandPath("user/{username}", uriParams)); - } - - @Test - public void testPathAndQueryParamEncoding() { - Map uriParams = new HashMap<>(); - MultiValueMap queryParams = new LinkedMultiValueMap(); - queryParams.add("key", "val,comma?q-mark&"); - uriParams.put("username", "user_name,comma& space"); - String template = "user/{username}?" + apiClient.generateQueryUri(queryParams, uriParams); - assertEquals("user/user_name%2Ccomma%26amp%20space?key=val%2Ccomma%3Fq-mark%26amp", - apiClient.expandPath(template, uriParams)); - } -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index f9ca5b113f5..18f72bae0a7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -17,6 +17,8 @@ import org.openapitools.client.model.Client; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -41,8 +43,8 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() { - Client body = null; - Client response = api.call123testSpecialTags(body); + Client client = null; + Client response = api.call123testSpecialTags(client); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 00000000000..a89218d06ec --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.FooGetDefaultResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DefaultApi + */ +@Ignore +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fooGetTest() { + FooGetDefaultResponse response = api.fooGet(); + + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeApiTest.java index 55eece2b2af..2d7877ea03f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -15,16 +15,22 @@ package org.openapitools.client.api; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -40,17 +46,49 @@ public class FakeApiTest { /** - * creates an XmlItem + * * - * this route creates an XmlItem + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * * @throws ApiException * if the Api call fails */ @Test - public void createXmlItemTest() { - XmlItem xmlItem = null; - api.createXmlItem(xmlItem); + public void fakeBigDecimalMapTest() { + FakeBigDecimalMap200Response response = api.fakeBigDecimalMap(); + + // TODO: test validations + } + + /** + * Health check endpoint + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHealthGetTest() { + HealthCheckResult response = api.fakeHealthGet(); + + // TODO: test validations + } + + /** + * test http signature authentication + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHttpSignatureTestTest() { + Pet pet = null; + String query1 = null; + String header1 = null; + api.fakeHttpSignatureTest(pet, query1, header1); // TODO: test validations } @@ -81,8 +119,8 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() { - OuterComposite body = null; - OuterComposite response = api.fakeOuterCompositeSerialize(body); + OuterComposite outerComposite = null; + OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); // TODO: test validations } @@ -122,15 +160,47 @@ public class FakeApiTest { /** * * - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakePropertyEnumIntegerSerializeTest() { + OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; + OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + + // TODO: test validations + } + + /** + * + * + * For this test, the body has to be a binary file. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithBinaryTest() { + File body = null; + api.testBodyWithBinary(body); + + // TODO: test validations + } + + /** + * + * + * For this test, the body for this request must reference a schema named `File`. * * @throws ApiException * if the Api call fails */ @Test public void testBodyWithFileSchemaTest() { - FileSchemaTestClass body = null; - api.testBodyWithFileSchema(body); + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema(fileSchemaTestClass); // TODO: test validations } @@ -146,8 +216,8 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() { String query = null; - User body = null; - api.testBodyWithQueryParams(query, body); + User user = null; + api.testBodyWithQueryParams(query, user); // TODO: test validations } @@ -162,16 +232,16 @@ public class FakeApiTest { */ @Test public void testClientModelTest() { - Client body = null; - Client response = api.testClientModel(body); + Client client = null; + Client response = api.testClientModel(client); // TODO: test validations } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws ApiException * if the Api call fails @@ -213,9 +283,10 @@ public class FakeApiTest { String enumQueryString = null; Integer enumQueryInteger = null; Double enumQueryDouble = null; + List enumQueryModelArray = null; List enumFormStringArray = null; String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); // TODO: test validations } @@ -251,8 +322,8 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() { - Map param = null; - api.testInlineAdditionalProperties(param); + Map requestBody = null; + api.testInlineAdditionalProperties(requestBody); // TODO: test validations } @@ -289,7 +360,9 @@ public class FakeApiTest { List http = null; List url = null; List context = null; - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + String allowEmpty = null; + Map language = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 41c61a869e6..ae8acadcf7d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -17,6 +17,8 @@ import org.openapitools.client.model.Client; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -41,8 +43,8 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() { - Client body = null; - Client response = api.testClassname(body); + Client client = null; + Client response = api.testClassname(client); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/PetApiTest.java index 4aef09fc0ed..1afa92dcd02 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -20,6 +20,8 @@ import java.util.Set; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -44,8 +46,8 @@ public class PetApiTest { */ @Test public void addPetTest() { - Pet body = null; - api.addPet(body); + Pet pet = null; + api.addPet(pet); // TODO: test validations } @@ -125,8 +127,8 @@ public class PetApiTest { */ @Test public void updatePetTest() { - Pet body = null; - api.updatePet(body); + Pet pet = null; + api.updatePet(pet); // TODO: test validations } @@ -161,8 +163,8 @@ public class PetApiTest { public void uploadFileTest() { Long petId = null; String additionalMetadata = null; - File file = null; - ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + File _file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java index 0e7d086feab..31110dfa993 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -17,6 +17,8 @@ import org.openapitools.client.model.Order; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -88,8 +90,8 @@ public class StoreApiTest { */ @Test public void placeOrderTest() { - Order body = null; - Order response = api.placeOrder(body); + Order order = null; + Order response = api.placeOrder(order); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/UserApiTest.java index ce205e18b92..d7ddc576767 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -13,10 +13,13 @@ package org.openapitools.client.api; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -41,8 +44,8 @@ public class UserApiTest { */ @Test public void createUserTest() { - User body = null; - api.createUser(body); + User user = null; + api.createUser(user); // TODO: test validations } @@ -57,8 +60,8 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() { - List body = null; - api.createUsersWithArrayInput(body); + List user = null; + api.createUsersWithArrayInput(user); // TODO: test validations } @@ -73,8 +76,8 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() { - List body = null; - api.createUsersWithListInput(body); + List user = null; + api.createUsersWithListInput(user); // TODO: test validations } @@ -154,8 +157,8 @@ public class UserApiTest { @Test public void updateUserTest() { String username = null; - User body = null; - api.updateUser(username, body); + User user = null; + api.updateUser(username, user); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java deleted file mode 100644 index 4f6fd800ab7..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesAnyType - */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - - /** - * Model tests for AdditionalPropertiesAnyType - */ - @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java deleted file mode 100644 index 41e6497ecee..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ /dev/null @@ -1,51 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesArray - */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - - /** - * Model tests for AdditionalPropertiesArray - */ - @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java deleted file mode 100644 index d2e17831ba7..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesBoolean - */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - - /** - * Model tests for AdditionalPropertiesBoolean - */ - @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 14fd8022feb..29bc5ae9694 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -18,15 +18,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesClass */ @@ -42,91 +39,19 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapString' + * Test the property 'mapProperty' */ @Test - public void mapStringTest() { - // TODO: test mapString + public void mapPropertyTest() { + // TODO: test mapProperty } /** - * Test the property 'mapNumber' + * Test the property 'mapOfMapProperty' */ @Test - public void mapNumberTest() { - // TODO: test mapNumber - } - - /** - * Test the property 'mapInteger' - */ - @Test - public void mapIntegerTest() { - // TODO: test mapInteger - } - - /** - * Test the property 'mapBoolean' - */ - @Test - public void mapBooleanTest() { - // TODO: test mapBoolean - } - - /** - * Test the property 'mapArrayInteger' - */ - @Test - public void mapArrayIntegerTest() { - // TODO: test mapArrayInteger - } - - /** - * Test the property 'mapArrayAnytype' - */ - @Test - public void mapArrayAnytypeTest() { - // TODO: test mapArrayAnytype - } - - /** - * Test the property 'mapMapString' - */ - @Test - public void mapMapStringTest() { - // TODO: test mapMapString - } - - /** - * Test the property 'mapMapAnytype' - */ - @Test - public void mapMapAnytypeTest() { - // TODO: test mapMapAnytype - } - - /** - * Test the property 'anytype1' - */ - @Test - public void anytype1Test() { - // TODO: test anytype1 - } - - /** - * Test the property 'anytype2' - */ - @Test - public void anytype2Test() { - // TODO: test anytype2 - } - - /** - * Test the property 'anytype3' - */ - @Test - public void anytype3Test() { - // TODO: test anytype3 + public void mapOfMapPropertyTest() { + // TODO: test mapOfMapProperty } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java deleted file mode 100644 index 58b7521c6a7..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesInteger - */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - - /** - * Model tests for AdditionalPropertiesInteger - */ - @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java new file mode 100644 index 00000000000..dad0e9235de --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -0,0 +1,56 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AllOfWithSingleRef + */ +public class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); + + /** + * Model tests for AllOfWithSingleRef + */ + @Test + public void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + public void singleRefTypeTest() { + // TODO: test singleRefType + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AnimalTest.java index 930e5c17d07..da5609b5489 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,14 +21,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.Cat; -import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Animal */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 57a1c4f37ec..cbc199f1575 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 4f127b838bc..762f9d6dc33 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 5874400602c..20dc34a8c51 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayTest */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 765bd150512..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,75 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CapitalizationTest.java index c69ffc12a07..4fd3728ab89 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Capitalization */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatTest.java index 90fdba14c24..d591bdd30ef 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatTest.java @@ -22,12 +22,10 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Cat */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CategoryTest.java index 393f73bd5e6..12de38c0c08 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Category */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClassModelTest.java index 5005bcb800e..d1936d85e81 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ClassModel */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClientTest.java index bda3b360b74..7aa0f5859ff 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ClientTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Client */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java similarity index 71% rename from samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java rename to samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index bcbb9c54b27..65fd3cc0b76 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -18,25 +18,22 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesObject + * Model tests for DeprecatedObject */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); +public class DeprecatedObjectTest { + private final DeprecatedObject model = new DeprecatedObject(); /** - * Model tests for AdditionalPropertiesObject + * Model tests for DeprecatedObject */ @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject + public void testDeprecatedObject() { + // TODO: test DeprecatedObject } /** diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogTest.java index de77d6711bd..744c8a406fe 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Dog */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 73206626b9c..694e4196138 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -19,12 +19,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumArrays */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd..3f50e1bfb9e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumClass */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumTestTest.java index 8907cfa8e8f..0a1fd0f4268 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -19,11 +19,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumTest */ @@ -78,4 +84,28 @@ public class EnumTestTest { // TODO: test outerEnum } + /** + * Test the property 'outerEnumInteger' + */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } + + /** + * Test the property 'outerEnumDefaultValue' + */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + + /** + * Test the property 'outerEnumIntegerDefaultValue' + */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } + } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java similarity index 62% rename from samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java rename to samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java index 10ad938f52c..88c1d374be6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java @@ -25,27 +25,34 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesNumber + * Model tests for FakeBigDecimalMap200Response */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); +public class FakeBigDecimalMap200ResponseTest { + private final FakeBigDecimalMap200Response model = new FakeBigDecimalMap200Response(); /** - * Model tests for AdditionalPropertiesNumber + * Model tests for FakeBigDecimalMap200Response */ @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber + public void testFakeBigDecimalMap200Response() { + // TODO: test FakeBigDecimalMap200Response } /** - * Test the property 'name' + * Test the property 'someId' */ @Test - public void nameTest() { - // TODO: test name + public void someIdTest() { + // TODO: test someId + } + + /** + * Test the property 'someMap' + */ + @Test + public void someMapTest() { + // TODO: test someMap } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index 493d84aa1bc..fb8827a1e88 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ModelFile; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FileSchemaTestClass */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java new file mode 100644 index 00000000000..cd15af86ee9 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FooGetDefaultResponse + */ +public class FooGetDefaultResponseTest { + private final FooGetDefaultResponse model = new FooGetDefaultResponse(); + + /** + * Model tests for FooGetDefaultResponse + */ + @Test + public void testFooGetDefaultResponse() { + // TODO: test FooGetDefaultResponse + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FooTest.java new file mode 100644 index 00000000000..2a92367019b --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FooTest.java @@ -0,0 +1,47 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Foo + */ +public class FooTest { + private final Foo model = new Foo(); + + /** + * Model tests for Foo + */ + @Test + public void testFoo() { + // TODO: test Foo + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FormatTestTest.java index 48bec93d994..8a9d3adfc01 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FormatTest */ @@ -90,6 +89,14 @@ public class FormatTestTest { // TODO: test _double } + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + /** * Test the property 'string' */ @@ -147,11 +154,19 @@ public class FormatTestTest { } /** - * Test the property 'bigDecimal' + * Test the property 'patternWithDigits' */ @Test - public void bigDecimalTest() { - // TODO: test bigDecimal + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** + * Test the property 'patternWithDigitsAndDelimiter' + */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index da9073d4500..bf777b061cc 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for HasOnlyReadOnly */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 00000000000..e96ffaa18f4 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for HealthCheckResult + */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** + * Model tests for HealthCheckResult + */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** + * Test the property 'nullableMessage' + */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MapTestTest.java index 22c8519472b..50e909f0381 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MapTest */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index f29932e96be..b16858dc17e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 0cd3f976198..dd90f6799d3 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Model200Response */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index be8cca35e3e..e63f2ae5e9c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelApiResponse */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelFileTest.java index a0247ae71be..264249edc1c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelFile */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelListTest.java index 0ead99db3a5..81fd2dcc6a6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelList */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b6ca02f8d23..5840d4f8f0c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelReturn */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NameTest.java index 07684c9eb40..9280c171539 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Name */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 00000000000..c79c6366f83 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for NullableClass + */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** + * Model tests for NullableClass + */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** + * Test the property 'integerProp' + */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** + * Test the property 'numberProp' + */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** + * Test the property 'booleanProp' + */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** + * Test the property 'stringProp' + */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** + * Test the property 'dateProp' + */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** + * Test the property 'datetimeProp' + */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** + * Test the property 'arrayNullableProp' + */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** + * Test the property 'arrayAndItemsNullableProp' + */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** + * Test the property 'arrayItemsNullable' + */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** + * Test the property 'objectNullableProp' + */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** + * Test the property 'objectAndItemsNullableProp' + */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** + * Test the property 'objectItemsNullable' + */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 878095093ad..63b5bc0440e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for NumberOnly */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java similarity index 55% rename from samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java rename to samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index 8c096c188fc..4203b62f784 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -20,64 +20,57 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.DeprecatedObject; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); +public class ObjectWithDeprecatedFieldsTest { + private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault + public void testObjectWithDeprecatedFields() { + // TODO: test ObjectWithDeprecatedFields } /** - * Test the property 'stringItem' + * Test the property 'uuid' */ @Test - public void stringItemTest() { - // TODO: test stringItem + public void uuidTest() { + // TODO: test uuid } /** - * Test the property 'numberItem' + * Test the property 'id' */ @Test - public void numberItemTest() { - // TODO: test numberItem + public void idTest() { + // TODO: test id } /** - * Test the property 'integerItem' + * Test the property 'deprecatedRef' */ @Test - public void integerItemTest() { - // TODO: test integerItem + public void deprecatedRefTest() { + // TODO: test deprecatedRef } /** - * Test the property 'boolItem' + * Test the property 'bars' */ @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem + public void barsTest() { + // TODO: test bars } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OrderTest.java index f31e10a9df1..e0fbb529af6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OrderTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Order */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 8b823572e5e..840cf65c8d0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterComposite */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 00000000000..5b9bae28ec6 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumDefaultValue + */ +public class OuterEnumDefaultValueTest { + /** + * Model tests for OuterEnumDefaultValue + */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 00000000000..731acbf905f --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumIntegerDefaultValue + */ +public class OuterEnumIntegerDefaultValueTest { + /** + * Model tests for OuterEnumIntegerDefaultValue + */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 00000000000..234945cec0f --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumInteger + */ +public class OuterEnumIntegerTest { + /** + * Model tests for OuterEnumInteger + */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf..b312b11a09e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterEnum */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java similarity index 64% rename from samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java rename to samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java index 4f6fd800ab7..964d1281b21 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java @@ -18,33 +18,31 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; +import org.openapitools.client.model.OuterEnumInteger; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesAnyType + * Model tests for OuterObjectWithEnumProperty */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); +public class OuterObjectWithEnumPropertyTest { + private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty(); /** - * Model tests for AdditionalPropertiesAnyType + * Model tests for OuterObjectWithEnumProperty */ @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType + public void testOuterObjectWithEnumProperty() { + // TODO: test OuterObjectWithEnumProperty } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/PetTest.java index b48657d0c9a..ca23198fbf1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/PetTest.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -29,7 +30,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Pet */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index 26356ec2048..b356d6993c5 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ReadOnlyFirst */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 00000000000..920d02c930c --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SingleRefType + */ +public class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + public void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 4e59989875a..8eb0b1bd269 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for SpecialModelName */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TagTest.java index 5aeb2f3f948..6dc0868167c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TagTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Tag */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index b1655df6165..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'floatItem' - */ - @Test - public void floatItemTest() { - // TODO: test floatItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/UserTest.java index e0153a4cf1b..b029d279409 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/UserTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for User */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 4bab95a9126..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,275 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNsString' - */ - @Test - public void prefixNsStringTest() { - // TODO: test prefixNsString - } - - /** - * Test the property 'prefixNsNumber' - */ - @Test - public void prefixNsNumberTest() { - // TODO: test prefixNsNumber - } - - /** - * Test the property 'prefixNsInteger' - */ - @Test - public void prefixNsIntegerTest() { - // TODO: test prefixNsInteger - } - - /** - * Test the property 'prefixNsBoolean' - */ - @Test - public void prefixNsBooleanTest() { - // TODO: test prefixNsBoolean - } - - /** - * Test the property 'prefixNsArray' - */ - @Test - public void prefixNsArrayTest() { - // TODO: test prefixNsArray - } - - /** - * Test the property 'prefixNsWrappedArray' - */ - @Test - public void prefixNsWrappedArrayTest() { - // TODO: test prefixNsWrappedArray - } - -} diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/FILES b/samples/client/petstore/java/resttemplate/.openapi-generator/FILES index c298b2c2941..76a53947ccf 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/FILES +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/FILES @@ -5,34 +5,33 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md -docs/BigCat.md docs/Capitalization.md docs/Cat.md docs/Category.md docs/ClassModel.md docs/Client.md +docs/DefaultApi.md +docs/DeprecatedObject.md docs/Dog.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md docs/FakeApi.md +docs/FakeBigDecimalMap200Response.md docs/FakeClassnameTags123Api.md docs/FileSchemaTestClass.md +docs/Foo.md +docs/FooGetDefaultResponse.md docs/FormatTest.md docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -41,21 +40,25 @@ docs/ModelFile.md docs/ModelList.md docs/ModelReturn.md docs/Name.md +docs/NullableClass.md docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md docs/OuterComposite.md docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md docs/User.md docs/UserApi.md -docs/XmlItem.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -71,6 +74,7 @@ src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/api/AnotherFakeApi.java +src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java src/main/java/org/openapitools/client/api/PetApi.java @@ -82,31 +86,29 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/auth/OAuth.java src/main/java/org/openapitools/client/auth/OAuthFlow.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java +src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java +src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +src/main/java/org/openapitools/client/model/Foo.java +src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/client/model/HealthCheckResult.java src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/Model200Response.java @@ -115,15 +117,19 @@ src/main/java/org/openapitools/client/model/ModelFile.java src/main/java/org/openapitools/client/model/ModelList.java src/main/java/org/openapitools/client/model/ModelReturn.java src/main/java/org/openapitools/client/model/Name.java +src/main/java/org/openapitools/client/model/NullableClass.java src/main/java/org/openapitools/client/model/NumberOnly.java +src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/OuterComposite.java src/main/java/org/openapitools/client/model/OuterEnum.java +src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +src/main/java/org/openapitools/client/model/OuterEnumInteger.java +src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/resttemplate/README.md b/samples/client/petstore/java/resttemplate/README.md index 20ad076aeb9..bfd879857cf 100644 --- a/samples/client/petstore/java/resttemplate/README.md +++ b/samples/client/petstore/java/resttemplate/README.md @@ -91,10 +91,9 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(uuidTest, body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -115,15 +114,20 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem +*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | +*FakeApi* | [**fakeBigDecimalMap**](docs/FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | +*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication *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* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | *FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -155,31 +159,29 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [BigCat](docs/BigCat.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) + - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) + - [FakeBigDecimalMap200Response](docs/FakeBigDecimalMap200Response.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - [FormatTest](docs/FormatTest.md) - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -188,18 +190,22 @@ Class | Method | HTTP request | Description - [ModelList](docs/ModelList.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) + - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) - [OuterEnum](docs/OuterEnum.md) + - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OuterEnumInteger](docs/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) @@ -240,6 +246,18 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### bearer_test + + +- **Type**: HTTP Bearer Token authentication (JWT) + + +### http_signature_test + + +- **Type**: HTTP signature authentication + ## Recommendation diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index 933d7332521..9f0affe779f 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ @@ -9,7 +9,30 @@ info: title: OpenAPI Petstore version: 1.0.0 servers: -- url: http://petstore.swagger.io:80/v2 +- description: petstore server + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: "https://localhost:8080/{version}" + variables: + version: + default: v2 + enum: + - v1 + - v2 +- description: The local server without variables + url: https://127.0.0.1/no_varaible tags: - description: Everything about your Pets name: pet @@ -18,25 +41,26 @@ tags: - description: Operations about user name: user paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/_foo_get_default_response' + description: response + x-accepts: application/json /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,33 +69,21 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json put: + description: "" operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -80,15 +92,34 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body + x-webclient-blocking: true x-content-type: application/json x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -118,7 +149,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: @@ -127,6 +157,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -163,7 +194,6 @@ paths: uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: @@ -172,28 +202,33 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -208,12 +243,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -225,35 +262,38 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/updatePetWithForm_request' responses: + "200": + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -266,15 +306,18 @@ paths: x-accepts: application/json /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -315,13 +358,15 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -337,13 +382,11 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -352,17 +395,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: order_id required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -374,6 +417,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: order_id required: true @@ -382,6 +426,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -393,10 +438,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -408,81 +451,68 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -496,16 +526,19 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -513,10 +546,10 @@ paths: x-accepts: application/json /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -528,31 +561,34 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Delete user tags: - user x-accepts: application/json get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -564,10 +600,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -578,42 +612,36 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -626,7 +654,6 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake: @@ -635,44 +662,60 @@ paths: operationId: testGroupParameters parameters: - description: Required String in group parameters + explode: true in: query name: required_string_group required: true schema: type: integer + style: form - description: Required Boolean in group parameters + explode: false in: header name: required_boolean_group required: true schema: type: boolean + style: simple - description: Required Integer in group parameters + explode: true in: query name: required_int64_group required: true schema: format: int64 type: integer + style: form - description: String in group parameters + explode: true in: query name: string_group + required: false schema: type: integer + style: form - description: Boolean in group parameters + explode: false in: header name: boolean_group + required: false schema: type: boolean + style: simple - description: Integer in group parameters + explode: true in: query name: int64_group + required: false schema: format: int64 type: integer + style: form responses: "400": - content: {} description: Something wrong + security: + - bearer_test: [] summary: Fake endpoint to test group parameters (optional) tags: - fake @@ -686,6 +729,7 @@ paths: explode: false in: header name: enum_header_string_array + required: false schema: items: default: $ @@ -696,8 +740,10 @@ paths: type: array style: simple - description: Header parameter enum test (string) + explode: false in: header name: enum_header_string + required: false schema: default: -efg enum: @@ -705,10 +751,12 @@ paths: - -efg - (xyz) type: string + style: simple - description: Query parameter enum test (string array) - explode: false + explode: true in: query name: enum_query_string_array + required: false schema: items: default: $ @@ -719,8 +767,10 @@ paths: type: array style: form - description: Query parameter enum test (string) + explode: true in: query name: enum_query_string + required: false schema: default: -efg enum: @@ -728,24 +778,40 @@ paths: - -efg - (xyz) type: string + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_integer + required: false schema: enum: - 1 - -2 format: int32 type: integer + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_double + required: false schema: enum: - 1.1 - -1.2 format: double type: number + style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: content: application/x-www-form-urlencoded: @@ -753,10 +819,8 @@ paths: $ref: '#/components/schemas/testEnumParameters_request' responses: "400": - content: {} description: Invalid request "404": - content: {} description: Not found summary: To test enum parameters tags: @@ -767,12 +831,7 @@ paths: description: To test "client" model operationId: testClientModel requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -783,36 +842,32 @@ paths: summary: To test "client" model tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json post: - description: |- + description: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testEndpointParameters_request' - required: true responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found security: - http_basic_test: [] - summary: |- + summary: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-content-type: application/x-www-form-urlencoded @@ -823,11 +878,10 @@ paths: operationId: fakeOuterNumberSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' description: Input number as post body - required: false responses: "200": content: @@ -837,8 +891,29 @@ paths: description: Output number tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/property/enum-int: + post: + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + required: true + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Output enum (int) + tags: + - fake + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -846,11 +921,10 @@ paths: operationId: fakeOuterStringSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' description: Input string as post body - required: false responses: "200": content: @@ -860,8 +934,7 @@ paths: description: Output string tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -869,11 +942,10 @@ paths: operationId: fakeOuterBooleanSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body - required: false responses: "200": content: @@ -883,8 +955,7 @@ paths: description: Output boolean tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -892,11 +963,10 @@ paths: operationId: fakeOuterCompositeSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body - required: false responses: "200": content: @@ -906,21 +976,34 @@ paths: description: Output composite tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/BigDecimalMap: + get: + description: "for Java apache and Java native, test toUrlQueryString for maps\ + \ with BegDecimal keys" + operationId: fakeBigDecimalMap + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/fakeBigDecimalMap_200_response' + description: successful operation + tags: + - fake x-accepts: '*/*' /fake/jsonFormData: get: + description: "" operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testJsonFormData_request' - required: true responses: "200": - content: {} description: successful operation summary: test json serialization of form data tags: @@ -929,6 +1012,7 @@ paths: x-accepts: application/json /fake/inline-additionalProperties: post: + description: "" operationId: testInlineAdditionalProperties requestBody: content: @@ -941,23 +1025,23 @@ paths: required: true responses: "200": - content: {} description: successful operation summary: test inline additionalProperties tags: - fake - x-codegen-request-body-name: param x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams parameters: - - in: query + - explode: true + in: query name: query required: true schema: type: string + style: form requestBody: content: application/json: @@ -966,68 +1050,17 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: application/json /another-fake/dummy: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags - parameters: - - description: to test uuid example value - in: header - name: uuid_test - required: true - schema: - format: uuid - type: string requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -1038,12 +1071,11 @@ paths: summary: To test special tags tags: - $another-fake? - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: - description: "For this test, the body for this request much reference a schema\ + description: "For this test, the body for this request must reference a schema\ \ named `File`." operationId: testBodyWithFileSchema requestBody: @@ -1054,13 +1086,31 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json + /fake/body-with-binary: + put: + description: "For this test, the body has to be a binary file." + operationId: testBodyWithBinary + requestBody: + content: + image/png: + schema: + format: binary + nullable: true + type: string + description: image to upload + required: true + responses: + "200": + description: Success + tags: + - fake + x-content-type: image/png + x-accepts: application/json /fake/test-query-parameters: put: description: To test the collection format in query parameters @@ -1074,15 +1124,18 @@ paths: items: type: string type: array - style: form - - in: query + style: pipeDelimited + - explode: false + in: query name: ioutil required: true schema: items: type: string type: array - - in: query + style: form + - explode: false + in: query name: http required: true schema: @@ -1108,30 +1161,49 @@ paths: type: string type: array style: form + - explode: true + in: query + name: language + required: false + schema: + additionalProperties: + format: string + type: string + type: object + style: form + - allowEmptyValue: true + explode: true + in: query + name: allowEmpty + required: true + schema: + type: string + style: form responses: "200": - content: {} description: Success tags: - fake x-accepts: application/json /fake/{petId}/uploadImageWithRequiredFile: post: + description: "" operationId: uploadFileWithRequiredFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - required: true responses: "200": content: @@ -1148,8 +1220,91 @@ paths: - pet x-content-type: multipart/form-data x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string Order: example: petId: 6 @@ -1315,21 +1470,12 @@ components: message: type: string type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" Return: description: Model for testing reserved words properties: return: format: int32 type: integer - type: object xml: name: Return Name: @@ -1349,7 +1495,6 @@ components: type: integer required: - name - type: object xml: name: Name "200_response": @@ -1360,7 +1505,6 @@ components: type: integer class: type: string - type: object xml: name: Name ClassModel: @@ -1368,7 +1512,6 @@ components: properties: _class: type: string - type: object Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -1383,20 +1526,11 @@ components: declawed: type: boolean type: object - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object Animal: discriminator: + mapping: + DOG: '#/components/schemas/Dog' + CAT: '#/components/schemas/Cat' propertyName: className properties: className: @@ -1439,12 +1573,14 @@ components: maximum: 123.4 minimum: 67.8 type: number + decimal: + format: number + type: string string: pattern: "/[a-z]/i" type: string byte: format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" type: string binary: format: binary @@ -1464,8 +1600,14 @@ components: maxLength: 64 minLength: 10 type: string - BigDecimal: - format: number + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: "^\\d{10}$" + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: "/^image_\\d{1,3}$/i" type: string required: - byte @@ -1508,117 +1650,27 @@ components: type: number outerEnum: $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' required: - enum_string_required type: object AdditionalPropertiesClass: properties: - map_string: + map_property: additionalProperties: type: string type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: + map_of_map_property: additionalProperties: additionalProperties: type: string type: object type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -1708,6 +1760,8 @@ components: array_of_string: items: type: string + maxItems: 3 + minItems: 0 type: array array_array_of_integer: items: @@ -1764,7 +1818,29 @@ components: - placed - approved - delivered + nullable: true type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + example: 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer OuterComposite: example: my_string: my_string @@ -1814,243 +1890,133 @@ components: description: Test capitalization type: string type: object - TypeHolderDefault: + _special_model.name_: properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: + $special[property.name]: + format: int64 type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object xml: - namespace: http://a.com/schema - prefix: pre + name: "$special[model.name]" + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + OuterObjectWithEnumProperty: + example: + value: 2 + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + required: + - value + type: object + DeprecatedObject: + deprecated: true + properties: + name: + type: string + type: object + ObjectWithDeprecatedFields: + properties: + uuid: + type: string + id: + deprecated: true + type: number + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + deprecated: true + items: + $ref: '#/components/schemas/Bar' + type: array + type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string + _foo_get_default_response: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + type: object updatePetWithForm_request: properties: name: @@ -2094,7 +2060,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -2163,6 +2128,19 @@ components: - number - pattern_without_delimiter type: object + fakeBigDecimalMap_200_response: + example: + someId: 0.8008281904610115 + someMap: + key: 6.027456183070403 + properties: + someId: + type: number + someMap: + additionalProperties: + type: number + type: object + type: object testJsonFormData_request: properties: param: @@ -2207,5 +2185,11 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: "2.0" + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md index 79402f75c68..fe69a56eebf 100644 --- a/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/resttemplate/docs/AdditionalPropertiesClass.md @@ -7,17 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mapString** | **Map<String, String>** | | [optional] | -|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | -|**mapInteger** | **Map<String, Integer>** | | [optional] | -|**mapBoolean** | **Map<String, Boolean>** | | [optional] | -|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | -|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | -|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | -|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | -|**anytype1** | **Object** | | [optional] | -|**anytype2** | **Object** | | [optional] | -|**anytype3** | **Object** | | [optional] | +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/resttemplate/docs/AllOfWithSingleRef.md new file mode 100644 index 00000000000..4146d56a372 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | **SingleRefType** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md b/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md index e2b1f04ce7f..73c966d2d54 100644 --- a/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(uuidTest, body) +> Client call123testSpecialTags(client) To test special tags @@ -32,10 +32,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(uuidTest, body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -53,8 +52,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **uuidTest** | **UUID**| to test uuid example value | | -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/DefaultApi.md b/samples/client/petstore/java/resttemplate/docs/DefaultApi.md new file mode 100644 index 00000000000..2c56e1f90e5 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/DefaultApi.md @@ -0,0 +1,69 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | + + + +## fooGet + +> FooGetDefaultResponse fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + FooGetDefaultResponse result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/resttemplate/docs/DeprecatedObject.md b/samples/client/petstore/java/resttemplate/docs/DeprecatedObject.md new file mode 100644 index 00000000000..48de1d62442 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/EnumTest.md b/samples/client/petstore/java/resttemplate/docs/EnumTest.md index bf2def484c6..380a2aef0bc 100644 --- a/samples/client/petstore/java/resttemplate/docs/EnumTest.md +++ b/samples/client/petstore/java/resttemplate/docs/EnumTest.md @@ -12,6 +12,9 @@ |**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | |**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | |**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index 627366e41db..6eb12aee357 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -4,15 +4,19 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeBigDecimalMap**](FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | | +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | | [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | | [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | -| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | | [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | @@ -21,13 +25,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -## createXmlItem +## fakeBigDecimalMap -> createXmlItem(xmlItem) +> FakeBigDecimalMap200Response fakeBigDecimalMap() -creates an XmlItem -this route creates an XmlItem + +for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys ### Example @@ -45,11 +49,135 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - apiInstance.createXmlItem(xmlItem); + FakeBigDecimalMap200Response result = apiInstance.fakeBigDecimalMap(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeBigDecimalMap"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## fakeHealthGet + +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + HealthCheckResult result = apiInstance.fakeHealthGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeHttpSignatureTest + +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + apiInstance.fakeHttpSignatureTest(pet, query1, header1); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -64,7 +192,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | ### Return type @@ -72,18 +202,18 @@ null (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Content-Type**: application/json, application/xml - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | ## fakeOuterBooleanSerialize @@ -142,7 +272,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -154,7 +284,7 @@ No authorization required ## fakeOuterCompositeSerialize -> OuterComposite fakeOuterCompositeSerialize(body) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -176,9 +306,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -196,7 +326,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -208,7 +338,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -274,7 +404,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -340,7 +470,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -350,13 +480,13 @@ No authorization required | **200** | Output string | - | -## testBodyWithFileSchema +## fakePropertyEnumIntegerSerialize -> testBodyWithFileSchema(body) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) -For this test, the body for this request much reference a schema named `File`. +Test serialization of enum (int) properties with examples ### Example @@ -374,9 +504,140 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - apiInstance.testBodyWithFileSchema(body); + OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + + +## testBodyWithBinary + +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + File body = new File("/path/to/file"); // File | image to upload + try { + apiInstance.testBodyWithBinary(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testBodyWithFileSchema + +> testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(fileSchemaTestClass); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -393,7 +654,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -417,7 +678,7 @@ No authorization required ## testBodyWithQueryParams -> testBodyWithQueryParams(query, body) +> testBodyWithQueryParams(query, user) @@ -438,9 +699,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - apiInstance.testBodyWithQueryParams(query, body); + apiInstance.testBodyWithQueryParams(query, user); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -458,7 +719,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -482,7 +743,7 @@ No authorization required ## testClientModel -> Client testClientModel(body) +> Client testClientModel(client) To test \"client\" model @@ -504,9 +765,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClientModel(body); + Client result = apiInstance.testClientModel(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -524,7 +785,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -550,9 +811,9 @@ No authorization required > 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 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -646,7 +907,7 @@ null (empty response body) ## testEnumParameters -> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -674,10 +935,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -700,6 +962,7 @@ public class Example { | **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] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -739,6 +1002,7 @@ Fake endpoint to test group parameters (optional) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; @@ -746,6 +1010,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -785,7 +1053,7 @@ null (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -801,10 +1069,12 @@ No authorization required ## testInlineAdditionalProperties -> testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(requestBody) test inline additionalProperties + + ### Example ```java @@ -821,9 +1091,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - apiInstance.testInlineAdditionalProperties(param); + apiInstance.testInlineAdditionalProperties(requestBody); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -840,7 +1110,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -868,6 +1138,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -929,7 +1201,7 @@ No authorization required ## testQueryParameterCollectionFormat -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -956,8 +1228,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); @@ -979,6 +1253,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/FakeBigDecimalMap200Response.md b/samples/client/petstore/java/resttemplate/docs/FakeBigDecimalMap200Response.md new file mode 100644 index 00000000000..475be1d2d73 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/FakeBigDecimalMap200Response.md @@ -0,0 +1,14 @@ + + +# FakeBigDecimalMap200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**someId** | **BigDecimal** | | [optional] | +|**someMap** | **Map<String, BigDecimal>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md index 10d5ea30aa2..e4ff70ed909 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeClassnameTags123Api.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## testClassname -> Client testClassname(body) +> Client testClassname(client) To test class name in snake case @@ -39,9 +39,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClassname(body); + Client result = apiInstance.testClassname(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); @@ -59,7 +59,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate/docs/Foo.md b/samples/client/petstore/java/resttemplate/docs/Foo.md new file mode 100644 index 00000000000..6b3f0556528 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/resttemplate/docs/FooGetDefaultResponse.md new file mode 100644 index 00000000000..ff3d7a3a56c --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/FooGetDefaultResponse.md @@ -0,0 +1,13 @@ + + +# FooGetDefaultResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/FormatTest.md b/samples/client/petstore/java/resttemplate/docs/FormatTest.md index 9c68c3080e1..01b8c777ae0 100644 --- a/samples/client/petstore/java/resttemplate/docs/FormatTest.md +++ b/samples/client/petstore/java/resttemplate/docs/FormatTest.md @@ -13,6 +13,7 @@ |**number** | **BigDecimal** | | | |**_float** | **Float** | | [optional] | |**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | |**string** | **String** | | [optional] | |**_byte** | **byte[]** | | | |**binary** | **File** | | [optional] | @@ -20,7 +21,8 @@ |**dateTime** | **OffsetDateTime** | | [optional] | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | -|**bigDecimal** | **BigDecimal** | | [optional] | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/resttemplate/docs/HealthCheckResult.md b/samples/client/petstore/java/resttemplate/docs/HealthCheckResult.md new file mode 100644 index 00000000000..4885e6f1cad --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/NullableClass.md b/samples/client/petstore/java/resttemplate/docs/NullableClass.md new file mode 100644 index 00000000000..fa98c5c6d98 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/resttemplate/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 00000000000..f1cf571f4c0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/resttemplate/docs/OuterEnumDefaultValue.md new file mode 100644 index 00000000000..cbc7f4ba54d --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/resttemplate/docs/OuterEnumInteger.md b/samples/client/petstore/java/resttemplate/docs/OuterEnumInteger.md new file mode 100644 index 00000000000..f71dea30ad0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/resttemplate/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/resttemplate/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 00000000000..99e6389f427 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/resttemplate/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/resttemplate/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 00000000000..0fafaaa2715 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,13 @@ + + +# OuterObjectWithEnumProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/PetApi.md b/samples/client/petstore/java/resttemplate/docs/PetApi.md index 1e79e30ef6c..e2515d9bb9b 100644 --- a/samples/client/petstore/java/resttemplate/docs/PetApi.md +++ b/samples/client/petstore/java/resttemplate/docs/PetApi.md @@ -18,10 +18,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## addPet -> addPet(body) +> addPet(pet) Add a new pet to the store + + ### Example ```java @@ -43,9 +45,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.addPet(body); + apiInstance.addPet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -62,7 +64,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -81,7 +83,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -91,6 +93,8 @@ null (empty response body) Deletes a pet + + ### Example ```java @@ -152,7 +156,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | @@ -377,10 +381,12 @@ public class Example { ## updatePet -> updatePet(body) +> updatePet(pet) Update an existing pet + + ### Example ```java @@ -402,9 +408,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -421,7 +427,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -440,7 +446,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | @@ -452,6 +458,8 @@ null (empty response body) Updates a pet in the store with form data + + ### Example ```java @@ -515,6 +523,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -524,6 +533,8 @@ null (empty response body) uploads an image + + ### Example ```java @@ -597,6 +608,8 @@ public class Example { uploads an image (required) + + ### Example ```java diff --git a/samples/client/petstore/java/resttemplate/docs/SingleRefType.md b/samples/client/petstore/java/resttemplate/docs/SingleRefType.md new file mode 100644 index 00000000000..cc269bb871f --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/resttemplate/docs/StoreApi.md b/samples/client/petstore/java/resttemplate/docs/StoreApi.md index b64e208a83a..ce91137cc6f 100644 --- a/samples/client/petstore/java/resttemplate/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate/docs/StoreApi.md @@ -216,10 +216,12 @@ No authorization required ## placeOrder -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet + + ### Example ```java @@ -236,9 +238,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - Order result = apiInstance.placeOrder(body); + Order result = apiInstance.placeOrder(order); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); @@ -256,7 +258,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -268,7 +270,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json diff --git a/samples/client/petstore/java/resttemplate/docs/UserApi.md b/samples/client/petstore/java/resttemplate/docs/UserApi.md index dfdb4a7c0eb..305fd6e66df 100644 --- a/samples/client/petstore/java/resttemplate/docs/UserApi.md +++ b/samples/client/petstore/java/resttemplate/docs/UserApi.md @@ -17,7 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## createUser -> createUser(body) +> createUser(user) Create user @@ -39,9 +39,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -58,7 +58,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -70,7 +70,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -82,10 +82,12 @@ No authorization required ## createUsersWithArrayInput -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(user) Creates list of users with given input array + + ### Example ```java @@ -102,9 +104,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -121,7 +123,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -133,7 +135,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -145,10 +147,12 @@ No authorization required ## createUsersWithListInput -> createUsersWithListInput(body) +> createUsersWithListInput(user) Creates list of users with given input array + + ### Example ```java @@ -165,9 +169,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -184,7 +188,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -196,7 +200,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -278,6 +282,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -344,6 +350,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -411,6 +419,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -466,7 +476,7 @@ No authorization required ## updateUser -> updateUser(username, body) +> updateUser(username, user) Updated user @@ -489,9 +499,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - apiInstance.updateUser(username, body); + apiInstance.updateUser(username, user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); @@ -509,7 +519,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -521,7 +531,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java index 1f99e7d1f0b..7db043dde95 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java @@ -55,6 +55,7 @@ import java.time.OffsetDateTime; import org.openapitools.client.auth.Authentication; import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.ApiKeyAuth; import org.openapitools.client.auth.OAuth; @@ -114,6 +115,7 @@ public class ApiClient extends JavaTimeFormatter { authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); authentications.put("http_basic_test", new HttpBasicAuth()); + authentications.put("bearer_test", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -157,6 +159,21 @@ public class ApiClient extends JavaTimeFormatter { return authentications.get(authName); } + /** + * Helper method to set token for HTTP bearer authentication. + * + * @param bearerToken the token + */ + public void setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + /** * Helper method to set username for the first HTTP basic authentication. diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 6c611d3a66e..8854c9af946 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -3,7 +3,6 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; -import java.util.UUID; import java.util.Collections; import java.util.HashMap; @@ -50,35 +49,28 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client call123testSpecialTags(UUID uuidTest, Client body) throws RestClientException { - return call123testSpecialTagsWithHttpInfo(uuidTest, body).getBody(); + public Client call123testSpecialTags(Client client) throws RestClientException { + return call123testSpecialTagsWithHttpInfo(client).getBody(); } /** * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity call123testSpecialTagsWithHttpInfo(Client client) throws RestClientException { + Object localVarPostBody = client; - // verify the required parameter 'uuidTest' is set - if (uuidTest == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling call123testSpecialTags"); + // verify the required parameter 'client' is set + if (client == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'client' when calling call123testSpecialTags"); } @@ -87,9 +79,6 @@ public class AnotherFakeApi { final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); - if (uuidTest != null) - localVarHeaderParams.add("uuid_test", apiClient.parameterToString(uuidTest)); - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 00000000000..025bc870fba --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,87 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; + +import org.openapitools.client.model.FooGetDefaultResponse; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.stream.Collectors; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.FileSystemResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private ApiClient apiClient; + + public DefaultApi() { + this(new ApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + *

0 - response + * @return FooGetDefaultResponse + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public FooGetDefaultResponse fooGet() throws RestClientException { + return fooGetWithHttpInfo().getBody(); + } + + /** + * + * + *

0 - response + * @return ResponseEntity<FooGetDefaultResponse> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fooGetWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/foo", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } +} diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index 5e074c80d11..ea18b45cd97 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -4,13 +4,17 @@ import org.openapitools.client.ApiClient; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import java.util.Collections; import java.util.HashMap; @@ -54,30 +58,112 @@ public class FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys *

200 - successful operation - * @param xmlItem XmlItem Body (required) + * @return FakeBigDecimalMap200Response * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createXmlItem(XmlItem xmlItem) throws RestClientException { - createXmlItemWithHttpInfo(xmlItem); + public FakeBigDecimalMap200Response fakeBigDecimalMap() throws RestClientException { + return fakeBigDecimalMapWithHttpInfo().getBody(); } /** - * creates an XmlItem - * this route creates an XmlItem + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys *

200 - successful operation - * @param xmlItem XmlItem Body (required) + * @return ResponseEntity<FakeBigDecimalMap200Response> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeBigDecimalMapWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "*/*" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/BigDecimalMap", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * Health check endpoint + * + *

200 - The instance started successfully + * @return HealthCheckResult + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public HealthCheckResult fakeHealthGet() throws RestClientException { + return fakeHealthGetWithHttpInfo().getBody(); + } + + /** + * Health check endpoint + * + *

200 - The instance started successfully + * @return ResponseEntity<HealthCheckResult> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakeHealthGetWithHttpInfo() throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/health", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * test http signature authentication + * + *

200 - The instance started successfully + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws RestClientException { + fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); + } + + /** + * test http signature authentication + * + *

200 - The instance started successfully + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createXmlItemWithHttpInfo(XmlItem xmlItem) throws RestClientException { - Object localVarPostBody = xmlItem; + public ResponseEntity fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) throws RestClientException { + Object localVarPostBody = pet; - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'xmlItem' when calling createXmlItem"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); } @@ -86,17 +172,23 @@ public class FakeApi { final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "query_1", query1)); + + + if (header1 != null) + localVarHeaderParams.add("header_1", apiClient.parameterToString(header1)); + final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" + "application/json", "application/xml" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "http_signature_test" }; ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; - return apiClient.invokeAPI("/fake/create_xml_item", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + return apiClient.invokeAPI("/fake/http-signature-test", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); } /** * @@ -131,7 +223,9 @@ public class FakeApi { "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -143,24 +237,24 @@ public class FakeApi { * * Test serialization of object with outer number type *

200 - Output composite - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return OuterComposite * @throws RestClientException if an error occurs while attempting to invoke the API */ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws RestClientException { - return fakeOuterCompositeSerializeWithHttpInfo(body).getBody(); + public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws RestClientException { + return fakeOuterCompositeSerializeWithHttpInfo(outerComposite).getBody(); } /** * * Test serialization of object with outer number type *

200 - Output composite - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return ResponseEntity<OuterComposite> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws RestClientException { + Object localVarPostBody = outerComposite; final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); @@ -172,7 +266,9 @@ public class FakeApi { "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -213,7 +309,9 @@ public class FakeApi { "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -254,7 +352,9 @@ public class FakeApi { "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -264,29 +364,122 @@ public class FakeApi { } /** * - * For this test, the body for this request much reference a schema named `File`. - *

200 - Success - * @param body (required) + * Test serialization of enum (int) properties with examples + *

200 - Output enum (int) + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return OuterObjectWithEnumProperty * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testBodyWithFileSchema(FileSchemaTestClass body) throws RestClientException { - testBodyWithFileSchemaWithHttpInfo(body); + public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { + return fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty).getBody(); } /** * - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples + *

200 - Output enum (int) + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return ResponseEntity<OuterObjectWithEnumProperty> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { + Object localVarPostBody = outerObjectWithEnumProperty; + + // verify the required parameter 'outerObjectWithEnumProperty' is set + if (outerObjectWithEnumProperty == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize"); + } + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { + "*/*" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/property/enum-int", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * + * For this test, the body has to be a binary file. *

200 - Success - * @param body (required) + * @param body image to upload (required) + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void testBodyWithBinary(File body) throws RestClientException { + testBodyWithBinaryWithHttpInfo(body); + } + + /** + * + * For this test, the body has to be a binary file. + *

200 - Success + * @param body image to upload (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws RestClientException { + public ResponseEntity testBodyWithBinaryWithHttpInfo(File body) throws RestClientException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testBodyWithFileSchema"); + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testBodyWithBinary"); + } + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "image/png" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/body-with-binary", HttpMethod.PUT, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } + /** + * + * For this test, the body for this request must reference a schema named `File`. + *

200 - Success + * @param fileSchemaTestClass (required) + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws RestClientException { + testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + *

200 - Success + * @param fileSchemaTestClass (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws RestClientException { + Object localVarPostBody = fileSchemaTestClass; + + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); } @@ -312,11 +505,11 @@ public class FakeApi { * *

200 - Success * @param query (required) - * @param body (required) + * @param user (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testBodyWithQueryParams(String query, User body) throws RestClientException { - testBodyWithQueryParamsWithHttpInfo(query, body); + public void testBodyWithQueryParams(String query, User user) throws RestClientException { + testBodyWithQueryParamsWithHttpInfo(query, user); } /** @@ -324,21 +517,21 @@ public class FakeApi { * *

200 - Success * @param query (required) - * @param body (required) + * @param user (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, User body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, User user) throws RestClientException { + Object localVarPostBody = user; // verify the required parameter 'query' is set if (query == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testBodyWithQueryParams"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); } @@ -366,28 +559,28 @@ public class FakeApi { * To test \"client\" model * To test \"client\" model *

200 - successful operation - * @param body client model (required) + * @param client client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client testClientModel(Client body) throws RestClientException { - return testClientModelWithHttpInfo(body).getBody(); + public Client testClientModel(Client client) throws RestClientException { + return testClientModelWithHttpInfo(client).getBody(); } /** * To test \"client\" model * To test \"client\" model *

200 - successful operation - * @param body client model (required) + * @param client client model (required) * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testClientModelWithHttpInfo(Client body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity testClientModelWithHttpInfo(Client client) throws RestClientException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testClientModel"); + // verify the required parameter 'client' is set + if (client == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'client' when calling testClientModel"); } @@ -411,8 +604,8 @@ public class FakeApi { return apiClient.invokeAPI("/fake", HttpMethod.PATCH, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

400 - Invalid username supplied *

404 - User not found * @param number None (required) @@ -436,8 +629,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

400 - Invalid username supplied *

404 - User not found * @param number None (required) @@ -538,12 +731,13 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { - testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws RestClientException { + testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } /** @@ -557,12 +751,13 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { + public ResponseEntity testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws RestClientException { Object localVarPostBody = null; @@ -571,10 +766,11 @@ public class FakeApi { final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); - localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "enum_query_string_array", enumQueryStringArray)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_string", enumQueryString)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_integer", enumQueryInteger)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_query_double", enumQueryDouble)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "enum_query_model_array", enumQueryModelArray)); if (enumHeaderStringArray != null) @@ -668,7 +864,7 @@ public class FakeApi { final String[] localVarContentTypes = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "bearer_test" }; ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/fake", HttpMethod.DELETE, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); @@ -677,27 +873,27 @@ public class FakeApi { * test inline additionalProperties * *

200 - successful operation - * @param param request body (required) + * @param requestBody request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testInlineAdditionalProperties(Map param) throws RestClientException { - testInlineAdditionalPropertiesWithHttpInfo(param); + public void testInlineAdditionalProperties(Map requestBody) throws RestClientException { + testInlineAdditionalPropertiesWithHttpInfo(requestBody); } /** * test inline additionalProperties * *

200 - successful operation - * @param param request body (required) + * @param requestBody request body (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map param) throws RestClientException { - Object localVarPostBody = param; + public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) throws RestClientException { + Object localVarPostBody = requestBody; - // verify the required parameter 'param' is set - if (param == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"); + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); } @@ -784,10 +980,12 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws RestClientException { - testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws RestClientException { + testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language); } /** @@ -799,10 +997,12 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws RestClientException { + public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'pipe' is set @@ -830,17 +1030,24 @@ public class FakeApi { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); } + // verify the required parameter 'allowEmpty' is set + if (allowEmpty == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat"); + } + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); final HttpHeaders localVarHeaderParams = new HttpHeaders(); final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); - localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "pipe", pipe)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("pipes".toUpperCase(Locale.ROOT)), "pipe", pipe)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "ioutil", ioutil)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("ssv".toUpperCase(Locale.ROOT)), "http", http)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "url", url)); localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("multi".toUpperCase(Locale.ROOT)), "context", context)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "language", language)); + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "allowEmpty", allowEmpty)); final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 6744a0f8826..c4970bdf15a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -49,28 +49,28 @@ public class FakeClassnameTags123Api { * To test class name in snake case * To test class name in snake case *

200 - successful operation - * @param body client model (required) + * @param client client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client testClassname(Client body) throws RestClientException { - return testClassnameWithHttpInfo(body).getBody(); + public Client testClassname(Client client) throws RestClientException { + return testClassnameWithHttpInfo(client).getBody(); } /** * To test class name in snake case * To test class name in snake case *

200 - successful operation - * @param body client model (required) + * @param client client model (required) * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testClassnameWithHttpInfo(Client body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity testClassnameWithHttpInfo(Client client) throws RestClientException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling testClassname"); + // verify the required parameter 'client' is set + if (client == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'client' when calling testClassname"); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java index 1f5ad5f5e9b..75b0825e2e5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java @@ -51,30 +51,30 @@ public class PetApi { /** * Add a new pet to the store * - *

200 - successful operation + *

200 - Successful operation *

405 - Invalid input - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void addPet(Pet body) throws RestClientException { - addPetWithHttpInfo(body); + public void addPet(Pet pet) throws RestClientException { + addPetWithHttpInfo(pet); } /** * Add a new pet to the store * - *

200 - successful operation + *

200 - Successful operation *

405 - Invalid input - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + Object localVarPostBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling addPet"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pet' when calling addPet"); } @@ -98,7 +98,7 @@ public class PetApi { /** * Deletes a pet * - *

200 - successful operation + *

200 - Successful operation *

400 - Invalid pet value * @param petId Pet id to delete (required) * @param apiKey (optional) @@ -111,7 +111,7 @@ public class PetApi { /** * Deletes a pet * - *

200 - successful operation + *

200 - Successful operation *

400 - Invalid pet value * @param petId Pet id to delete (required) * @param apiKey (optional) @@ -310,34 +310,34 @@ public class PetApi { /** * Update an existing pet * - *

200 - successful operation + *

200 - Successful operation *

400 - Invalid ID supplied *

404 - Pet not found *

405 - Validation exception - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePet(Pet body) throws RestClientException { - updatePetWithHttpInfo(body); + public void updatePet(Pet pet) throws RestClientException { + updatePetWithHttpInfo(pet); } /** * Update an existing pet * - *

200 - successful operation + *

200 - Successful operation *

400 - Invalid ID supplied *

404 - Pet not found *

405 - Validation exception - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithHttpInfo(Pet body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientException { + Object localVarPostBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updatePet"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pet' when calling updatePet"); } @@ -361,6 +361,7 @@ public class PetApi { /** * Updates a pet in the store with form data * + *

200 - Successful operation *

405 - Invalid input * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) @@ -374,6 +375,7 @@ public class PetApi { /** * Updates a pet in the store with form data * + *

200 - Successful operation *

405 - Invalid input * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java index 2ece51a779c..ba2b8643176 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java @@ -190,12 +190,12 @@ public class StoreApi { * *

200 - successful operation *

400 - Invalid Order - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order placeOrder(Order body) throws RestClientException { - return placeOrderWithHttpInfo(body).getBody(); + public Order placeOrder(Order order) throws RestClientException { + return placeOrderWithHttpInfo(order).getBody(); } /** @@ -203,16 +203,16 @@ public class StoreApi { * *

200 - successful operation *

400 - Invalid Order - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity placeOrderWithHttpInfo(Order body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity placeOrderWithHttpInfo(Order order) throws RestClientException { + Object localVarPostBody = order; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling placeOrder"); + // verify the required parameter 'order' is set + if (order == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'order' when calling placeOrder"); } @@ -225,7 +225,9 @@ public class StoreApi { "application/xml", "application/json" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java index 749e18012fc..72054f302d6 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java @@ -50,27 +50,27 @@ public class UserApi { * Create user * This can only be done by the logged in user. *

0 - successful operation - * @param body Created user object (required) + * @param user Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUser(User body) throws RestClientException { - createUserWithHttpInfo(body); + public void createUser(User user) throws RestClientException { + createUserWithHttpInfo(user); } /** * Create user * This can only be done by the logged in user. *

0 - successful operation - * @param body Created user object (required) + * @param user Created user object (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUserWithHttpInfo(User body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity createUserWithHttpInfo(User user) throws RestClientException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling createUser"); } @@ -81,7 +81,9 @@ public class UserApi { final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -93,27 +95,27 @@ public class UserApi { * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object (required) + * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithArrayInput(List body) throws RestClientException { - createUsersWithArrayInputWithHttpInfo(body); + public void createUsersWithArrayInput(List user) throws RestClientException { + createUsersWithArrayInputWithHttpInfo(user); } /** * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object (required) + * @param user List of user object (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithArrayInputWithHttpInfo(List body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity createUsersWithArrayInputWithHttpInfo(List user) throws RestClientException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); } @@ -124,7 +126,9 @@ public class UserApi { final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -136,27 +140,27 @@ public class UserApi { * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object (required) + * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithListInput(List body) throws RestClientException { - createUsersWithListInputWithHttpInfo(body); + public void createUsersWithListInput(List user) throws RestClientException { + createUsersWithListInputWithHttpInfo(user); } /** * Creates list of users with given input array * *

0 - successful operation - * @param body List of user object (required) + * @param user List of user object (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithListInputWithHttpInfo(List body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity createUsersWithListInputWithHttpInfo(List user) throws RestClientException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling createUsersWithListInput"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling createUsersWithListInput"); } @@ -167,7 +171,9 @@ public class UserApi { final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; @@ -377,11 +383,11 @@ public class UserApi { *

400 - Invalid user supplied *

404 - User not found * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updateUser(String username, User body) throws RestClientException { - updateUserWithHttpInfo(username, body); + public void updateUser(String username, User user) throws RestClientException { + updateUserWithHttpInfo(username, user); } /** @@ -390,21 +396,21 @@ public class UserApi { *

400 - Invalid user supplied *

404 - User not found * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updateUserWithHttpInfo(String username, User body) throws RestClientException { - Object localVarPostBody = body; + public ResponseEntity updateUserWithHttpInfo(String username, User user) throws RestClientException { + Object localVarPostBody = user; // verify the required parameter 'username' is set if (username == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'username' when calling updateUser"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling updateUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'user' when calling updateUser"); } // create path and map variables @@ -418,7 +424,9 @@ public class UserApi { final String[] localVarAccepts = { }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - final String[] localVarContentTypes = { }; + final String[] localVarContentTypes = { + "application/json" + }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 5dbb3f42d39..e75bfc5b2b9 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -20,9 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -31,403 +29,85 @@ import com.fasterxml.jackson.annotation.JsonTypeName; * AdditionalPropertiesClass */ @JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString; + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; + private Map mapProperty; - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber; - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - private Map mapInteger; - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - private Map mapBoolean; - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - private Map> mapArrayInteger; - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - private Map> mapArrayAnytype; - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; - private Map> mapMapString; - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - private Map> mapMapAnytype; - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - private Object anytype3; + public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; + private Map> mapOfMapProperty; public AdditionalPropertiesClass() { } - public AdditionalPropertiesClass mapString(Map mapString) { + public AdditionalPropertiesClass mapProperty(Map mapProperty) { - this.mapString = mapString; + this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); } - this.mapString.put(key, mapStringItem); + this.mapProperty.put(key, mapPropertyItem); return this; } /** - * Get mapString - * @return mapString + * Get mapProperty + * @return mapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapString() { - return mapString; + public Map getMapProperty() { + return mapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapString(Map mapString) { - this.mapString = mapString; + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { - this.mapNumber = mapNumber; + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); } - this.mapNumber.put(key, mapNumberItem); + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; } /** - * Get mapNumber - * @return mapNumber + * Get mapOfMapProperty + * @return mapOfMapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapNumber() { - return mapNumber; + public Map> getMapOfMapProperty() { + return mapOfMapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapInteger() { - return mapInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapBoolean() { - return mapBoolean; - } - - - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapString() { - return mapMapString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype1() { - return anytype1; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype2() { - return anytype2; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype3() { - return anytype3; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; } @Override @@ -439,39 +119,21 @@ public class AdditionalPropertiesClass { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapProperty, mapOfMapProperty); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 00000000000..ff55e37f2d7 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,136 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private SingleRefType singleRefType; + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SingleRefType getSingleRefType() { + return singleRefType; + } + + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java index a40c65533eb..fd52da7ba5e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java @@ -40,9 +40,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Cat.class, name = "CAT"), + @JsonSubTypes.Type(value = Dog.class, name = "DOG"), }) public class Animal { diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java index a0a6af014cd..e9c3b88dd90 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java @@ -39,9 +39,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName; allowSetters = true // allows the className to be set during deserialization ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), -}) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 00000000000..73cccb0d2d3 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java index 0b2ba27fcb6..dc4dbac1001 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java @@ -21,6 +21,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -32,7 +39,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE }) @JsonTypeName("Enum_Test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -194,7 +204,16 @@ public class EnumTest { private EnumNumberEnum enumNumber; public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; public EnumTest() { } @@ -304,8 +323,8 @@ public class EnumTest { public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); - this.outerEnum = outerEnum; return this; } @@ -314,18 +333,104 @@ public class EnumTest { * @return outerEnum **/ @javax.annotation.Nullable + @JsonIgnore + + public OuterEnum getOuterEnum() { + return outerEnum.orElse(null); + } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OuterEnum getOuterEnum() { + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + } - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * @return outerEnumInteger + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * @return outerEnumDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + + public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; + } + + /** + * Get outerEnumIntegerDefaultValue + * @return outerEnumIntegerDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } @Override @@ -341,12 +446,26 @@ public class EnumTest { Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && Objects.equals(this.enumInteger, enumTest.enumInteger) && Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + equalsNullable(this.outerEnum, enumTest.outerEnum) && + Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && + Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -358,6 +477,9 @@ public class EnumTest { 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(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java new file mode 100644 index 00000000000..f665d859f64 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FakeBigDecimalMap200Response + */ +@JsonPropertyOrder({ + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_ID, + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_MAP +}) +@JsonTypeName("fakeBigDecimalMap_200_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FakeBigDecimalMap200Response { + public static final String JSON_PROPERTY_SOME_ID = "someId"; + private BigDecimal someId; + + public static final String JSON_PROPERTY_SOME_MAP = "someMap"; + private Map someMap; + + public FakeBigDecimalMap200Response() { + } + + public FakeBigDecimalMap200Response someId(BigDecimal someId) { + + this.someId = someId; + return this; + } + + /** + * Get someId + * @return someId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getSomeId() { + return someId; + } + + + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSomeId(BigDecimal someId) { + this.someId = someId; + } + + + public FakeBigDecimalMap200Response someMap(Map someMap) { + + this.someMap = someMap; + return this; + } + + public FakeBigDecimalMap200Response putSomeMapItem(String key, BigDecimal someMapItem) { + if (this.someMap == null) { + this.someMap = new HashMap<>(); + } + this.someMap.put(key, someMapItem); + return this; + } + + /** + * Get someMap + * @return someMap + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getSomeMap() { + return someMap; + } + + + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSomeMap(Map someMap) { + this.someMap = someMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o; + return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) && + Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap); + } + + @Override + public int hashCode() { + return Objects.hash(someId, someMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FakeBigDecimalMap200Response {\n"); + sb.append(" someId: ").append(toIndentedString(someId)).append("\n"); + sb.append(" someMap: ").append(toIndentedString(someMap)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 00000000000..0ae068735bd --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,103 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBar(String bar) { + this.bar = bar; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java new file mode 100644 index 00000000000..0626a5810e6 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FooGetDefaultResponse + */ +@JsonPropertyOrder({ + FooGetDefaultResponse.JSON_PROPERTY_STRING +}) +@JsonTypeName("_foo_get_default_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FooGetDefaultResponse { + public static final String JSON_PROPERTY_STRING = "string"; + private Foo string; + + public FooGetDefaultResponse() { + } + + public FooGetDefaultResponse string(Foo string) { + + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(Foo string) { + this.string = string; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; + return Objects.equals(this.string, fooGetDefaultResponse.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooGetDefaultResponse {\n"); + sb.append(" string: ").append(toIndentedString(string)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java index 9831eac4992..1efd4270dd5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; FormatTest.JSON_PROPERTY_NUMBER, FormatTest.JSON_PROPERTY_FLOAT, FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_DECIMAL, FormatTest.JSON_PROPERTY_STRING, FormatTest.JSON_PROPERTY_BYTE, FormatTest.JSON_PROPERTY_BINARY, @@ -45,7 +46,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER }) @JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -68,6 +70,9 @@ public class FormatTest { public static final String JSON_PROPERTY_DOUBLE = "double"; private Double _double; + public static final String JSON_PROPERTY_DECIMAL = "decimal"; + private BigDecimal decimal; + public static final String JSON_PROPERTY_STRING = "string"; private String string; @@ -89,8 +94,11 @@ public class FormatTest { public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + private String patternWithDigits; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; + private String patternWithDigitsAndDelimiter; public FormatTest() { } @@ -261,6 +269,32 @@ public class FormatTest { } + public FormatTest decimal(BigDecimal decimal) { + + this.decimal = decimal; + return this; + } + + /** + * Get decimal + * @return decimal + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDecimal() { + return decimal; + } + + + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecimal(BigDecimal decimal) { + this.decimal = decimal; + } + + public FormatTest string(String string) { this.string = string; @@ -443,29 +477,55 @@ public class FormatTest { } - public FormatTest bigDecimal(BigDecimal bigDecimal) { + public FormatTest patternWithDigits(String patternWithDigits) { - this.bigDecimal = bigDecimal; + this.patternWithDigits = patternWithDigits; return this; } /** - * Get bigDecimal - * @return bigDecimal + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getBigDecimal() { - return bigDecimal; + public String getPatternWithDigits() { + return patternWithDigits; } - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } @Override @@ -483,6 +543,7 @@ public class FormatTest { Objects.equals(this.number, formatTest.number) && Objects.equals(this._float, formatTest._float) && Objects.equals(this._double, formatTest._double) && + Objects.equals(this.decimal, formatTest.decimal) && Objects.equals(this.string, formatTest.string) && Arrays.equals(this._byte, formatTest._byte) && Objects.equals(this.binary, formatTest.binary) && @@ -490,12 +551,13 @@ public class FormatTest { Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -508,6 +570,7 @@ public class FormatTest { 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(" decimal: ").append(toIndentedString(decimal)).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"); @@ -515,7 +578,8 @@ public class FormatTest { 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(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 00000000000..b156198397f --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,126 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 00000000000..10249dcb054 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,625 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullableClass extends HashMap { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + private List arrayItemsNullable; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + private Map objectItemsNullable; + + public NullableClass() { + + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 00000000000..1a3e502685b --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,218 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + private List bars; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBars(List bars) { + this.bars = bars; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnum.java index d2924eb9c29..4cd955b63dc 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -55,7 +55,7 @@ public enum OuterEnum { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 00000000000..73077cc8c31 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 00000000000..e6c2e38c2e7 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 00000000000..ef61373b187 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java new file mode 100644 index 00000000000..0b8b5f66164 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.OuterEnumInteger; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * OuterObjectWithEnumProperty + */ +@JsonPropertyOrder({ + OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OuterObjectWithEnumProperty { + public static final String JSON_PROPERTY_VALUE = "value"; + private OuterEnumInteger value; + + public OuterObjectWithEnumProperty() { + } + + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { + + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OuterEnumInteger getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(OuterEnumInteger value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; + return Objects.equals(this.value, outerObjectWithEnumProperty.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterObjectWithEnumProperty {\n"); + sb.append(" value: ").append(toIndentedString(value)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 00000000000..f9922454755 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java index bedacb16913..8c6588d73f4 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; @JsonPropertyOrder({ SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME }) -@JsonTypeName("$special[model.name]") +@JsonTypeName("_special_model.name_") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SpecialModelName { public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; @@ -71,8 +71,8 @@ public class SpecialModelName { if (o == null || getClass() != o.getClass()) { return false; } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); } @Override diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/ApiClientTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/ApiClientTest.java deleted file mode 100644 index 209dc88998f..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/ApiClientTest.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.openapitools.client; - -import static org.junit.Assert.assertEquals; - -import java.util.HashMap; -import java.util.Map; -import org.junit.Before; -import org.junit.Test; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; - -public class ApiClientTest { - - ApiClient apiClient; - - @Before - public void setup() { - apiClient = new ApiClient(); - } - - /** - * Test uri encoding when params contains comma - */ - @Test - public void testUriEncoderWithComma() { - Map uriParams = new HashMap<>(); - MultiValueMap queryParams = new LinkedMultiValueMap(); - queryParams.add("ke,&y", "val,?&comma"); - String queryTemplate = apiClient.generateQueryUri(queryParams, uriParams); - assertEquals("ke%2C%26y=val%2C%3F%26comma", apiClient.expandPath(queryTemplate, uriParams)); - } - - @Test - public void testPathParamEncoding() { - Map uriParams = new HashMap<>(); - uriParams.put("username", "user_name,comma& space"); - assertEquals("user/user_name%2Ccomma%26amp%20space", apiClient.expandPath("user/{username}", uriParams)); - } - - @Test - public void testPathAndQueryParamEncoding() { - Map uriParams = new HashMap<>(); - MultiValueMap queryParams = new LinkedMultiValueMap(); - queryParams.add("key", "val,comma?q-mark&"); - uriParams.put("username", "user_name,comma& space"); - String template = "user/{username}?" + apiClient.generateQueryUri(queryParams, uriParams); - assertEquals("user/user_name%2Ccomma%26amp%20space?key=val%2Ccomma%3Fq-mark%26amp", - apiClient.expandPath(template, uriParams)); - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index f9ca5b113f5..18f72bae0a7 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -17,6 +17,8 @@ import org.openapitools.client.model.Client; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -41,8 +43,8 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() { - Client body = null; - Client response = api.call123testSpecialTags(body); + Client client = null; + Client response = api.call123testSpecialTags(client); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 00000000000..a89218d06ec --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.model.FooGetDefaultResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DefaultApi + */ +@Ignore +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fooGetTest() { + FooGetDefaultResponse response = api.fooGet(); + + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeApiTest.java index 55eece2b2af..2d7877ea03f 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -15,16 +15,22 @@ package org.openapitools.client.api; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -40,17 +46,49 @@ public class FakeApiTest { /** - * creates an XmlItem + * * - * this route creates an XmlItem + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * * @throws ApiException * if the Api call fails */ @Test - public void createXmlItemTest() { - XmlItem xmlItem = null; - api.createXmlItem(xmlItem); + public void fakeBigDecimalMapTest() { + FakeBigDecimalMap200Response response = api.fakeBigDecimalMap(); + + // TODO: test validations + } + + /** + * Health check endpoint + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHealthGetTest() { + HealthCheckResult response = api.fakeHealthGet(); + + // TODO: test validations + } + + /** + * test http signature authentication + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHttpSignatureTestTest() { + Pet pet = null; + String query1 = null; + String header1 = null; + api.fakeHttpSignatureTest(pet, query1, header1); // TODO: test validations } @@ -81,8 +119,8 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() { - OuterComposite body = null; - OuterComposite response = api.fakeOuterCompositeSerialize(body); + OuterComposite outerComposite = null; + OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); // TODO: test validations } @@ -122,15 +160,47 @@ public class FakeApiTest { /** * * - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakePropertyEnumIntegerSerializeTest() { + OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; + OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + + // TODO: test validations + } + + /** + * + * + * For this test, the body has to be a binary file. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithBinaryTest() { + File body = null; + api.testBodyWithBinary(body); + + // TODO: test validations + } + + /** + * + * + * For this test, the body for this request must reference a schema named `File`. * * @throws ApiException * if the Api call fails */ @Test public void testBodyWithFileSchemaTest() { - FileSchemaTestClass body = null; - api.testBodyWithFileSchema(body); + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema(fileSchemaTestClass); // TODO: test validations } @@ -146,8 +216,8 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() { String query = null; - User body = null; - api.testBodyWithQueryParams(query, body); + User user = null; + api.testBodyWithQueryParams(query, user); // TODO: test validations } @@ -162,16 +232,16 @@ public class FakeApiTest { */ @Test public void testClientModelTest() { - Client body = null; - Client response = api.testClientModel(body); + Client client = null; + Client response = api.testClientModel(client); // TODO: test validations } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws ApiException * if the Api call fails @@ -213,9 +283,10 @@ public class FakeApiTest { String enumQueryString = null; Integer enumQueryInteger = null; Double enumQueryDouble = null; + List enumQueryModelArray = null; List enumFormStringArray = null; String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); // TODO: test validations } @@ -251,8 +322,8 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() { - Map param = null; - api.testInlineAdditionalProperties(param); + Map requestBody = null; + api.testInlineAdditionalProperties(requestBody); // TODO: test validations } @@ -289,7 +360,9 @@ public class FakeApiTest { List http = null; List url = null; List context = null; - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + String allowEmpty = null; + Map language = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 41c61a869e6..ae8acadcf7d 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -17,6 +17,8 @@ import org.openapitools.client.model.Client; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -41,8 +43,8 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() { - Client body = null; - Client response = api.testClassname(body); + Client client = null; + Client response = api.testClassname(client); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/PetApiTest.java index 4aef09fc0ed..1afa92dcd02 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -20,6 +20,8 @@ import java.util.Set; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -44,8 +46,8 @@ public class PetApiTest { */ @Test public void addPetTest() { - Pet body = null; - api.addPet(body); + Pet pet = null; + api.addPet(pet); // TODO: test validations } @@ -125,8 +127,8 @@ public class PetApiTest { */ @Test public void updatePetTest() { - Pet body = null; - api.updatePet(body); + Pet pet = null; + api.updatePet(pet); // TODO: test validations } @@ -161,8 +163,8 @@ public class PetApiTest { public void uploadFileTest() { Long petId = null; String additionalMetadata = null; - File file = null; - ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + File _file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java index 0e7d086feab..31110dfa993 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -17,6 +17,8 @@ import org.openapitools.client.model.Order; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -88,8 +90,8 @@ public class StoreApiTest { */ @Test public void placeOrderTest() { - Order body = null; - Order response = api.placeOrder(body); + Order order = null; + Order response = api.placeOrder(order); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/UserApiTest.java index ce205e18b92..d7ddc576767 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -13,10 +13,13 @@ package org.openapitools.client.api; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -41,8 +44,8 @@ public class UserApiTest { */ @Test public void createUserTest() { - User body = null; - api.createUser(body); + User user = null; + api.createUser(user); // TODO: test validations } @@ -57,8 +60,8 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() { - List body = null; - api.createUsersWithArrayInput(body); + List user = null; + api.createUsersWithArrayInput(user); // TODO: test validations } @@ -73,8 +76,8 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() { - List body = null; - api.createUsersWithListInput(body); + List user = null; + api.createUsersWithListInput(user); // TODO: test validations } @@ -154,8 +157,8 @@ public class UserApiTest { @Test public void updateUserTest() { String username = null; - User body = null; - api.updateUser(username, body); + User user = null; + api.updateUser(username, user); // TODO: test validations } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java deleted file mode 100644 index 4f6fd800ab7..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesAnyType - */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - - /** - * Model tests for AdditionalPropertiesAnyType - */ - @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java deleted file mode 100644 index 41e6497ecee..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ /dev/null @@ -1,51 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesArray - */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - - /** - * Model tests for AdditionalPropertiesArray - */ - @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java deleted file mode 100644 index d2e17831ba7..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesBoolean - */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - - /** - * Model tests for AdditionalPropertiesBoolean - */ - @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 14fd8022feb..29bc5ae9694 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -18,15 +18,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesClass */ @@ -42,91 +39,19 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapString' + * Test the property 'mapProperty' */ @Test - public void mapStringTest() { - // TODO: test mapString + public void mapPropertyTest() { + // TODO: test mapProperty } /** - * Test the property 'mapNumber' + * Test the property 'mapOfMapProperty' */ @Test - public void mapNumberTest() { - // TODO: test mapNumber - } - - /** - * Test the property 'mapInteger' - */ - @Test - public void mapIntegerTest() { - // TODO: test mapInteger - } - - /** - * Test the property 'mapBoolean' - */ - @Test - public void mapBooleanTest() { - // TODO: test mapBoolean - } - - /** - * Test the property 'mapArrayInteger' - */ - @Test - public void mapArrayIntegerTest() { - // TODO: test mapArrayInteger - } - - /** - * Test the property 'mapArrayAnytype' - */ - @Test - public void mapArrayAnytypeTest() { - // TODO: test mapArrayAnytype - } - - /** - * Test the property 'mapMapString' - */ - @Test - public void mapMapStringTest() { - // TODO: test mapMapString - } - - /** - * Test the property 'mapMapAnytype' - */ - @Test - public void mapMapAnytypeTest() { - // TODO: test mapMapAnytype - } - - /** - * Test the property 'anytype1' - */ - @Test - public void anytype1Test() { - // TODO: test anytype1 - } - - /** - * Test the property 'anytype2' - */ - @Test - public void anytype2Test() { - // TODO: test anytype2 - } - - /** - * Test the property 'anytype3' - */ - @Test - public void anytype3Test() { - // TODO: test anytype3 + public void mapOfMapPropertyTest() { + // TODO: test mapOfMapProperty } } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java deleted file mode 100644 index 58b7521c6a7..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesInteger - */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - - /** - * Model tests for AdditionalPropertiesInteger - */ - @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java deleted file mode 100644 index bcbb9c54b27..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesObject - */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); - - /** - * Model tests for AdditionalPropertiesObject - */ - @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java deleted file mode 100644 index f7662d6c469..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesString - */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); - - /** - * Model tests for AdditionalPropertiesString - */ - @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java new file mode 100644 index 00000000000..dad0e9235de --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -0,0 +1,56 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AllOfWithSingleRef + */ +public class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); + + /** + * Model tests for AllOfWithSingleRef + */ + @Test + public void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + public void singleRefTypeTest() { + // TODO: test singleRefType + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AnimalTest.java index 930e5c17d07..da5609b5489 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,14 +21,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.Cat; -import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Animal */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 57a1c4f37ec..cbc199f1575 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 4f127b838bc..762f9d6dc33 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 5874400602c..20dc34a8c51 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayTest */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 765bd150512..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,75 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CapitalizationTest.java index c69ffc12a07..4fd3728ab89 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Capitalization */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatTest.java index 90fdba14c24..d591bdd30ef 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatTest.java @@ -22,12 +22,10 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Cat */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java index 393f73bd5e6..12de38c0c08 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Category */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClassModelTest.java index 5005bcb800e..d1936d85e81 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ClassModel */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClientTest.java index bda3b360b74..7aa0f5859ff 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ClientTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Client */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java similarity index 71% rename from samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java rename to samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index f7662d6c469..65fd3cc0b76 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -18,25 +18,22 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesString + * Model tests for DeprecatedObject */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); +public class DeprecatedObjectTest { + private final DeprecatedObject model = new DeprecatedObject(); /** - * Model tests for AdditionalPropertiesString + * Model tests for DeprecatedObject */ @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString + public void testDeprecatedObject() { + // TODO: test DeprecatedObject } /** diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogTest.java index de77d6711bd..744c8a406fe 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Dog */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 73206626b9c..694e4196138 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -19,12 +19,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumArrays */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd..3f50e1bfb9e 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumClass */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumTestTest.java index 8907cfa8e8f..0a1fd0f4268 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -19,11 +19,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumTest */ @@ -78,4 +84,28 @@ public class EnumTestTest { // TODO: test outerEnum } + /** + * Test the property 'outerEnumInteger' + */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } + + /** + * Test the property 'outerEnumDefaultValue' + */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + + /** + * Test the property 'outerEnumIntegerDefaultValue' + */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } + } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java similarity index 62% rename from samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java rename to samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java index 10ad938f52c..88c1d374be6 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java @@ -25,27 +25,34 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesNumber + * Model tests for FakeBigDecimalMap200Response */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); +public class FakeBigDecimalMap200ResponseTest { + private final FakeBigDecimalMap200Response model = new FakeBigDecimalMap200Response(); /** - * Model tests for AdditionalPropertiesNumber + * Model tests for FakeBigDecimalMap200Response */ @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber + public void testFakeBigDecimalMap200Response() { + // TODO: test FakeBigDecimalMap200Response } /** - * Test the property 'name' + * Test the property 'someId' */ @Test - public void nameTest() { - // TODO: test name + public void someIdTest() { + // TODO: test someId + } + + /** + * Test the property 'someMap' + */ + @Test + public void someMapTest() { + // TODO: test someMap } } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index 493d84aa1bc..fb8827a1e88 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ModelFile; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FileSchemaTestClass */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java new file mode 100644 index 00000000000..cd15af86ee9 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FooGetDefaultResponse + */ +public class FooGetDefaultResponseTest { + private final FooGetDefaultResponse model = new FooGetDefaultResponse(); + + /** + * Model tests for FooGetDefaultResponse + */ + @Test + public void testFooGetDefaultResponse() { + // TODO: test FooGetDefaultResponse + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FooTest.java new file mode 100644 index 00000000000..2a92367019b --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FooTest.java @@ -0,0 +1,47 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Foo + */ +public class FooTest { + private final Foo model = new Foo(); + + /** + * Model tests for Foo + */ + @Test + public void testFoo() { + // TODO: test Foo + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FormatTestTest.java index 48bec93d994..8a9d3adfc01 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FormatTest */ @@ -90,6 +89,14 @@ public class FormatTestTest { // TODO: test _double } + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + /** * Test the property 'string' */ @@ -147,11 +154,19 @@ public class FormatTestTest { } /** - * Test the property 'bigDecimal' + * Test the property 'patternWithDigits' */ @Test - public void bigDecimalTest() { - // TODO: test bigDecimal + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** + * Test the property 'patternWithDigitsAndDelimiter' + */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter } } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index da9073d4500..bf777b061cc 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for HasOnlyReadOnly */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 00000000000..e96ffaa18f4 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for HealthCheckResult + */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** + * Model tests for HealthCheckResult + */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** + * Test the property 'nullableMessage' + */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MapTestTest.java index 22c8519472b..50e909f0381 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MapTest */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index f29932e96be..b16858dc17e 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 0cd3f976198..dd90f6799d3 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Model200Response */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index be8cca35e3e..e63f2ae5e9c 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelApiResponse */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelFileTest.java index a0247ae71be..264249edc1c 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelFile */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelListTest.java index 0ead99db3a5..81fd2dcc6a6 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelList */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b6ca02f8d23..5840d4f8f0c 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelReturn */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NameTest.java index 07684c9eb40..9280c171539 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Name */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 00000000000..c79c6366f83 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for NullableClass + */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** + * Model tests for NullableClass + */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** + * Test the property 'integerProp' + */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** + * Test the property 'numberProp' + */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** + * Test the property 'booleanProp' + */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** + * Test the property 'stringProp' + */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** + * Test the property 'dateProp' + */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** + * Test the property 'datetimeProp' + */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** + * Test the property 'arrayNullableProp' + */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** + * Test the property 'arrayAndItemsNullableProp' + */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** + * Test the property 'arrayItemsNullable' + */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** + * Test the property 'objectNullableProp' + */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** + * Test the property 'objectAndItemsNullableProp' + */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** + * Test the property 'objectItemsNullable' + */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 878095093ad..63b5bc0440e 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for NumberOnly */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java similarity index 55% rename from samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java rename to samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index 8c096c188fc..4203b62f784 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -20,64 +20,57 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.DeprecatedObject; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); +public class ObjectWithDeprecatedFieldsTest { + private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault + public void testObjectWithDeprecatedFields() { + // TODO: test ObjectWithDeprecatedFields } /** - * Test the property 'stringItem' + * Test the property 'uuid' */ @Test - public void stringItemTest() { - // TODO: test stringItem + public void uuidTest() { + // TODO: test uuid } /** - * Test the property 'numberItem' + * Test the property 'id' */ @Test - public void numberItemTest() { - // TODO: test numberItem + public void idTest() { + // TODO: test id } /** - * Test the property 'integerItem' + * Test the property 'deprecatedRef' */ @Test - public void integerItemTest() { - // TODO: test integerItem + public void deprecatedRefTest() { + // TODO: test deprecatedRef } /** - * Test the property 'boolItem' + * Test the property 'bars' */ @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem + public void barsTest() { + // TODO: test bars } } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OrderTest.java index f31e10a9df1..e0fbb529af6 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OrderTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Order */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 8b823572e5e..840cf65c8d0 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterComposite */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 00000000000..5b9bae28ec6 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumDefaultValue + */ +public class OuterEnumDefaultValueTest { + /** + * Model tests for OuterEnumDefaultValue + */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 00000000000..731acbf905f --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumIntegerDefaultValue + */ +public class OuterEnumIntegerDefaultValueTest { + /** + * Model tests for OuterEnumIntegerDefaultValue + */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 00000000000..234945cec0f --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumInteger + */ +public class OuterEnumIntegerTest { + /** + * Model tests for OuterEnumInteger + */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf..b312b11a09e 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterEnum */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java similarity index 64% rename from samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java rename to samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java index 58b7521c6a7..964d1281b21 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java @@ -18,33 +18,31 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; +import org.openapitools.client.model.OuterEnumInteger; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesInteger + * Model tests for OuterObjectWithEnumProperty */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); +public class OuterObjectWithEnumPropertyTest { + private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty(); /** - * Model tests for AdditionalPropertiesInteger + * Model tests for OuterObjectWithEnumProperty */ @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger + public void testOuterObjectWithEnumProperty() { + // TODO: test OuterObjectWithEnumProperty } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java index b48657d0c9a..ca23198fbf1 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/PetTest.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -29,7 +30,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Pet */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index 26356ec2048..b356d6993c5 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ReadOnlyFirst */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 00000000000..920d02c930c --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SingleRefType + */ +public class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + public void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 4e59989875a..8eb0b1bd269 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for SpecialModelName */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java index 5aeb2f3f948..6dc0868167c 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TagTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Tag */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index b1655df6165..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'floatItem' - */ - @Test - public void floatItemTest() { - // TODO: test floatItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/UserTest.java index e0153a4cf1b..b029d279409 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/UserTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for User */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 4bab95a9126..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,275 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNsString' - */ - @Test - public void prefixNsStringTest() { - // TODO: test prefixNsString - } - - /** - * Test the property 'prefixNsNumber' - */ - @Test - public void prefixNsNumberTest() { - // TODO: test prefixNsNumber - } - - /** - * Test the property 'prefixNsInteger' - */ - @Test - public void prefixNsIntegerTest() { - // TODO: test prefixNsInteger - } - - /** - * Test the property 'prefixNsBoolean' - */ - @Test - public void prefixNsBooleanTest() { - // TODO: test prefixNsBoolean - } - - /** - * Test the property 'prefixNsArray' - */ - @Test - public void prefixNsArrayTest() { - // TODO: test prefixNsArray - } - - /** - * Test the property 'prefixNsWrappedArray' - */ - @Test - public void prefixNsWrappedArrayTest() { - // TODO: test prefixNsWrappedArray - } - -} diff --git a/samples/client/petstore/java/vertx/.openapi-generator/FILES b/samples/client/petstore/java/vertx/.openapi-generator/FILES index 594a8dee889..d7d207ca6c3 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/FILES +++ b/samples/client/petstore/java/vertx/.openapi-generator/FILES @@ -5,34 +5,33 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md -docs/BigCat.md docs/Capitalization.md docs/Cat.md docs/Category.md docs/ClassModel.md docs/Client.md +docs/DefaultApi.md +docs/DeprecatedObject.md docs/Dog.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md docs/FakeApi.md +docs/FakeBigDecimalMap200Response.md docs/FakeClassnameTags123Api.md docs/FileSchemaTestClass.md +docs/Foo.md +docs/FooGetDefaultResponse.md docs/FormatTest.md docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -41,21 +40,25 @@ docs/ModelFile.md docs/ModelList.md docs/ModelReturn.md docs/Name.md +docs/NullableClass.md docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md docs/OuterComposite.md docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md docs/User.md docs/UserApi.md -docs/XmlItem.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -76,6 +79,8 @@ src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/StringUtil.java src/main/java/org/openapitools/client/api/AnotherFakeApi.java src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java +src/main/java/org/openapitools/client/api/DefaultApi.java +src/main/java/org/openapitools/client/api/DefaultApiImpl.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeApiImpl.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -87,6 +92,7 @@ src/main/java/org/openapitools/client/api/StoreApiImpl.java src/main/java/org/openapitools/client/api/UserApi.java src/main/java/org/openapitools/client/api/UserApiImpl.java src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java +src/main/java/org/openapitools/client/api/rxjava/DefaultApi.java src/main/java/org/openapitools/client/api/rxjava/FakeApi.java src/main/java/org/openapitools/client/api/rxjava/FakeClassnameTags123Api.java src/main/java/org/openapitools/client/api/rxjava/PetApi.java @@ -98,31 +104,29 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/auth/OAuth.java src/main/java/org/openapitools/client/auth/OAuthFlow.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java +src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java +src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +src/main/java/org/openapitools/client/model/Foo.java +src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/client/model/HealthCheckResult.java src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/Model200Response.java @@ -131,15 +135,19 @@ src/main/java/org/openapitools/client/model/ModelFile.java src/main/java/org/openapitools/client/model/ModelList.java src/main/java/org/openapitools/client/model/ModelReturn.java src/main/java/org/openapitools/client/model/Name.java +src/main/java/org/openapitools/client/model/NullableClass.java src/main/java/org/openapitools/client/model/NumberOnly.java +src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/OuterComposite.java src/main/java/org/openapitools/client/model/OuterEnum.java +src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +src/main/java/org/openapitools/client/model/OuterEnumInteger.java +src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/vertx/README.md b/samples/client/petstore/java/vertx/README.md index 59bdb94a857..883a558aa74 100644 --- a/samples/client/petstore/java/vertx/README.md +++ b/samples/client/petstore/java/vertx/README.md @@ -91,10 +91,9 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(uuidTest, body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -115,15 +114,20 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem +*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | +*FakeApi* | [**fakeBigDecimalMap**](docs/FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | +*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication *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* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | *FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -155,31 +159,29 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [BigCat](docs/BigCat.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) + - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) + - [FakeBigDecimalMap200Response](docs/FakeBigDecimalMap200Response.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - [FormatTest](docs/FormatTest.md) - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -188,18 +190,22 @@ Class | Method | HTTP request | Description - [ModelList](docs/ModelList.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) + - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) - [OuterEnum](docs/OuterEnum.md) + - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OuterEnumInteger](docs/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) @@ -240,6 +246,18 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### bearer_test + + +- **Type**: HTTP Bearer Token authentication (JWT) + + +### http_signature_test + + +- **Type**: HTTP signature authentication + ## Recommendation diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 933d7332521..9f0affe779f 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ @@ -9,7 +9,30 @@ info: title: OpenAPI Petstore version: 1.0.0 servers: -- url: http://petstore.swagger.io:80/v2 +- description: petstore server + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: "https://localhost:8080/{version}" + variables: + version: + default: v2 + enum: + - v1 + - v2 +- description: The local server without variables + url: https://127.0.0.1/no_varaible tags: - description: Everything about your Pets name: pet @@ -18,25 +41,26 @@ tags: - description: Operations about user name: user paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/_foo_get_default_response' + description: response + x-accepts: application/json /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,33 +69,21 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json put: + description: "" operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -80,15 +92,34 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body + x-webclient-blocking: true x-content-type: application/json x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -118,7 +149,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: @@ -127,6 +157,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -163,7 +194,6 @@ paths: uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: @@ -172,28 +202,33 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -208,12 +243,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -225,35 +262,38 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/updatePetWithForm_request' responses: + "200": + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -266,15 +306,18 @@ paths: x-accepts: application/json /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -315,13 +358,15 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -337,13 +382,11 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -352,17 +395,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: order_id required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -374,6 +417,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: order_id required: true @@ -382,6 +426,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -393,10 +438,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -408,81 +451,68 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -496,16 +526,19 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -513,10 +546,10 @@ paths: x-accepts: application/json /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -528,31 +561,34 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Delete user tags: - user x-accepts: application/json get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -564,10 +600,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -578,42 +612,36 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -626,7 +654,6 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake: @@ -635,44 +662,60 @@ paths: operationId: testGroupParameters parameters: - description: Required String in group parameters + explode: true in: query name: required_string_group required: true schema: type: integer + style: form - description: Required Boolean in group parameters + explode: false in: header name: required_boolean_group required: true schema: type: boolean + style: simple - description: Required Integer in group parameters + explode: true in: query name: required_int64_group required: true schema: format: int64 type: integer + style: form - description: String in group parameters + explode: true in: query name: string_group + required: false schema: type: integer + style: form - description: Boolean in group parameters + explode: false in: header name: boolean_group + required: false schema: type: boolean + style: simple - description: Integer in group parameters + explode: true in: query name: int64_group + required: false schema: format: int64 type: integer + style: form responses: "400": - content: {} description: Something wrong + security: + - bearer_test: [] summary: Fake endpoint to test group parameters (optional) tags: - fake @@ -686,6 +729,7 @@ paths: explode: false in: header name: enum_header_string_array + required: false schema: items: default: $ @@ -696,8 +740,10 @@ paths: type: array style: simple - description: Header parameter enum test (string) + explode: false in: header name: enum_header_string + required: false schema: default: -efg enum: @@ -705,10 +751,12 @@ paths: - -efg - (xyz) type: string + style: simple - description: Query parameter enum test (string array) - explode: false + explode: true in: query name: enum_query_string_array + required: false schema: items: default: $ @@ -719,8 +767,10 @@ paths: type: array style: form - description: Query parameter enum test (string) + explode: true in: query name: enum_query_string + required: false schema: default: -efg enum: @@ -728,24 +778,40 @@ paths: - -efg - (xyz) type: string + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_integer + required: false schema: enum: - 1 - -2 format: int32 type: integer + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_double + required: false schema: enum: - 1.1 - -1.2 format: double type: number + style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: content: application/x-www-form-urlencoded: @@ -753,10 +819,8 @@ paths: $ref: '#/components/schemas/testEnumParameters_request' responses: "400": - content: {} description: Invalid request "404": - content: {} description: Not found summary: To test enum parameters tags: @@ -767,12 +831,7 @@ paths: description: To test "client" model operationId: testClientModel requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -783,36 +842,32 @@ paths: summary: To test "client" model tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json post: - description: |- + description: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testEndpointParameters_request' - required: true responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found security: - http_basic_test: [] - summary: |- + summary: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-content-type: application/x-www-form-urlencoded @@ -823,11 +878,10 @@ paths: operationId: fakeOuterNumberSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' description: Input number as post body - required: false responses: "200": content: @@ -837,8 +891,29 @@ paths: description: Output number tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/property/enum-int: + post: + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + required: true + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Output enum (int) + tags: + - fake + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -846,11 +921,10 @@ paths: operationId: fakeOuterStringSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' description: Input string as post body - required: false responses: "200": content: @@ -860,8 +934,7 @@ paths: description: Output string tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -869,11 +942,10 @@ paths: operationId: fakeOuterBooleanSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body - required: false responses: "200": content: @@ -883,8 +955,7 @@ paths: description: Output boolean tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -892,11 +963,10 @@ paths: operationId: fakeOuterCompositeSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body - required: false responses: "200": content: @@ -906,21 +976,34 @@ paths: description: Output composite tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/BigDecimalMap: + get: + description: "for Java apache and Java native, test toUrlQueryString for maps\ + \ with BegDecimal keys" + operationId: fakeBigDecimalMap + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/fakeBigDecimalMap_200_response' + description: successful operation + tags: + - fake x-accepts: '*/*' /fake/jsonFormData: get: + description: "" operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testJsonFormData_request' - required: true responses: "200": - content: {} description: successful operation summary: test json serialization of form data tags: @@ -929,6 +1012,7 @@ paths: x-accepts: application/json /fake/inline-additionalProperties: post: + description: "" operationId: testInlineAdditionalProperties requestBody: content: @@ -941,23 +1025,23 @@ paths: required: true responses: "200": - content: {} description: successful operation summary: test inline additionalProperties tags: - fake - x-codegen-request-body-name: param x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams parameters: - - in: query + - explode: true + in: query name: query required: true schema: type: string + style: form requestBody: content: application/json: @@ -966,68 +1050,17 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: application/json /another-fake/dummy: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags - parameters: - - description: to test uuid example value - in: header - name: uuid_test - required: true - schema: - format: uuid - type: string requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -1038,12 +1071,11 @@ paths: summary: To test special tags tags: - $another-fake? - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: - description: "For this test, the body for this request much reference a schema\ + description: "For this test, the body for this request must reference a schema\ \ named `File`." operationId: testBodyWithFileSchema requestBody: @@ -1054,13 +1086,31 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json + /fake/body-with-binary: + put: + description: "For this test, the body has to be a binary file." + operationId: testBodyWithBinary + requestBody: + content: + image/png: + schema: + format: binary + nullable: true + type: string + description: image to upload + required: true + responses: + "200": + description: Success + tags: + - fake + x-content-type: image/png + x-accepts: application/json /fake/test-query-parameters: put: description: To test the collection format in query parameters @@ -1074,15 +1124,18 @@ paths: items: type: string type: array - style: form - - in: query + style: pipeDelimited + - explode: false + in: query name: ioutil required: true schema: items: type: string type: array - - in: query + style: form + - explode: false + in: query name: http required: true schema: @@ -1108,30 +1161,49 @@ paths: type: string type: array style: form + - explode: true + in: query + name: language + required: false + schema: + additionalProperties: + format: string + type: string + type: object + style: form + - allowEmptyValue: true + explode: true + in: query + name: allowEmpty + required: true + schema: + type: string + style: form responses: "200": - content: {} description: Success tags: - fake x-accepts: application/json /fake/{petId}/uploadImageWithRequiredFile: post: + description: "" operationId: uploadFileWithRequiredFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - required: true responses: "200": content: @@ -1148,8 +1220,91 @@ paths: - pet x-content-type: multipart/form-data x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string Order: example: petId: 6 @@ -1315,21 +1470,12 @@ components: message: type: string type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" Return: description: Model for testing reserved words properties: return: format: int32 type: integer - type: object xml: name: Return Name: @@ -1349,7 +1495,6 @@ components: type: integer required: - name - type: object xml: name: Name "200_response": @@ -1360,7 +1505,6 @@ components: type: integer class: type: string - type: object xml: name: Name ClassModel: @@ -1368,7 +1512,6 @@ components: properties: _class: type: string - type: object Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -1383,20 +1526,11 @@ components: declawed: type: boolean type: object - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object Animal: discriminator: + mapping: + DOG: '#/components/schemas/Dog' + CAT: '#/components/schemas/Cat' propertyName: className properties: className: @@ -1439,12 +1573,14 @@ components: maximum: 123.4 minimum: 67.8 type: number + decimal: + format: number + type: string string: pattern: "/[a-z]/i" type: string byte: format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" type: string binary: format: binary @@ -1464,8 +1600,14 @@ components: maxLength: 64 minLength: 10 type: string - BigDecimal: - format: number + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: "^\\d{10}$" + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: "/^image_\\d{1,3}$/i" type: string required: - byte @@ -1508,117 +1650,27 @@ components: type: number outerEnum: $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' required: - enum_string_required type: object AdditionalPropertiesClass: properties: - map_string: + map_property: additionalProperties: type: string type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: + map_of_map_property: additionalProperties: additionalProperties: type: string type: object type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -1708,6 +1760,8 @@ components: array_of_string: items: type: string + maxItems: 3 + minItems: 0 type: array array_array_of_integer: items: @@ -1764,7 +1818,29 @@ components: - placed - approved - delivered + nullable: true type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + example: 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer OuterComposite: example: my_string: my_string @@ -1814,243 +1890,133 @@ components: description: Test capitalization type: string type: object - TypeHolderDefault: + _special_model.name_: properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: + $special[property.name]: + format: int64 type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object xml: - namespace: http://a.com/schema - prefix: pre + name: "$special[model.name]" + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + OuterObjectWithEnumProperty: + example: + value: 2 + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + required: + - value + type: object + DeprecatedObject: + deprecated: true + properties: + name: + type: string + type: object + ObjectWithDeprecatedFields: + properties: + uuid: + type: string + id: + deprecated: true + type: number + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + deprecated: true + items: + $ref: '#/components/schemas/Bar' + type: array + type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string + _foo_get_default_response: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + type: object updatePetWithForm_request: properties: name: @@ -2094,7 +2060,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -2163,6 +2128,19 @@ components: - number - pattern_without_delimiter type: object + fakeBigDecimalMap_200_response: + example: + someId: 0.8008281904610115 + someMap: + key: 6.027456183070403 + properties: + someId: + type: number + someMap: + additionalProperties: + type: number + type: object + type: object testJsonFormData_request: properties: param: @@ -2207,5 +2185,11 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: "2.0" + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md index 79402f75c68..fe69a56eebf 100644 --- a/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/vertx/docs/AdditionalPropertiesClass.md @@ -7,17 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mapString** | **Map<String, String>** | | [optional] | -|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | -|**mapInteger** | **Map<String, Integer>** | | [optional] | -|**mapBoolean** | **Map<String, Boolean>** | | [optional] | -|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | -|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | -|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | -|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | -|**anytype1** | **Object** | | [optional] | -|**anytype2** | **Object** | | [optional] | -|**anytype3** | **Object** | | [optional] | +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/vertx/docs/AllOfWithSingleRef.md new file mode 100644 index 00000000000..4146d56a372 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | **SingleRefType** | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md index e2b1f04ce7f..73c966d2d54 100644 --- a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(uuidTest, body) +> Client call123testSpecialTags(client) To test special tags @@ -32,10 +32,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(uuidTest, body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -53,8 +52,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **uuidTest** | **UUID**| to test uuid example value | | -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/DefaultApi.md b/samples/client/petstore/java/vertx/docs/DefaultApi.md new file mode 100644 index 00000000000..2c56e1f90e5 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/DefaultApi.md @@ -0,0 +1,69 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | + + + +## fooGet + +> FooGetDefaultResponse fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + FooGetDefaultResponse result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/vertx/docs/DeprecatedObject.md b/samples/client/petstore/java/vertx/docs/DeprecatedObject.md new file mode 100644 index 00000000000..48de1d62442 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/EnumTest.md b/samples/client/petstore/java/vertx/docs/EnumTest.md index bf2def484c6..380a2aef0bc 100644 --- a/samples/client/petstore/java/vertx/docs/EnumTest.md +++ b/samples/client/petstore/java/vertx/docs/EnumTest.md @@ -12,6 +12,9 @@ |**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | |**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | |**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index efb255c14f2..a0fb70ef8d4 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -4,15 +4,19 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeBigDecimalMap**](FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | | +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | | [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | | [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | -| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | | [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | @@ -21,13 +25,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -## createXmlItem +## fakeBigDecimalMap -> createXmlItem(xmlItem) +> FakeBigDecimalMap200Response fakeBigDecimalMap() -creates an XmlItem -this route creates an XmlItem + +for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys ### Example @@ -45,11 +49,135 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - apiInstance.createXmlItem(xmlItem); + FakeBigDecimalMap200Response result = apiInstance.fakeBigDecimalMap(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeBigDecimalMap"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + +## fakeHealthGet + +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + try { + HealthCheckResult result = apiInstance.fakeHealthGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeHttpSignatureTest + +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + apiInstance.fakeHttpSignatureTest(pet, query1, header1); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -64,7 +192,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | ### Return type @@ -72,18 +202,18 @@ null (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Content-Type**: application/json, application/xml - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | ## fakeOuterBooleanSerialize @@ -142,7 +272,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -154,7 +284,7 @@ No authorization required ## fakeOuterCompositeSerialize -> OuterComposite fakeOuterCompositeSerialize(body) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -176,9 +306,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -196,7 +326,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -208,7 +338,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -274,7 +404,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -340,7 +470,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -350,13 +480,13 @@ No authorization required | **200** | Output string | - | -## testBodyWithFileSchema +## fakePropertyEnumIntegerSerialize -> testBodyWithFileSchema(body) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) -For this test, the body for this request much reference a schema named `File`. +Test serialization of enum (int) properties with examples ### Example @@ -374,9 +504,140 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - apiInstance.testBodyWithFileSchema(body); + OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + + +## testBodyWithBinary + +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + AsyncFile body = new AsyncFile(); // AsyncFile | image to upload + try { + apiInstance.testBodyWithBinary(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **AsyncFile**| image to upload | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testBodyWithFileSchema + +> testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(fileSchemaTestClass); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -393,7 +654,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -417,7 +678,7 @@ No authorization required ## testBodyWithQueryParams -> testBodyWithQueryParams(query, body) +> testBodyWithQueryParams(query, user) @@ -438,9 +699,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - apiInstance.testBodyWithQueryParams(query, body); + apiInstance.testBodyWithQueryParams(query, user); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -458,7 +719,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -482,7 +743,7 @@ No authorization required ## testClientModel -> Client testClientModel(body) +> Client testClientModel(client) To test \"client\" model @@ -504,9 +765,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClientModel(body); + Client result = apiInstance.testClientModel(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -524,7 +785,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -550,9 +811,9 @@ No authorization required > 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 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -646,7 +907,7 @@ null (empty response body) ## testEnumParameters -> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -674,10 +935,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -700,6 +962,7 @@ public class Example { | **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] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -739,6 +1002,7 @@ Fake endpoint to test group parameters (optional) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; @@ -746,6 +1010,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -785,7 +1053,7 @@ null (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -801,10 +1069,12 @@ No authorization required ## testInlineAdditionalProperties -> testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(requestBody) test inline additionalProperties + + ### Example ```java @@ -821,9 +1091,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - apiInstance.testInlineAdditionalProperties(param); + apiInstance.testInlineAdditionalProperties(requestBody); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -840,7 +1110,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -868,6 +1138,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -929,7 +1201,7 @@ No authorization required ## testQueryParameterCollectionFormat -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -956,8 +1228,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); @@ -979,6 +1253,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/FakeBigDecimalMap200Response.md b/samples/client/petstore/java/vertx/docs/FakeBigDecimalMap200Response.md new file mode 100644 index 00000000000..475be1d2d73 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/FakeBigDecimalMap200Response.md @@ -0,0 +1,14 @@ + + +# FakeBigDecimalMap200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**someId** | **BigDecimal** | | [optional] | +|**someMap** | **Map<String, BigDecimal>** | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md index 10d5ea30aa2..e4ff70ed909 100644 --- a/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/vertx/docs/FakeClassnameTags123Api.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## testClassname -> Client testClassname(body) +> Client testClassname(client) To test class name in snake case @@ -39,9 +39,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClassname(body); + Client result = apiInstance.testClassname(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); @@ -59,7 +59,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/vertx/docs/Foo.md b/samples/client/petstore/java/vertx/docs/Foo.md new file mode 100644 index 00000000000..6b3f0556528 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/vertx/docs/FooGetDefaultResponse.md new file mode 100644 index 00000000000..ff3d7a3a56c --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/FooGetDefaultResponse.md @@ -0,0 +1,13 @@ + + +# FooGetDefaultResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/FormatTest.md b/samples/client/petstore/java/vertx/docs/FormatTest.md index dd441705a18..42278d0f395 100644 --- a/samples/client/petstore/java/vertx/docs/FormatTest.md +++ b/samples/client/petstore/java/vertx/docs/FormatTest.md @@ -13,6 +13,7 @@ |**number** | **BigDecimal** | | | |**_float** | **Float** | | [optional] | |**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | |**string** | **String** | | [optional] | |**_byte** | **byte[]** | | | |**binary** | **AsyncFile** | | [optional] | @@ -20,7 +21,8 @@ |**dateTime** | **OffsetDateTime** | | [optional] | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | -|**bigDecimal** | **BigDecimal** | | [optional] | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/vertx/docs/HealthCheckResult.md b/samples/client/petstore/java/vertx/docs/HealthCheckResult.md new file mode 100644 index 00000000000..4885e6f1cad --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/NullableClass.md b/samples/client/petstore/java/vertx/docs/NullableClass.md new file mode 100644 index 00000000000..fa98c5c6d98 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/vertx/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 00000000000..f1cf571f4c0 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/vertx/docs/OuterEnumDefaultValue.md new file mode 100644 index 00000000000..cbc7f4ba54d --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/vertx/docs/OuterEnumInteger.md b/samples/client/petstore/java/vertx/docs/OuterEnumInteger.md new file mode 100644 index 00000000000..f71dea30ad0 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/vertx/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/vertx/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 00000000000..99e6389f427 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/vertx/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/vertx/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 00000000000..0fafaaa2715 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,13 @@ + + +# OuterObjectWithEnumProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | + + + diff --git a/samples/client/petstore/java/vertx/docs/PetApi.md b/samples/client/petstore/java/vertx/docs/PetApi.md index ecb2af3e7a9..115d5ff89d8 100644 --- a/samples/client/petstore/java/vertx/docs/PetApi.md +++ b/samples/client/petstore/java/vertx/docs/PetApi.md @@ -18,10 +18,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## addPet -> addPet(body) +> addPet(pet) Add a new pet to the store + + ### Example ```java @@ -43,9 +45,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.addPet(body); + apiInstance.addPet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -62,7 +64,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -81,7 +83,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -91,6 +93,8 @@ null (empty response body) Deletes a pet + + ### Example ```java @@ -152,7 +156,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | @@ -377,10 +381,12 @@ public class Example { ## updatePet -> updatePet(body) +> updatePet(pet) Update an existing pet + + ### Example ```java @@ -402,9 +408,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -421,7 +427,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | ### Return type @@ -440,7 +446,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | @@ -452,6 +458,8 @@ null (empty response body) Updates a pet in the store with form data + + ### Example ```java @@ -515,6 +523,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -524,6 +533,8 @@ null (empty response body) uploads an image + + ### Example ```java @@ -597,6 +608,8 @@ public class Example { uploads an image (required) + + ### Example ```java diff --git a/samples/client/petstore/java/vertx/docs/SingleRefType.md b/samples/client/petstore/java/vertx/docs/SingleRefType.md new file mode 100644 index 00000000000..cc269bb871f --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/vertx/docs/StoreApi.md b/samples/client/petstore/java/vertx/docs/StoreApi.md index b64e208a83a..ce91137cc6f 100644 --- a/samples/client/petstore/java/vertx/docs/StoreApi.md +++ b/samples/client/petstore/java/vertx/docs/StoreApi.md @@ -216,10 +216,12 @@ No authorization required ## placeOrder -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet + + ### Example ```java @@ -236,9 +238,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - Order result = apiInstance.placeOrder(body); + Order result = apiInstance.placeOrder(order); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); @@ -256,7 +258,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Order**](Order.md)| order placed for purchasing the pet | | +| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | ### Return type @@ -268,7 +270,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json diff --git a/samples/client/petstore/java/vertx/docs/UserApi.md b/samples/client/petstore/java/vertx/docs/UserApi.md index dfdb4a7c0eb..305fd6e66df 100644 --- a/samples/client/petstore/java/vertx/docs/UserApi.md +++ b/samples/client/petstore/java/vertx/docs/UserApi.md @@ -17,7 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## createUser -> createUser(body) +> createUser(user) Create user @@ -39,9 +39,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -58,7 +58,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -70,7 +70,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -82,10 +82,12 @@ No authorization required ## createUsersWithArrayInput -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(user) Creates list of users with given input array + + ### Example ```java @@ -102,9 +104,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -121,7 +123,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -133,7 +135,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -145,10 +147,12 @@ No authorization required ## createUsersWithListInput -> createUsersWithListInput(body) +> createUsersWithListInput(user) Creates list of users with given input array + + ### Example ```java @@ -165,9 +169,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -184,7 +188,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -196,7 +200,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -278,6 +282,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -344,6 +350,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -411,6 +419,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -466,7 +476,7 @@ No authorization required ## updateUser -> updateUser(username, body) +> updateUser(username, user) Updated user @@ -489,9 +499,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - apiInstance.updateUser(username, body); + apiInstance.updateUser(username, user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); @@ -509,7 +519,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -521,7 +531,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ApiClient.java index 4cba46ae302..a88e8e3fc4d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/ApiClient.java @@ -89,6 +89,7 @@ public class ApiClient extends JavaTimeFormatter { authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); authentications.put("http_basic_test", new HttpBasicAuth()); + authentications.put("bearer_test", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. this.authentications = Collections.unmodifiableMap(authentications); @@ -697,6 +698,13 @@ public class ApiClient extends JavaTimeFormatter { authentications.put("http_basic_test", auth); } + public void addBearer_testAuthentication(String bearerToken) { + HttpBearerAuth auth = new + HttpBearerAuth("bearer"); + auth.setBearerToken(bearerToken); + authentications.put("bearer_test", auth); + } + public static AuthInfo forPetstore_authAuthentication(String accessToken) { AuthInfo authInfo = new AuthInfo(); authInfo.addPetstore_authAuthentication(accessToken); @@ -720,5 +728,11 @@ public class ApiClient extends JavaTimeFormatter { authInfo.addHttp_basic_testAuthentication(username, password); return authInfo; } + + public static AuthInfo forBearer_testAuthentication(String bearerToken) { + AuthInfo authInfo = new AuthInfo(); + authInfo.addBearer_testAuthentication(bearerToken); + return authInfo; + } } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 7b484f9c814..2ffba8ce5fc 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -2,7 +2,6 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; -import java.util.UUID; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; import io.vertx.core.json.JsonObject; @@ -11,8 +10,8 @@ import java.util.*; public interface AnotherFakeApi { - void call123testSpecialTags(UUID uuidTest, Client body, Handler> handler); + void call123testSpecialTags(Client client, Handler> handler); - void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> handler); + void call123testSpecialTags(Client client, ApiClient.AuthInfo authInfo, Handler> handler); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java index 39c9f006f92..df027dec56b 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java @@ -1,7 +1,6 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; -import java.util.UUID; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; @@ -44,34 +43,26 @@ public class AnotherFakeApiImpl implements AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(UUID uuidTest, Client body, Handler> resultHandler) { - call123testSpecialTags(uuidTest, body, null, resultHandler); + public void call123testSpecialTags(Client client, Handler> resultHandler) { + call123testSpecialTags(client, null, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void call123testSpecialTags(Client client, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = client; - // verify the required parameter 'uuidTest' is set - if (uuidTest == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags")); - return; - } - - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling call123testSpecialTags")); + // verify the required parameter 'client' is set + if (client == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'client' when calling call123testSpecialTags")); return; } @@ -83,9 +74,7 @@ public class AnotherFakeApiImpl implements AnotherFakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); - if (uuidTest != null) - localVarHeaderParams.add("uuid_test", apiClient.parameterToString(uuidTest)); - + // cookie params MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 00000000000..2c66773354c --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,17 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.model.FooGetDefaultResponse; +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +import io.vertx.core.json.JsonObject; + +import java.util.*; + +public interface DefaultApi { + + void fooGet(Handler> handler); + + void fooGet(ApiClient.AuthInfo authInfo, Handler> handler); + +} diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/DefaultApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/DefaultApiImpl.java new file mode 100644 index 00000000000..9048ee51ad5 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/DefaultApiImpl.java @@ -0,0 +1,91 @@ +package org.openapitools.client.api; + +import org.openapitools.client.model.FooGetDefaultResponse; + +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +import io.vertx.core.MultiMap; +import io.vertx.core.json.JsonObject; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.util.*; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApiImpl implements DefaultApi { + + private ApiClient apiClient; + + public DefaultApiImpl() { + this(null); + } + + public DefaultApiImpl(ApiClient apiClient) { + this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient(); + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + * @param resultHandler Asynchronous result handler + */ + public void fooGet(Handler> resultHandler) { + fooGet(null, resultHandler); + } + + /** + * + * + * @param authInfo per call authentication override. + * @param resultHandler Asynchronous result handler + */ + public void fooGet(ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = null; + + // create path and map variables + String localVarPath = "/foo"; + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { "application/json" }; + String[] localVarContentTypes = { }; + String[] localVarAuthNames = new String[] { }; + TypeReference localVarReturnType = new TypeReference() {}; + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); + } + + private String encodeParameter(String parameter) { + try { + return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + return parameter; + } + } +} diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java index 2a30781bdad..43d08fbc79a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java @@ -4,12 +4,16 @@ import org.openapitools.client.ApiClient; import io.vertx.core.file.AsyncFile; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; import io.vertx.core.json.JsonObject; @@ -18,17 +22,25 @@ import java.util.*; public interface FakeApi { - void createXmlItem(XmlItem xmlItem, Handler> handler); + void fakeBigDecimalMap(Handler> handler); - void createXmlItem(XmlItem xmlItem, ApiClient.AuthInfo authInfo, Handler> handler); + void fakeBigDecimalMap(ApiClient.AuthInfo authInfo, Handler> handler); + + void fakeHealthGet(Handler> handler); + + void fakeHealthGet(ApiClient.AuthInfo authInfo, Handler> handler); + + void fakeHttpSignatureTest(Pet pet, String query1, String header1, Handler> handler); + + void fakeHttpSignatureTest(Pet pet, String query1, String header1, ApiClient.AuthInfo authInfo, Handler> handler); void fakeOuterBooleanSerialize(Boolean body, Handler> handler); void fakeOuterBooleanSerialize(Boolean body, ApiClient.AuthInfo authInfo, Handler> handler); - void fakeOuterCompositeSerialize(OuterComposite body, Handler> handler); + void fakeOuterCompositeSerialize(OuterComposite outerComposite, Handler> handler); - void fakeOuterCompositeSerialize(OuterComposite body, ApiClient.AuthInfo authInfo, Handler> handler); + void fakeOuterCompositeSerialize(OuterComposite outerComposite, ApiClient.AuthInfo authInfo, Handler> handler); void fakeOuterNumberSerialize(BigDecimal body, Handler> handler); @@ -38,40 +50,48 @@ public interface FakeApi { void fakeOuterStringSerialize(String body, ApiClient.AuthInfo authInfo, Handler> handler); - void testBodyWithFileSchema(FileSchemaTestClass body, Handler> handler); + void fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty, Handler> handler); - void testBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo, Handler> handler); + void fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty, ApiClient.AuthInfo authInfo, Handler> handler); - void testBodyWithQueryParams(String query, User body, Handler> handler); + void testBodyWithBinary(AsyncFile body, Handler> handler); - void testBodyWithQueryParams(String query, User body, ApiClient.AuthInfo authInfo, Handler> handler); + void testBodyWithBinary(AsyncFile body, ApiClient.AuthInfo authInfo, Handler> handler); - void testClientModel(Client body, Handler> handler); + void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, Handler> handler); - void testClientModel(Client body, ApiClient.AuthInfo authInfo, Handler> handler); + void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, ApiClient.AuthInfo authInfo, Handler> handler); + + void testBodyWithQueryParams(String query, User user, Handler> handler); + + void testBodyWithQueryParams(String query, User user, ApiClient.AuthInfo authInfo, Handler> handler); + + void testClientModel(Client client, Handler> handler); + + void testClientModel(Client client, ApiClient.AuthInfo authInfo, Handler> handler); void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, Handler> handler); void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, AsyncFile binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, ApiClient.AuthInfo authInfo, Handler> handler); - void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, Handler> handler); + void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, Handler> handler); - void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler> handler); + void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler> handler); void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, Handler> handler); void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, ApiClient.AuthInfo authInfo, Handler> handler); - void testInlineAdditionalProperties(Map param, Handler> handler); + void testInlineAdditionalProperties(Map requestBody, Handler> handler); - void testInlineAdditionalProperties(Map param, ApiClient.AuthInfo authInfo, Handler> handler); + void testInlineAdditionalProperties(Map requestBody, ApiClient.AuthInfo authInfo, Handler> handler); void testJsonFormData(String param, String param2, Handler> handler); void testJsonFormData(String param, String param2, ApiClient.AuthInfo authInfo, Handler> handler); - void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, Handler> handler); + void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, Handler> handler); - void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ApiClient.AuthInfo authInfo, Handler> handler); + void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, ApiClient.AuthInfo authInfo, Handler> handler); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java index 4383f3537d5..4236c2b3287 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java @@ -3,12 +3,16 @@ package org.openapitools.client.api; import io.vertx.core.file.AsyncFile; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; @@ -49,33 +53,25 @@ public class FakeApiImpl implements FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * @param resultHandler Asynchronous result handler */ - public void createXmlItem(XmlItem xmlItem, Handler> resultHandler) { - createXmlItem(xmlItem, null, resultHandler); + public void fakeBigDecimalMap(Handler> resultHandler) { + fakeBigDecimalMap(null, resultHandler); } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void createXmlItem(XmlItem xmlItem, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = xmlItem; - - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'xmlItem' when calling createXmlItem")); - return; - } + public void fakeBigDecimalMap(ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = null; // create path and map variables - String localVarPath = "/fake/create_xml_item"; + String localVarPath = "/fake/BigDecimalMap"; // query params List localVarQueryParams = new ArrayList<>(); @@ -90,11 +86,106 @@ public class FakeApiImpl implements FakeApi { // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) Map localVarFormParams = new HashMap<>(); - String[] localVarAccepts = { }; - String[] localVarContentTypes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" }; + String[] localVarAccepts = { "*/*" }; + String[] localVarContentTypes = { }; String[] localVarAuthNames = new String[] { }; + TypeReference localVarReturnType = new TypeReference() {}; + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); + } + /** + * Health check endpoint + * + * @param resultHandler Asynchronous result handler + */ + public void fakeHealthGet(Handler> resultHandler) { + fakeHealthGet(null, resultHandler); + } - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); + /** + * Health check endpoint + * + * @param authInfo per call authentication override. + * @param resultHandler Asynchronous result handler + */ + public void fakeHealthGet(ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = null; + + // create path and map variables + String localVarPath = "/fake/health"; + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { "application/json" }; + String[] localVarContentTypes = { }; + String[] localVarAuthNames = new String[] { }; + TypeReference localVarReturnType = new TypeReference() {}; + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); + } + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @param resultHandler Asynchronous result handler + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1, Handler> resultHandler) { + fakeHttpSignatureTest(pet, query1, header1, null, resultHandler); + } + + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @param authInfo per call authentication override. + * @param resultHandler Asynchronous result handler + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = pet; + + // verify the required parameter 'pet' is set + if (pet == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest")); + return; + } + + // create path and map variables + String localVarPath = "/fake/http-signature-test"; + + // query params + List localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_1", query1)); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + if (header1 != null) + localVarHeaderParams.add("header_1", apiClient.parameterToString(header1)); + + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { }; + String[] localVarContentTypes = { "application/json", "application/xml" }; + String[] localVarAuthNames = new String[] { "http_signature_test" }; + + apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); } /** * @@ -133,7 +224,7 @@ public class FakeApiImpl implements FakeApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { "*/*" }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); @@ -141,22 +232,22 @@ public class FakeApiImpl implements FakeApi { /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @param resultHandler Asynchronous result handler */ - public void fakeOuterCompositeSerialize(OuterComposite body, Handler> resultHandler) { - fakeOuterCompositeSerialize(body, null, resultHandler); + public void fakeOuterCompositeSerialize(OuterComposite outerComposite, Handler> resultHandler) { + fakeOuterCompositeSerialize(outerComposite, null, resultHandler); } /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void fakeOuterCompositeSerialize(OuterComposite body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void fakeOuterCompositeSerialize(OuterComposite outerComposite, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = outerComposite; // create path and map variables String localVarPath = "/fake/outer/composite"; @@ -175,7 +266,7 @@ public class FakeApiImpl implements FakeApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { "*/*" }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); @@ -217,7 +308,7 @@ public class FakeApiImpl implements FakeApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { "*/*" }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); @@ -259,34 +350,130 @@ public class FakeApiImpl implements FakeApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { "*/*" }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) * @param resultHandler Asynchronous result handler */ - public void testBodyWithFileSchema(FileSchemaTestClass body, Handler> resultHandler) { - testBodyWithFileSchema(body, null, resultHandler); + public void fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty, Handler> resultHandler) { + fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, null, resultHandler); } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void testBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + public void fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = outerObjectWithEnumProperty; + + // verify the required parameter 'outerObjectWithEnumProperty' is set + if (outerObjectWithEnumProperty == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize")); + return; + } + + // create path and map variables + String localVarPath = "/fake/property/enum-int"; + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { "*/*" }; + String[] localVarContentTypes = { "application/json" }; + String[] localVarAuthNames = new String[] { }; + TypeReference localVarReturnType = new TypeReference() {}; + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); + } + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @param resultHandler Asynchronous result handler + */ + public void testBodyWithBinary(AsyncFile body, Handler> resultHandler) { + testBodyWithBinary(body, null, resultHandler); + } + + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @param authInfo per call authentication override. + * @param resultHandler Asynchronous result handler + */ + public void testBodyWithBinary(AsyncFile body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { Object localVarBody = body; // verify the required parameter 'body' is set if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema")); + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testBodyWithBinary")); + return; + } + + // create path and map variables + String localVarPath = "/fake/body-with-binary"; + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { }; + String[] localVarContentTypes = { "image/png" }; + String[] localVarAuthNames = new String[] { }; + + apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); + } + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @param resultHandler Asynchronous result handler + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, Handler> resultHandler) { + testBodyWithFileSchema(fileSchemaTestClass, null, resultHandler); + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @param authInfo per call authentication override. + * @param resultHandler Asynchronous result handler + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = fileSchemaTestClass; + + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema")); return; } @@ -316,23 +503,23 @@ public class FakeApiImpl implements FakeApi { * * * @param query (required) - * @param body (required) + * @param user (required) * @param resultHandler Asynchronous result handler */ - public void testBodyWithQueryParams(String query, User body, Handler> resultHandler) { - testBodyWithQueryParams(query, body, null, resultHandler); + public void testBodyWithQueryParams(String query, User user, Handler> resultHandler) { + testBodyWithQueryParams(query, user, null, resultHandler); } /** * * * @param query (required) - * @param body (required) + * @param user (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void testBodyWithQueryParams(String query, User body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void testBodyWithQueryParams(String query, User user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = user; // verify the required parameter 'query' is set if (query == null) { @@ -340,9 +527,9 @@ public class FakeApiImpl implements FakeApi { return; } - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams")); + // verify the required parameter 'user' is set + if (user == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams")); return; } @@ -372,26 +559,26 @@ public class FakeApiImpl implements FakeApi { /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @param resultHandler Asynchronous result handler */ - public void testClientModel(Client body, Handler> resultHandler) { - testClientModel(body, null, resultHandler); + public void testClientModel(Client client, Handler> resultHandler) { + testClientModel(client, null, resultHandler); } /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void testClientModel(Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void testClientModel(Client client, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = client; - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testClientModel")); + // verify the required parameter 'client' is set + if (client == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'client' when calling testClientModel")); return; } @@ -418,8 +605,8 @@ public class FakeApiImpl implements FakeApi { apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -441,8 +628,8 @@ public class FakeApiImpl implements FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -532,12 +719,13 @@ if (paramCallback != null) localVarFormParams.put("callback", paramCallback); * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param resultHandler Asynchronous result handler */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, Handler> resultHandler) { - testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, null, resultHandler); + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, Handler> resultHandler) { + testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, null, resultHandler); } /** @@ -549,12 +737,13 @@ if (paramCallback != null) localVarFormParams.put("callback", paramCallback); * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler> resultHandler) { Object localVarBody = null; // create path and map variables @@ -562,10 +751,11 @@ if (paramCallback != null) localVarFormParams.put("callback", paramCallback); // query params List localVarQueryParams = new ArrayList<>(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_model_array", enumQueryModelArray)); // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); @@ -663,33 +853,33 @@ if (booleanGroup != null) String[] localVarAccepts = { }; String[] localVarContentTypes = { }; - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "bearer_test" }; apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); } /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @param resultHandler Asynchronous result handler */ - public void testInlineAdditionalProperties(Map param, Handler> resultHandler) { - testInlineAdditionalProperties(param, null, resultHandler); + public void testInlineAdditionalProperties(Map requestBody, Handler> resultHandler) { + testInlineAdditionalProperties(requestBody, null, resultHandler); } /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void testInlineAdditionalProperties(Map param, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = param; + public void testInlineAdditionalProperties(Map requestBody, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = requestBody; - // verify the required parameter 'param' is set - if (param == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties")); + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties")); return; } @@ -781,10 +971,12 @@ if (param2 != null) localVarFormParams.put("param2", param2); * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @param resultHandler Asynchronous result handler */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, Handler> resultHandler) { - testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, null, resultHandler); + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, Handler> resultHandler) { + testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language, null, resultHandler); } /** @@ -795,10 +987,12 @@ if (param2 != null) localVarFormParams.put("param2", param2); * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, ApiClient.AuthInfo authInfo, Handler> resultHandler) { Object localVarBody = null; // verify the required parameter 'pipe' is set @@ -831,16 +1025,24 @@ if (param2 != null) localVarFormParams.put("param2", param2); return; } + // verify the required parameter 'allowEmpty' is set + if (allowEmpty == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat")); + return; + } + // create path and map variables String localVarPath = "/fake/test-query-parameters"; // query params List localVarQueryParams = new ArrayList<>(); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); + localVarQueryParams.addAll(apiClient.parameterToPairs("pipes", "pipe", pipe)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil)); localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "language", language)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "allowEmpty", allowEmpty)); // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index abae7a76d13..deaa265d3d7 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -10,8 +10,8 @@ import java.util.*; public interface FakeClassnameTags123Api { - void testClassname(Client body, Handler> handler); + void testClassname(Client client, Handler> handler); - void testClassname(Client body, ApiClient.AuthInfo authInfo, Handler> handler); + void testClassname(Client client, ApiClient.AuthInfo authInfo, Handler> handler); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java index cb6d4505786..17163693333 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeClassnameTags123ApiImpl.java @@ -43,26 +43,26 @@ public class FakeClassnameTags123ApiImpl implements FakeClassnameTags123Api { /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @param resultHandler Asynchronous result handler */ - public void testClassname(Client body, Handler> resultHandler) { - testClassname(body, null, resultHandler); + public void testClassname(Client client, Handler> resultHandler) { + testClassname(client, null, resultHandler); } /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void testClassname(Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void testClassname(Client client, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = client; - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testClassname")); + // verify the required parameter 'client' is set + if (client == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'client' when calling testClassname")); return; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java index 06e892b60cf..c2e30268cc7 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApi.java @@ -13,9 +13,9 @@ import java.util.*; public interface PetApi { - void addPet(Pet body, Handler> handler); + void addPet(Pet pet, Handler> handler); - void addPet(Pet body, ApiClient.AuthInfo authInfo, Handler> handler); + void addPet(Pet pet, ApiClient.AuthInfo authInfo, Handler> handler); void deletePet(Long petId, String apiKey, Handler> handler); @@ -35,9 +35,9 @@ public interface PetApi { void getPetById(Long petId, ApiClient.AuthInfo authInfo, Handler> handler); - void updatePet(Pet body, Handler> handler); + void updatePet(Pet pet, Handler> handler); - void updatePet(Pet body, ApiClient.AuthInfo authInfo, Handler> handler); + void updatePet(Pet pet, ApiClient.AuthInfo authInfo, Handler> handler); void updatePetWithForm(Long petId, String name, String status, Handler> handler); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java index b85543cd6c2..82491ca7ee6 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java @@ -46,26 +46,26 @@ public class PetApiImpl implements PetApi { /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param resultHandler Asynchronous result handler */ - public void addPet(Pet body, Handler> resultHandler) { - addPet(body, null, resultHandler); + public void addPet(Pet pet, Handler> resultHandler) { + addPet(pet, null, resultHandler); } /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void addPet(Pet body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void addPet(Pet pet, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling addPet")); + // verify the required parameter 'pet' is set + if (pet == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'pet' when calling addPet")); return; } @@ -292,26 +292,26 @@ public class PetApiImpl implements PetApi { /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param resultHandler Asynchronous result handler */ - public void updatePet(Pet body, Handler> resultHandler) { - updatePet(body, null, resultHandler); + public void updatePet(Pet pet, Handler> resultHandler) { + updatePet(pet, null, resultHandler); } /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void updatePet(Pet body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void updatePet(Pet pet, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling updatePet")); + // verify the required parameter 'pet' is set + if (pet == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'pet' when calling updatePet")); return; } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApi.java index 563c8e6a46c..973c3460e0a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApi.java @@ -22,8 +22,8 @@ public interface StoreApi { void getOrderById(Long orderId, ApiClient.AuthInfo authInfo, Handler> handler); - void placeOrder(Order body, Handler> handler); + void placeOrder(Order order, Handler> handler); - void placeOrder(Order body, ApiClient.AuthInfo authInfo, Handler> handler); + void placeOrder(Order order, ApiClient.AuthInfo authInfo, Handler> handler); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java index 762970b72d9..981bd78112b 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java @@ -179,26 +179,26 @@ public class StoreApiImpl implements StoreApi { /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @param resultHandler Asynchronous result handler */ - public void placeOrder(Order body, Handler> resultHandler) { - placeOrder(body, null, resultHandler); + public void placeOrder(Order order, Handler> resultHandler) { + placeOrder(order, null, resultHandler); } /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void placeOrder(Order body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void placeOrder(Order order, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = order; - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling placeOrder")); + // verify the required parameter 'order' is set + if (order == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'order' when calling placeOrder")); return; } @@ -219,7 +219,7 @@ public class StoreApiImpl implements StoreApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { "application/xml", "application/json" }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; TypeReference localVarReturnType = new TypeReference() {}; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApi.java index b7922264c5c..acc8b9f24b0 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApi.java @@ -11,17 +11,17 @@ import java.util.*; public interface UserApi { - void createUser(User body, Handler> handler); + void createUser(User user, Handler> handler); - void createUser(User body, ApiClient.AuthInfo authInfo, Handler> handler); + void createUser(User user, ApiClient.AuthInfo authInfo, Handler> handler); - void createUsersWithArrayInput(List body, Handler> handler); + void createUsersWithArrayInput(List user, Handler> handler); - void createUsersWithArrayInput(List body, ApiClient.AuthInfo authInfo, Handler> handler); + void createUsersWithArrayInput(List user, ApiClient.AuthInfo authInfo, Handler> handler); - void createUsersWithListInput(List body, Handler> handler); + void createUsersWithListInput(List user, Handler> handler); - void createUsersWithListInput(List body, ApiClient.AuthInfo authInfo, Handler> handler); + void createUsersWithListInput(List user, ApiClient.AuthInfo authInfo, Handler> handler); void deleteUser(String username, Handler> handler); @@ -39,8 +39,8 @@ public interface UserApi { void logoutUser(ApiClient.AuthInfo authInfo, Handler> handler); - void updateUser(String username, User body, Handler> handler); + void updateUser(String username, User user, Handler> handler); - void updateUser(String username, User body, ApiClient.AuthInfo authInfo, Handler> handler); + void updateUser(String username, User user, ApiClient.AuthInfo authInfo, Handler> handler); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java index 592748032b6..d7f434909e1 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java @@ -44,26 +44,26 @@ public class UserApiImpl implements UserApi { /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @param resultHandler Asynchronous result handler */ - public void createUser(User body, Handler> resultHandler) { - createUser(body, null, resultHandler); + public void createUser(User user, Handler> resultHandler) { + createUser(user, null, resultHandler); } /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void createUser(User body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void createUser(User user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = user; - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling createUser")); + // verify the required parameter 'user' is set + if (user == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'user' when calling createUser")); return; } @@ -84,7 +84,7 @@ public class UserApiImpl implements UserApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); @@ -92,26 +92,26 @@ public class UserApiImpl implements UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param resultHandler Asynchronous result handler */ - public void createUsersWithArrayInput(List body, Handler> resultHandler) { - createUsersWithArrayInput(body, null, resultHandler); + public void createUsersWithArrayInput(List user, Handler> resultHandler) { + createUsersWithArrayInput(user, null, resultHandler); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void createUsersWithArrayInput(List body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void createUsersWithArrayInput(List user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = user; - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput")); + // verify the required parameter 'user' is set + if (user == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput")); return; } @@ -132,7 +132,7 @@ public class UserApiImpl implements UserApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); @@ -140,26 +140,26 @@ public class UserApiImpl implements UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param resultHandler Asynchronous result handler */ - public void createUsersWithListInput(List body, Handler> resultHandler) { - createUsersWithListInput(body, null, resultHandler); + public void createUsersWithListInput(List user, Handler> resultHandler) { + createUsersWithListInput(user, null, resultHandler); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void createUsersWithListInput(List body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void createUsersWithListInput(List user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = user; - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling createUsersWithListInput")); + // verify the required parameter 'user' is set + if (user == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'user' when calling createUsersWithListInput")); return; } @@ -180,7 +180,7 @@ public class UserApiImpl implements UserApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); @@ -383,23 +383,23 @@ public class UserApiImpl implements UserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @param resultHandler Asynchronous result handler */ - public void updateUser(String username, User body, Handler> resultHandler) { - updateUser(username, body, null, resultHandler); + public void updateUser(String username, User user, Handler> resultHandler) { + updateUser(username, user, null, resultHandler); } /** * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void updateUser(String username, User body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - Object localVarBody = body; + public void updateUser(String username, User user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = user; // verify the required parameter 'username' is set if (username == null) { @@ -407,9 +407,9 @@ public class UserApiImpl implements UserApi { return; } - // verify the required parameter 'body' is set - if (body == null) { - resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling updateUser")); + // verify the required parameter 'user' is set + if (user == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'user' when calling updateUser")); return; } @@ -430,7 +430,7 @@ public class UserApiImpl implements UserApi { Map localVarFormParams = new HashMap<>(); String[] localVarAccepts = { }; - String[] localVarContentTypes = { }; + String[] localVarContentTypes = { "application/json" }; String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java index 18efeb9bd35..7301b22361b 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java @@ -1,7 +1,6 @@ package org.openapitools.client.api.rxjava; import org.openapitools.client.model.Client; -import java.util.UUID; import org.openapitools.client.ApiClient; import java.util.*; @@ -26,50 +25,46 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(UUID uuidTest, Client body, Handler> resultHandler) { - delegate.call123testSpecialTags(uuidTest, body, resultHandler); + public void call123testSpecialTags(Client client, Handler> resultHandler) { + delegate.call123testSpecialTags(client, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.call123testSpecialTags(uuidTest, body, authInfo, resultHandler); + public void call123testSpecialTags(Client client, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.call123testSpecialTags(client, authInfo, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxCall123testSpecialTags(UUID uuidTest, Client body) { + public Single rxCall123testSpecialTags(Client client) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.call123testSpecialTags(uuidTest, body, fut) + delegate.call123testSpecialTags(client, fut) )); } /** * To test special tags * To test special tags and operation ID starting with number - * @param uuidTest to test uuid example value (required) - * @param body client model (required) + * @param client client model (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxCall123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo) { + public Single rxCall123testSpecialTags(Client client, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.call123testSpecialTags(uuidTest, body, authInfo, fut) + delegate.call123testSpecialTags(client, authInfo, fut) )); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/DefaultApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/DefaultApi.java new file mode 100644 index 00000000000..b69b013f77d --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/DefaultApi.java @@ -0,0 +1,70 @@ +package org.openapitools.client.api.rxjava; + +import org.openapitools.client.model.FooGetDefaultResponse; +import org.openapitools.client.ApiClient; + +import java.util.*; + +import rx.Single; +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + + private final org.openapitools.client.api.DefaultApi delegate; + + public DefaultApi(org.openapitools.client.api.DefaultApi delegate) { + this.delegate = delegate; + } + + public org.openapitools.client.api.DefaultApi getDelegate() { + return delegate; + } + + /** + * + * + * @param resultHandler Asynchronous result handler + */ + public void fooGet(Handler> resultHandler) { + delegate.fooGet(resultHandler); + } + + /** + * + * + * @param authInfo call specific auth overrides + * @param resultHandler Asynchronous result handler + */ + public void fooGet(ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.fooGet(authInfo, resultHandler); + } + + /** + * + * + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxFooGet() { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.fooGet(fut) + )); + } + + /** + * + * + * @param authInfo call specific auth overrides + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxFooGet(ApiClient.AuthInfo authInfo) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.fooGet(authInfo, fut) + )); + } + + public static DefaultApi newInstance(org.openapitools.client.api.DefaultApi arg) { + return arg != null ? new DefaultApi(arg) : null; + } +} diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java index a7388f52cd8..85106635b97 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java @@ -3,12 +3,16 @@ package org.openapitools.client.api.rxjava; import io.vertx.core.file.AsyncFile; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import org.openapitools.client.ApiClient; import java.util.*; @@ -31,48 +35,138 @@ public class FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * @param resultHandler Asynchronous result handler */ - public void createXmlItem(XmlItem xmlItem, Handler> resultHandler) { - delegate.createXmlItem(xmlItem, resultHandler); + public void fakeBigDecimalMap(Handler> resultHandler) { + delegate.fakeBigDecimalMap(resultHandler); } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void createXmlItem(XmlItem xmlItem, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.createXmlItem(xmlItem, authInfo, resultHandler); + public void fakeBigDecimalMap(ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.fakeBigDecimalMap(authInfo, resultHandler); } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * @return Asynchronous result handler (RxJava Single) */ - public Single rxCreateXmlItem(XmlItem xmlItem) { + public Single rxFakeBigDecimalMap() { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.createXmlItem(xmlItem, fut) + delegate.fakeBigDecimalMap(fut) )); } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxCreateXmlItem(XmlItem xmlItem, ApiClient.AuthInfo authInfo) { + public Single rxFakeBigDecimalMap(ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.createXmlItem(xmlItem, authInfo, fut) + delegate.fakeBigDecimalMap(authInfo, fut) + )); + } + /** + * Health check endpoint + * + * @param resultHandler Asynchronous result handler + */ + public void fakeHealthGet(Handler> resultHandler) { + delegate.fakeHealthGet(resultHandler); + } + + /** + * Health check endpoint + * + * @param authInfo call specific auth overrides + * @param resultHandler Asynchronous result handler + */ + public void fakeHealthGet(ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.fakeHealthGet(authInfo, resultHandler); + } + + /** + * Health check endpoint + * + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxFakeHealthGet() { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.fakeHealthGet(fut) + )); + } + + /** + * Health check endpoint + * + * @param authInfo call specific auth overrides + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxFakeHealthGet(ApiClient.AuthInfo authInfo) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.fakeHealthGet(authInfo, fut) + )); + } + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @param resultHandler Asynchronous result handler + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1, Handler> resultHandler) { + delegate.fakeHttpSignatureTest(pet, query1, header1, resultHandler); + } + + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @param authInfo call specific auth overrides + * @param resultHandler Asynchronous result handler + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.fakeHttpSignatureTest(pet, query1, header1, authInfo, resultHandler); + } + + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxFakeHttpSignatureTest(Pet pet, String query1, String header1) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.fakeHttpSignatureTest(pet, query1, header1, fut) + )); + } + + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @param authInfo call specific auth overrides + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxFakeHttpSignatureTest(Pet pet, String query1, String header1, ApiClient.AuthInfo authInfo) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.fakeHttpSignatureTest(pet, query1, header1, authInfo, fut) )); } /** @@ -123,46 +217,46 @@ public class FakeApi { /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @param resultHandler Asynchronous result handler */ - public void fakeOuterCompositeSerialize(OuterComposite body, Handler> resultHandler) { - delegate.fakeOuterCompositeSerialize(body, resultHandler); + public void fakeOuterCompositeSerialize(OuterComposite outerComposite, Handler> resultHandler) { + delegate.fakeOuterCompositeSerialize(outerComposite, resultHandler); } /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void fakeOuterCompositeSerialize(OuterComposite body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.fakeOuterCompositeSerialize(body, authInfo, resultHandler); + public void fakeOuterCompositeSerialize(OuterComposite outerComposite, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.fakeOuterCompositeSerialize(outerComposite, authInfo, resultHandler); } /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return Asynchronous result handler (RxJava Single) */ - public Single rxFakeOuterCompositeSerialize(OuterComposite body) { + public Single rxFakeOuterCompositeSerialize(OuterComposite outerComposite) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.fakeOuterCompositeSerialize(body, fut) + delegate.fakeOuterCompositeSerialize(outerComposite, fut) )); } /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxFakeOuterCompositeSerialize(OuterComposite body, ApiClient.AuthInfo authInfo) { + public Single rxFakeOuterCompositeSerialize(OuterComposite outerComposite, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.fakeOuterCompositeSerialize(body, authInfo, fut) + delegate.fakeOuterCompositeSerialize(outerComposite, authInfo, fut) )); } /** @@ -257,82 +351,172 @@ public class FakeApi { } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) * @param resultHandler Asynchronous result handler */ - public void testBodyWithFileSchema(FileSchemaTestClass body, Handler> resultHandler) { - delegate.testBodyWithFileSchema(body, resultHandler); + public void fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty, Handler> resultHandler) { + delegate.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, resultHandler); } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void testBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.testBodyWithFileSchema(body, authInfo, resultHandler); + public void fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, authInfo, resultHandler); } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestBodyWithFileSchema(FileSchemaTestClass body) { + public Single rxFakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testBodyWithFileSchema(body, fut) + delegate.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, fut) )); } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestBodyWithFileSchema(FileSchemaTestClass body, ApiClient.AuthInfo authInfo) { + public Single rxFakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testBodyWithFileSchema(body, authInfo, fut) + delegate.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, authInfo, fut) + )); + } + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @param resultHandler Asynchronous result handler + */ + public void testBodyWithBinary(AsyncFile body, Handler> resultHandler) { + delegate.testBodyWithBinary(body, resultHandler); + } + + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @param authInfo call specific auth overrides + * @param resultHandler Asynchronous result handler + */ + public void testBodyWithBinary(AsyncFile body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testBodyWithBinary(body, authInfo, resultHandler); + } + + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestBodyWithBinary(AsyncFile body) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.testBodyWithBinary(body, fut) + )); + } + + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @param authInfo call specific auth overrides + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestBodyWithBinary(AsyncFile body, ApiClient.AuthInfo authInfo) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.testBodyWithBinary(body, authInfo, fut) + )); + } + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @param resultHandler Asynchronous result handler + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, Handler> resultHandler) { + delegate.testBodyWithFileSchema(fileSchemaTestClass, resultHandler); + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @param authInfo call specific auth overrides + * @param resultHandler Asynchronous result handler + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testBodyWithFileSchema(fileSchemaTestClass, authInfo, resultHandler); + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.testBodyWithFileSchema(fileSchemaTestClass, fut) + )); + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @param authInfo call specific auth overrides + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, ApiClient.AuthInfo authInfo) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.testBodyWithFileSchema(fileSchemaTestClass, authInfo, fut) )); } /** * * * @param query (required) - * @param body (required) + * @param user (required) * @param resultHandler Asynchronous result handler */ - public void testBodyWithQueryParams(String query, User body, Handler> resultHandler) { - delegate.testBodyWithQueryParams(query, body, resultHandler); + public void testBodyWithQueryParams(String query, User user, Handler> resultHandler) { + delegate.testBodyWithQueryParams(query, user, resultHandler); } /** * * * @param query (required) - * @param body (required) + * @param user (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void testBodyWithQueryParams(String query, User body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.testBodyWithQueryParams(query, body, authInfo, resultHandler); + public void testBodyWithQueryParams(String query, User user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testBodyWithQueryParams(query, user, authInfo, resultHandler); } /** * * * @param query (required) - * @param body (required) + * @param user (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestBodyWithQueryParams(String query, User body) { + public Single rxTestBodyWithQueryParams(String query, User user) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testBodyWithQueryParams(query, body, fut) + delegate.testBodyWithQueryParams(query, user, fut) )); } @@ -340,63 +524,63 @@ public class FakeApi { * * * @param query (required) - * @param body (required) + * @param user (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestBodyWithQueryParams(String query, User body, ApiClient.AuthInfo authInfo) { + public Single rxTestBodyWithQueryParams(String query, User user, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testBodyWithQueryParams(query, body, authInfo, fut) + delegate.testBodyWithQueryParams(query, user, authInfo, fut) )); } /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @param resultHandler Asynchronous result handler */ - public void testClientModel(Client body, Handler> resultHandler) { - delegate.testClientModel(body, resultHandler); + public void testClientModel(Client client, Handler> resultHandler) { + delegate.testClientModel(client, resultHandler); } /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void testClientModel(Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.testClientModel(body, authInfo, resultHandler); + public void testClientModel(Client client, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testClientModel(client, authInfo, resultHandler); } /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestClientModel(Client body) { + public Single rxTestClientModel(Client client) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testClientModel(body, fut) + delegate.testClientModel(client, fut) )); } /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestClientModel(Client body, ApiClient.AuthInfo authInfo) { + public Single rxTestClientModel(Client client, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testClientModel(body, authInfo, fut) + delegate.testClientModel(client, authInfo, fut) )); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -418,8 +602,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -442,8 +626,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -467,8 +651,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -500,12 +684,13 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param resultHandler Asynchronous result handler */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, Handler> resultHandler) { - delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, resultHandler); + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, Handler> resultHandler) { + delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, resultHandler); } /** @@ -517,13 +702,14 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, authInfo, resultHandler); + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, authInfo, resultHandler); } /** @@ -535,13 +721,14 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) { + public Single rxTestEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, fut) + delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, fut) )); } @@ -554,14 +741,15 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo) { + public Single rxTestEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, authInfo, fut) + delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, authInfo, fut) )); } /** @@ -632,46 +820,46 @@ public class FakeApi { /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @param resultHandler Asynchronous result handler */ - public void testInlineAdditionalProperties(Map param, Handler> resultHandler) { - delegate.testInlineAdditionalProperties(param, resultHandler); + public void testInlineAdditionalProperties(Map requestBody, Handler> resultHandler) { + delegate.testInlineAdditionalProperties(requestBody, resultHandler); } /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void testInlineAdditionalProperties(Map param, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.testInlineAdditionalProperties(param, authInfo, resultHandler); + public void testInlineAdditionalProperties(Map requestBody, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testInlineAdditionalProperties(requestBody, authInfo, resultHandler); } /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestInlineAdditionalProperties(Map param) { + public Single rxTestInlineAdditionalProperties(Map requestBody) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testInlineAdditionalProperties(param, fut) + delegate.testInlineAdditionalProperties(requestBody, fut) )); } /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestInlineAdditionalProperties(Map param, ApiClient.AuthInfo authInfo) { + public Single rxTestInlineAdditionalProperties(Map requestBody, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testInlineAdditionalProperties(param, authInfo, fut) + delegate.testInlineAdditionalProperties(requestBody, authInfo, fut) )); } /** @@ -731,10 +919,12 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @param resultHandler Asynchronous result handler */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, Handler> resultHandler) { - delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, resultHandler); + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, Handler> resultHandler) { + delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language, resultHandler); } /** @@ -745,11 +935,13 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, authInfo, resultHandler); + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language, authInfo, resultHandler); } /** @@ -760,11 +952,13 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) { + public Single rxTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, fut) + delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language, fut) )); } @@ -776,12 +970,14 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, ApiClient.AuthInfo authInfo) { + public Single rxTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, authInfo, fut) + delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language, authInfo, fut) )); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeClassnameTags123Api.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeClassnameTags123Api.java index 13fba337d6e..56934fea00e 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeClassnameTags123Api.java @@ -25,46 +25,46 @@ public class FakeClassnameTags123Api { /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @param resultHandler Asynchronous result handler */ - public void testClassname(Client body, Handler> resultHandler) { - delegate.testClassname(body, resultHandler); + public void testClassname(Client client, Handler> resultHandler) { + delegate.testClassname(client, resultHandler); } /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void testClassname(Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.testClassname(body, authInfo, resultHandler); + public void testClassname(Client client, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testClassname(client, authInfo, resultHandler); } /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestClassname(Client body) { + public Single rxTestClassname(Client client) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testClassname(body, fut) + delegate.testClassname(client, fut) )); } /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxTestClassname(Client body, ApiClient.AuthInfo authInfo) { + public Single rxTestClassname(Client client, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.testClassname(body, authInfo, fut) + delegate.testClassname(client, authInfo, fut) )); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java index ea60428a4df..80874aa05a1 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java @@ -28,46 +28,46 @@ public class PetApi { /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param resultHandler Asynchronous result handler */ - public void addPet(Pet body, Handler> resultHandler) { - delegate.addPet(body, resultHandler); + public void addPet(Pet pet, Handler> resultHandler) { + delegate.addPet(pet, resultHandler); } /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void addPet(Pet body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.addPet(body, authInfo, resultHandler); + public void addPet(Pet pet, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.addPet(pet, authInfo, resultHandler); } /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxAddPet(Pet body) { + public Single rxAddPet(Pet pet) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.addPet(body, fut) + delegate.addPet(pet, fut) )); } /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxAddPet(Pet body, ApiClient.AuthInfo authInfo) { + public Single rxAddPet(Pet pet, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.addPet(body, authInfo, fut) + delegate.addPet(pet, authInfo, fut) )); } /** @@ -257,46 +257,46 @@ public class PetApi { /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param resultHandler Asynchronous result handler */ - public void updatePet(Pet body, Handler> resultHandler) { - delegate.updatePet(body, resultHandler); + public void updatePet(Pet pet, Handler> resultHandler) { + delegate.updatePet(pet, resultHandler); } /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void updatePet(Pet body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.updatePet(body, authInfo, resultHandler); + public void updatePet(Pet pet, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.updatePet(pet, authInfo, resultHandler); } /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxUpdatePet(Pet body) { + public Single rxUpdatePet(Pet pet) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.updatePet(body, fut) + delegate.updatePet(pet, fut) )); } /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxUpdatePet(Pet body, ApiClient.AuthInfo authInfo) { + public Single rxUpdatePet(Pet pet, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.updatePet(body, authInfo, fut) + delegate.updatePet(pet, authInfo, fut) )); } /** diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java index 472da15fc3c..36bd32dfc98 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java @@ -156,46 +156,46 @@ public class StoreApi { /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @param resultHandler Asynchronous result handler */ - public void placeOrder(Order body, Handler> resultHandler) { - delegate.placeOrder(body, resultHandler); + public void placeOrder(Order order, Handler> resultHandler) { + delegate.placeOrder(order, resultHandler); } /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void placeOrder(Order body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.placeOrder(body, authInfo, resultHandler); + public void placeOrder(Order order, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.placeOrder(order, authInfo, resultHandler); } /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxPlaceOrder(Order body) { + public Single rxPlaceOrder(Order order) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.placeOrder(body, fut) + delegate.placeOrder(order, fut) )); } /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxPlaceOrder(Order body, ApiClient.AuthInfo authInfo) { + public Single rxPlaceOrder(Order order, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.placeOrder(body, authInfo, fut) + delegate.placeOrder(order, authInfo, fut) )); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/UserApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/UserApi.java index 6ed5725ec83..ec80dd3bb74 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/UserApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/UserApi.java @@ -26,136 +26,136 @@ public class UserApi { /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @param resultHandler Asynchronous result handler */ - public void createUser(User body, Handler> resultHandler) { - delegate.createUser(body, resultHandler); + public void createUser(User user, Handler> resultHandler) { + delegate.createUser(user, resultHandler); } /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void createUser(User body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.createUser(body, authInfo, resultHandler); + public void createUser(User user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.createUser(user, authInfo, resultHandler); } /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxCreateUser(User body) { + public Single rxCreateUser(User user) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.createUser(body, fut) + delegate.createUser(user, fut) )); } /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxCreateUser(User body, ApiClient.AuthInfo authInfo) { + public Single rxCreateUser(User user, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.createUser(body, authInfo, fut) + delegate.createUser(user, authInfo, fut) )); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param resultHandler Asynchronous result handler */ - public void createUsersWithArrayInput(List body, Handler> resultHandler) { - delegate.createUsersWithArrayInput(body, resultHandler); + public void createUsersWithArrayInput(List user, Handler> resultHandler) { + delegate.createUsersWithArrayInput(user, resultHandler); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void createUsersWithArrayInput(List body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.createUsersWithArrayInput(body, authInfo, resultHandler); + public void createUsersWithArrayInput(List user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.createUsersWithArrayInput(user, authInfo, resultHandler); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxCreateUsersWithArrayInput(List body) { + public Single rxCreateUsersWithArrayInput(List user) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.createUsersWithArrayInput(body, fut) + delegate.createUsersWithArrayInput(user, fut) )); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxCreateUsersWithArrayInput(List body, ApiClient.AuthInfo authInfo) { + public Single rxCreateUsersWithArrayInput(List user, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.createUsersWithArrayInput(body, authInfo, fut) + delegate.createUsersWithArrayInput(user, authInfo, fut) )); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param resultHandler Asynchronous result handler */ - public void createUsersWithListInput(List body, Handler> resultHandler) { - delegate.createUsersWithListInput(body, resultHandler); + public void createUsersWithListInput(List user, Handler> resultHandler) { + delegate.createUsersWithListInput(user, resultHandler); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void createUsersWithListInput(List body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.createUsersWithListInput(body, authInfo, resultHandler); + public void createUsersWithListInput(List user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.createUsersWithListInput(user, authInfo, resultHandler); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxCreateUsersWithListInput(List body) { + public Single rxCreateUsersWithListInput(List user) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.createUsersWithListInput(body, fut) + delegate.createUsersWithListInput(user, fut) )); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxCreateUsersWithListInput(List body, ApiClient.AuthInfo authInfo) { + public Single rxCreateUsersWithListInput(List user, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.createUsersWithListInput(body, authInfo, fut) + delegate.createUsersWithListInput(user, authInfo, fut) )); } /** @@ -342,35 +342,35 @@ public class UserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @param resultHandler Asynchronous result handler */ - public void updateUser(String username, User body, Handler> resultHandler) { - delegate.updateUser(username, body, resultHandler); + public void updateUser(String username, User user, Handler> resultHandler) { + delegate.updateUser(username, user, resultHandler); } /** * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void updateUser(String username, User body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.updateUser(username, body, authInfo, resultHandler); + public void updateUser(String username, User user, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.updateUser(username, user, authInfo, resultHandler); } /** * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxUpdateUser(String username, User body) { + public Single rxUpdateUser(String username, User user) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.updateUser(username, body, fut) + delegate.updateUser(username, user, fut) )); } @@ -378,13 +378,13 @@ public class UserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxUpdateUser(String username, User body, ApiClient.AuthInfo authInfo) { + public Single rxUpdateUser(String username, User user, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.updateUser(username, body, authInfo, fut) + delegate.updateUser(username, user, authInfo, fut) )); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 46ec07ac55b..bb18d6f5c2d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -20,9 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -31,403 +29,85 @@ import com.fasterxml.jackson.annotation.JsonTypeName; * AdditionalPropertiesClass */ @JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString = new HashMap<>(); + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; + private Map mapProperty = new HashMap<>(); - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - private Map mapInteger = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - private Map mapBoolean = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - private Map> mapArrayInteger = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - private Map> mapArrayAnytype = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; - private Map> mapMapString = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - private Map> mapMapAnytype = new HashMap<>(); - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - private Object anytype3; + public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; + private Map> mapOfMapProperty = new HashMap<>(); public AdditionalPropertiesClass() { } - public AdditionalPropertiesClass mapString(Map mapString) { + public AdditionalPropertiesClass mapProperty(Map mapProperty) { - this.mapString = mapString; + this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); } - this.mapString.put(key, mapStringItem); + this.mapProperty.put(key, mapPropertyItem); return this; } /** - * Get mapString - * @return mapString + * Get mapProperty + * @return mapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapString() { - return mapString; + public Map getMapProperty() { + return mapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapString(Map mapString) { - this.mapString = mapString; + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { - this.mapNumber = mapNumber; + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); } - this.mapNumber.put(key, mapNumberItem); + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; } /** - * Get mapNumber - * @return mapNumber + * Get mapOfMapProperty + * @return mapOfMapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapNumber() { - return mapNumber; + public Map> getMapOfMapProperty() { + return mapOfMapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapInteger() { - return mapInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapBoolean() { - return mapBoolean; - } - - - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapString() { - return mapMapString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype1() { - return anytype1; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype2() { - return anytype2; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype3() { - return anytype3; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; } @Override @@ -439,39 +119,21 @@ public class AdditionalPropertiesClass { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapProperty, mapOfMapProperty); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 00000000000..ff55e37f2d7 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,136 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private SingleRefType singleRefType; + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SingleRefType getSingleRefType() { + return singleRefType; + } + + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java index a40c65533eb..fd52da7ba5e 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Animal.java @@ -40,9 +40,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Cat.class, name = "CAT"), + @JsonSubTypes.Type(value = Dog.class, name = "DOG"), }) public class Animal { diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java index a0a6af014cd..e9c3b88dd90 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Cat.java @@ -39,9 +39,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName; allowSetters = true // allows the className to be set during deserialization ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), -}) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 00000000000..73cccb0d2d3 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java index 0b2ba27fcb6..dc4dbac1001 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/EnumTest.java @@ -21,6 +21,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -32,7 +39,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE }) @JsonTypeName("Enum_Test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -194,7 +204,16 @@ public class EnumTest { private EnumNumberEnum enumNumber; public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; public EnumTest() { } @@ -304,8 +323,8 @@ public class EnumTest { public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); - this.outerEnum = outerEnum; return this; } @@ -314,18 +333,104 @@ public class EnumTest { * @return outerEnum **/ @javax.annotation.Nullable + @JsonIgnore + + public OuterEnum getOuterEnum() { + return outerEnum.orElse(null); + } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OuterEnum getOuterEnum() { + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + } - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * @return outerEnumInteger + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * @return outerEnumDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + + public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; + } + + /** + * Get outerEnumIntegerDefaultValue + * @return outerEnumIntegerDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } @Override @@ -341,12 +446,26 @@ public class EnumTest { Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && Objects.equals(this.enumInteger, enumTest.enumInteger) && Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + equalsNullable(this.outerEnum, enumTest.outerEnum) && + Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && + Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -358,6 +477,9 @@ public class EnumTest { 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(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java new file mode 100644 index 00000000000..1a6fbe6cb37 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FakeBigDecimalMap200Response + */ +@JsonPropertyOrder({ + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_ID, + FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_MAP +}) +@JsonTypeName("fakeBigDecimalMap_200_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FakeBigDecimalMap200Response { + public static final String JSON_PROPERTY_SOME_ID = "someId"; + private BigDecimal someId; + + public static final String JSON_PROPERTY_SOME_MAP = "someMap"; + private Map someMap = new HashMap<>(); + + public FakeBigDecimalMap200Response() { + } + + public FakeBigDecimalMap200Response someId(BigDecimal someId) { + + this.someId = someId; + return this; + } + + /** + * Get someId + * @return someId + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getSomeId() { + return someId; + } + + + @JsonProperty(JSON_PROPERTY_SOME_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSomeId(BigDecimal someId) { + this.someId = someId; + } + + + public FakeBigDecimalMap200Response someMap(Map someMap) { + + this.someMap = someMap; + return this; + } + + public FakeBigDecimalMap200Response putSomeMapItem(String key, BigDecimal someMapItem) { + if (this.someMap == null) { + this.someMap = new HashMap<>(); + } + this.someMap.put(key, someMapItem); + return this; + } + + /** + * Get someMap + * @return someMap + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getSomeMap() { + return someMap; + } + + + @JsonProperty(JSON_PROPERTY_SOME_MAP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSomeMap(Map someMap) { + this.someMap = someMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o; + return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) && + Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap); + } + + @Override + public int hashCode() { + return Objects.hash(someId, someMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FakeBigDecimalMap200Response {\n"); + sb.append(" someId: ").append(toIndentedString(someId)).append("\n"); + sb.append(" someMap: ").append(toIndentedString(someMap)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 00000000000..0ae068735bd --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,103 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBar(String bar) { + this.bar = bar; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java new file mode 100644 index 00000000000..0626a5810e6 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FooGetDefaultResponse + */ +@JsonPropertyOrder({ + FooGetDefaultResponse.JSON_PROPERTY_STRING +}) +@JsonTypeName("_foo_get_default_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FooGetDefaultResponse { + public static final String JSON_PROPERTY_STRING = "string"; + private Foo string; + + public FooGetDefaultResponse() { + } + + public FooGetDefaultResponse string(Foo string) { + + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(Foo string) { + this.string = string; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; + return Objects.equals(this.string, fooGetDefaultResponse.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooGetDefaultResponse {\n"); + sb.append(" string: ").append(toIndentedString(string)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java index ce7dc954214..9589f801ac9 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/FormatTest.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; FormatTest.JSON_PROPERTY_NUMBER, FormatTest.JSON_PROPERTY_FLOAT, FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_DECIMAL, FormatTest.JSON_PROPERTY_STRING, FormatTest.JSON_PROPERTY_BYTE, FormatTest.JSON_PROPERTY_BINARY, @@ -45,7 +46,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER }) @JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -68,6 +70,9 @@ public class FormatTest { public static final String JSON_PROPERTY_DOUBLE = "double"; private Double _double; + public static final String JSON_PROPERTY_DECIMAL = "decimal"; + private BigDecimal decimal; + public static final String JSON_PROPERTY_STRING = "string"; private String string; @@ -89,8 +94,11 @@ public class FormatTest { public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + private String patternWithDigits; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; + private String patternWithDigitsAndDelimiter; public FormatTest() { } @@ -261,6 +269,32 @@ public class FormatTest { } + public FormatTest decimal(BigDecimal decimal) { + + this.decimal = decimal; + return this; + } + + /** + * Get decimal + * @return decimal + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDecimal() { + return decimal; + } + + + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecimal(BigDecimal decimal) { + this.decimal = decimal; + } + + public FormatTest string(String string) { this.string = string; @@ -443,29 +477,55 @@ public class FormatTest { } - public FormatTest bigDecimal(BigDecimal bigDecimal) { + public FormatTest patternWithDigits(String patternWithDigits) { - this.bigDecimal = bigDecimal; + this.patternWithDigits = patternWithDigits; return this; } /** - * Get bigDecimal - * @return bigDecimal + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getBigDecimal() { - return bigDecimal; + public String getPatternWithDigits() { + return patternWithDigits; } - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } @Override @@ -483,6 +543,7 @@ public class FormatTest { Objects.equals(this.number, formatTest.number) && Objects.equals(this._float, formatTest._float) && Objects.equals(this._double, formatTest._double) && + Objects.equals(this.decimal, formatTest.decimal) && Objects.equals(this.string, formatTest.string) && Arrays.equals(this._byte, formatTest._byte) && Objects.equals(this.binary, formatTest.binary) && @@ -490,12 +551,13 @@ public class FormatTest { Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -508,6 +570,7 @@ public class FormatTest { 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(" decimal: ").append(toIndentedString(decimal)).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"); @@ -515,7 +578,8 @@ public class FormatTest { 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(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); + sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 00000000000..b156198397f --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,126 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 00000000000..44ae6b98f11 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,625 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullableClass extends HashMap { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + private List arrayItemsNullable; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + private Map objectItemsNullable = new HashMap<>(); + + public NullableClass() { + + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 00000000000..1a3e502685b --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,218 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + private List bars; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBars(List bars) { + this.bars = bars; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnum.java index d2924eb9c29..4cd955b63dc 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -55,7 +55,7 @@ public enum OuterEnum { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 00000000000..73077cc8c31 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 00000000000..e6c2e38c2e7 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 00000000000..ef61373b187 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java new file mode 100644 index 00000000000..0b8b5f66164 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.OuterEnumInteger; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * OuterObjectWithEnumProperty + */ +@JsonPropertyOrder({ + OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OuterObjectWithEnumProperty { + public static final String JSON_PROPERTY_VALUE = "value"; + private OuterEnumInteger value; + + public OuterObjectWithEnumProperty() { + } + + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { + + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OuterEnumInteger getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(OuterEnumInteger value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; + return Objects.equals(this.value, outerObjectWithEnumProperty.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterObjectWithEnumProperty {\n"); + sb.append(" value: ").append(toIndentedString(value)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 00000000000..f9922454755 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java index bedacb16913..8c6588d73f4 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; @JsonPropertyOrder({ SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME }) -@JsonTypeName("$special[model.name]") +@JsonTypeName("_special_model.name_") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SpecialModelName { public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; @@ -71,8 +71,8 @@ public class SpecialModelName { if (o == null || getClass() != o.getClass()) { return false; } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); } @Override diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 64da5ac36e8..6573a5438c8 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,6 +31,8 @@ import io.vertx.ext.unit.junit.RunTestOnContext; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.Async; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -64,8 +66,8 @@ public class AnotherFakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void call123testSpecialTagsTest(TestContext context) { - Async async = context.async(); + public void call123testSpecialTagsTest(TestContext testContext) { + Async async = testContext.async(); Client client = null; api.call123testSpecialTags(client, result -> { // TODO: test validations @@ -73,4 +75,4 @@ public class AnotherFakeApiTest { }); } -} \ No newline at end of file +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 00000000000..3a0c37e3c7d --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,77 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.api; + +import org.openapitools.client.model.FooGetDefaultResponse; + +import org.openapitools.client.Configuration; + +import org.junit.Test; +import org.junit.Ignore; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.runner.RunWith; + +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +import io.vertx.core.json.JsonObject; +import io.vertx.core.Vertx; +import io.vertx.ext.unit.junit.VertxUnitRunner; +import io.vertx.ext.unit.junit.RunTestOnContext; +import io.vertx.ext.unit.TestContext; +import io.vertx.ext.unit.Async; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DefaultApi + */ +@RunWith(VertxUnitRunner.class) +@Ignore +public class DefaultApiTest { + + private DefaultApi api; + + @Rule + public RunTestOnContext rule = new RunTestOnContext(); + + @BeforeClass + public void setupApiClient() { + JsonObject config = new JsonObject(); + Vertx vertx = rule.vertx(); + Configuration.setupDefaultApiClient(vertx, config); + + api = new DefaultApiImpl(); + } + + /** + * + * + * + * @param context Vertx test context for doing assertions + */ + @Test + public void fooGetTest(TestContext testContext) { + Async async = testContext.async(); + api.fooGet(result -> { + // TODO: test validations + async.complete(); + }); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeApiTest.java index 35801ef8f90..4fa25e25e50 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,12 +15,16 @@ package org.openapitools.client.api; import io.vertx.core.file.AsyncFile; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; +import org.openapitools.client.model.FakeBigDecimalMap200Response; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; -import java.time.LocalDateTime; +import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import org.openapitools.client.Configuration; @@ -39,6 +43,7 @@ import io.vertx.ext.unit.junit.RunTestOnContext; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.Async; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; @@ -67,16 +72,48 @@ public class FakeApiTest { } /** - * creates an XmlItem - * this route creates an XmlItem + * + * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys * * @param context Vertx test context for doing assertions */ @Test - public void createXmlItemTest(TestContext context) { - Async async = context.async(); - XmlItem xmlItem = null; - api.createXmlItem(xmlItem, result -> { + public void fakeBigDecimalMapTest(TestContext testContext) { + Async async = testContext.async(); + api.fakeBigDecimalMap(result -> { + // TODO: test validations + async.complete(); + }); + } + + /** + * Health check endpoint + * + * + * @param context Vertx test context for doing assertions + */ + @Test + public void fakeHealthGetTest(TestContext testContext) { + Async async = testContext.async(); + api.fakeHealthGet(result -> { + // TODO: test validations + async.complete(); + }); + } + + /** + * test http signature authentication + * + * + * @param context Vertx test context for doing assertions + */ + @Test + public void fakeHttpSignatureTestTest(TestContext testContext) { + Async async = testContext.async(); + Pet pet = null; + String query1 = null; + String header1 = null; + api.fakeHttpSignatureTest(pet, query1, header1, result -> { // TODO: test validations async.complete(); }); @@ -89,8 +126,8 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void fakeOuterBooleanSerializeTest(TestContext context) { - Async async = context.async(); + public void fakeOuterBooleanSerializeTest(TestContext testContext) { + Async async = testContext.async(); Boolean body = null; api.fakeOuterBooleanSerialize(body, result -> { // TODO: test validations @@ -105,10 +142,10 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void fakeOuterCompositeSerializeTest(TestContext context) { - Async async = context.async(); - OuterComposite body = null; - api.fakeOuterCompositeSerialize(body, result -> { + public void fakeOuterCompositeSerializeTest(TestContext testContext) { + Async async = testContext.async(); + OuterComposite outerComposite = null; + api.fakeOuterCompositeSerialize(outerComposite, result -> { // TODO: test validations async.complete(); }); @@ -121,8 +158,8 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void fakeOuterNumberSerializeTest(TestContext context) { - Async async = context.async(); + public void fakeOuterNumberSerializeTest(TestContext testContext) { + Async async = testContext.async(); BigDecimal body = null; api.fakeOuterNumberSerialize(body, result -> { // TODO: test validations @@ -137,8 +174,8 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void fakeOuterStringSerializeTest(TestContext context) { - Async async = context.async(); + public void fakeOuterStringSerializeTest(TestContext testContext) { + Async async = testContext.async(); String body = null; api.fakeOuterStringSerialize(body, result -> { // TODO: test validations @@ -148,15 +185,47 @@ public class FakeApiTest { /** * - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples * * @param context Vertx test context for doing assertions */ @Test - public void testBodyWithFileSchemaTest(TestContext context) { - Async async = context.async(); - FileSchemaTestClass body = null; - api.testBodyWithFileSchema(body, result -> { + public void fakePropertyEnumIntegerSerializeTest(TestContext testContext) { + Async async = testContext.async(); + OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; + api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, result -> { + // TODO: test validations + async.complete(); + }); + } + + /** + * + * For this test, the body has to be a binary file. + * + * @param context Vertx test context for doing assertions + */ + @Test + public void testBodyWithBinaryTest(TestContext testContext) { + Async async = testContext.async(); + AsyncFile body = null; + api.testBodyWithBinary(body, result -> { + // TODO: test validations + async.complete(); + }); + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + * + * @param context Vertx test context for doing assertions + */ + @Test + public void testBodyWithFileSchemaTest(TestContext testContext) { + Async async = testContext.async(); + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema(fileSchemaTestClass, result -> { // TODO: test validations async.complete(); }); @@ -169,11 +238,11 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void testBodyWithQueryParamsTest(TestContext context) { - Async async = context.async(); + public void testBodyWithQueryParamsTest(TestContext testContext) { + Async async = testContext.async(); String query = null; - User body = null; - api.testBodyWithQueryParams(query, body, result -> { + User user = null; + api.testBodyWithQueryParams(query, user, result -> { // TODO: test validations async.complete(); }); @@ -186,10 +255,10 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void testClientModelTest(TestContext context) { - Async async = context.async(); - Client body = null; - api.testClientModel(body, result -> { + public void testClientModelTest(TestContext testContext) { + Async async = testContext.async(); + Client client = null; + api.testClientModel(client, result -> { // TODO: test validations async.complete(); }); @@ -202,8 +271,8 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void testEndpointParametersTest(TestContext context) { - Async async = context.async(); + public void testEndpointParametersTest(TestContext testContext) { + Async async = testContext.async(); BigDecimal number = null; Double _double = null; String patternWithoutDelimiter = null; @@ -231,17 +300,18 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void testEnumParametersTest(TestContext context) { - Async async = context.async(); + public void testEnumParametersTest(TestContext testContext) { + Async async = testContext.async(); List enumHeaderStringArray = null; String enumHeaderString = null; List enumQueryStringArray = null; String enumQueryString = null; Integer enumQueryInteger = null; Double enumQueryDouble = null; + List enumQueryModelArray = null; List enumFormStringArray = null; String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, result -> { + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, result -> { // TODO: test validations async.complete(); }); @@ -254,8 +324,8 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void testGroupParametersTest(TestContext context) { - Async async = context.async(); + public void testGroupParametersTest(TestContext testContext) { + Async async = testContext.async(); Integer requiredStringGroup = null; Boolean requiredBooleanGroup = null; Long requiredInt64Group = null; @@ -275,10 +345,10 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void testInlineAdditionalPropertiesTest(TestContext context) { - Async async = context.async(); - Map param = null; - api.testInlineAdditionalProperties(param, result -> { + public void testInlineAdditionalPropertiesTest(TestContext testContext) { + Async async = testContext.async(); + Map requestBody = null; + api.testInlineAdditionalProperties(requestBody, result -> { // TODO: test validations async.complete(); }); @@ -291,8 +361,8 @@ public class FakeApiTest { * @param context Vertx test context for doing assertions */ @Test - public void testJsonFormDataTest(TestContext context) { - Async async = context.async(); + public void testJsonFormDataTest(TestContext testContext) { + Async async = testContext.async(); String param = null; String param2 = null; api.testJsonFormData(param, param2, result -> { @@ -301,4 +371,26 @@ public class FakeApiTest { }); } + /** + * + * To test the collection format in query parameters + * + * @param context Vertx test context for doing assertions + */ + @Test + public void testQueryParameterCollectionFormatTest(TestContext testContext) { + Async async = testContext.async(); + List pipe = null; + List ioutil = null; + List http = null; + List url = null; + List context = null; + String allowEmpty = null; + Map language = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language, result -> { + // TODO: test validations + async.complete(); + }); + } + } diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index 31acc5203d7..47a43e04405 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,6 +31,8 @@ import io.vertx.ext.unit.junit.RunTestOnContext; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.Async; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -64,8 +66,8 @@ public class FakeClassnameTags123ApiTest { * @param context Vertx test context for doing assertions */ @Test - public void testClassnameTest(TestContext context) { - Async async = context.async(); + public void testClassnameTest(TestContext testContext) { + Async async = testContext.async(); Client client = null; api.testClassname(client, result -> { // TODO: test validations @@ -73,4 +75,4 @@ public class FakeClassnameTags123ApiTest { }); } -} \ No newline at end of file +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/PetApiTest.java index 17810a6435e..0f640e564d3 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,6 +15,7 @@ package org.openapitools.client.api; import io.vertx.core.file.AsyncFile; import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.Pet; +import java.util.Set; import org.openapitools.client.Configuration; @@ -33,11 +34,12 @@ import io.vertx.ext.unit.junit.RunTestOnContext; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.Async; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; /** * API tests for PetApi @@ -67,8 +69,8 @@ public class PetApiTest { * @param context Vertx test context for doing assertions */ @Test - public void addPetTest(TestContext context) { - Async async = context.async(); + public void addPetTest(TestContext testContext) { + Async async = testContext.async(); Pet pet = null; api.addPet(pet, result -> { // TODO: test validations @@ -83,8 +85,8 @@ public class PetApiTest { * @param context Vertx test context for doing assertions */ @Test - public void deletePetTest(TestContext context) { - Async async = context.async(); + public void deletePetTest(TestContext testContext) { + Async async = testContext.async(); Long petId = null; String apiKey = null; api.deletePet(petId, apiKey, result -> { @@ -100,8 +102,8 @@ public class PetApiTest { * @param context Vertx test context for doing assertions */ @Test - public void findPetsByStatusTest(TestContext context) { - Async async = context.async(); + public void findPetsByStatusTest(TestContext testContext) { + Async async = testContext.async(); List status = null; api.findPetsByStatus(status, result -> { // TODO: test validations @@ -116,8 +118,8 @@ public class PetApiTest { * @param context Vertx test context for doing assertions */ @Test - public void findPetsByTagsTest(TestContext context) { - Async async = context.async(); + public void findPetsByTagsTest(TestContext testContext) { + Async async = testContext.async(); Set tags = null; api.findPetsByTags(tags, result -> { // TODO: test validations @@ -132,8 +134,8 @@ public class PetApiTest { * @param context Vertx test context for doing assertions */ @Test - public void getPetByIdTest(TestContext context) { - Async async = context.async(); + public void getPetByIdTest(TestContext testContext) { + Async async = testContext.async(); Long petId = null; api.getPetById(petId, result -> { // TODO: test validations @@ -148,8 +150,8 @@ public class PetApiTest { * @param context Vertx test context for doing assertions */ @Test - public void updatePetTest(TestContext context) { - Async async = context.async(); + public void updatePetTest(TestContext testContext) { + Async async = testContext.async(); Pet pet = null; api.updatePet(pet, result -> { // TODO: test validations @@ -164,8 +166,8 @@ public class PetApiTest { * @param context Vertx test context for doing assertions */ @Test - public void updatePetWithFormTest(TestContext context) { - Async async = context.async(); + public void updatePetWithFormTest(TestContext testContext) { + Async async = testContext.async(); Long petId = null; String name = null; String status = null; @@ -182,15 +184,33 @@ public class PetApiTest { * @param context Vertx test context for doing assertions */ @Test - public void uploadFileTest(TestContext context) { - Async async = context.async(); + public void uploadFileTest(TestContext testContext) { + Async async = testContext.async(); Long petId = null; String additionalMetadata = null; - AsyncFile file = null; - api.uploadFile(petId, additionalMetadata, file, result -> { + AsyncFile _file = null; + api.uploadFile(petId, additionalMetadata, _file, result -> { // TODO: test validations async.complete(); }); } -} \ No newline at end of file + /** + * uploads an image (required) + * + * + * @param context Vertx test context for doing assertions + */ + @Test + public void uploadFileWithRequiredFileTest(TestContext testContext) { + Async async = testContext.async(); + Long petId = null; + AsyncFile requiredFile = null; + String additionalMetadata = null; + api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, result -> { + // TODO: test validations + async.complete(); + }); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java index 6765ad932d0..d95bd4fe822 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,6 +31,8 @@ import io.vertx.ext.unit.junit.RunTestOnContext; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.Async; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -64,8 +66,8 @@ public class StoreApiTest { * @param context Vertx test context for doing assertions */ @Test - public void deleteOrderTest(TestContext context) { - Async async = context.async(); + public void deleteOrderTest(TestContext testContext) { + Async async = testContext.async(); String orderId = null; api.deleteOrder(orderId, result -> { // TODO: test validations @@ -80,8 +82,8 @@ public class StoreApiTest { * @param context Vertx test context for doing assertions */ @Test - public void getInventoryTest(TestContext context) { - Async async = context.async(); + public void getInventoryTest(TestContext testContext) { + Async async = testContext.async(); api.getInventory(result -> { // TODO: test validations async.complete(); @@ -95,8 +97,8 @@ public class StoreApiTest { * @param context Vertx test context for doing assertions */ @Test - public void getOrderByIdTest(TestContext context) { - Async async = context.async(); + public void getOrderByIdTest(TestContext testContext) { + Async async = testContext.async(); Long orderId = null; api.getOrderById(orderId, result -> { // TODO: test validations @@ -111,8 +113,8 @@ public class StoreApiTest { * @param context Vertx test context for doing assertions */ @Test - public void placeOrderTest(TestContext context) { - Async async = context.async(); + public void placeOrderTest(TestContext testContext) { + Async async = testContext.async(); Order order = null; api.placeOrder(order, result -> { // TODO: test validations @@ -120,4 +122,4 @@ public class StoreApiTest { }); } -} \ No newline at end of file +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/UserApiTest.java index b2d6baea3cd..166e90ee695 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * 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 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,6 +12,7 @@ package org.openapitools.client.api; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.openapitools.client.Configuration; @@ -31,6 +32,8 @@ import io.vertx.ext.unit.junit.RunTestOnContext; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.Async; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -64,8 +67,8 @@ public class UserApiTest { * @param context Vertx test context for doing assertions */ @Test - public void createUserTest(TestContext context) { - Async async = context.async(); + public void createUserTest(TestContext testContext) { + Async async = testContext.async(); User user = null; api.createUser(user, result -> { // TODO: test validations @@ -80,8 +83,8 @@ public class UserApiTest { * @param context Vertx test context for doing assertions */ @Test - public void createUsersWithArrayInputTest(TestContext context) { - Async async = context.async(); + public void createUsersWithArrayInputTest(TestContext testContext) { + Async async = testContext.async(); List user = null; api.createUsersWithArrayInput(user, result -> { // TODO: test validations @@ -96,8 +99,8 @@ public class UserApiTest { * @param context Vertx test context for doing assertions */ @Test - public void createUsersWithListInputTest(TestContext context) { - Async async = context.async(); + public void createUsersWithListInputTest(TestContext testContext) { + Async async = testContext.async(); List user = null; api.createUsersWithListInput(user, result -> { // TODO: test validations @@ -112,8 +115,8 @@ public class UserApiTest { * @param context Vertx test context for doing assertions */ @Test - public void deleteUserTest(TestContext context) { - Async async = context.async(); + public void deleteUserTest(TestContext testContext) { + Async async = testContext.async(); String username = null; api.deleteUser(username, result -> { // TODO: test validations @@ -128,8 +131,8 @@ public class UserApiTest { * @param context Vertx test context for doing assertions */ @Test - public void getUserByNameTest(TestContext context) { - Async async = context.async(); + public void getUserByNameTest(TestContext testContext) { + Async async = testContext.async(); String username = null; api.getUserByName(username, result -> { // TODO: test validations @@ -144,8 +147,8 @@ public class UserApiTest { * @param context Vertx test context for doing assertions */ @Test - public void loginUserTest(TestContext context) { - Async async = context.async(); + public void loginUserTest(TestContext testContext) { + Async async = testContext.async(); String username = null; String password = null; api.loginUser(username, password, result -> { @@ -161,8 +164,8 @@ public class UserApiTest { * @param context Vertx test context for doing assertions */ @Test - public void logoutUserTest(TestContext context) { - Async async = context.async(); + public void logoutUserTest(TestContext testContext) { + Async async = testContext.async(); api.logoutUser(result -> { // TODO: test validations async.complete(); @@ -176,8 +179,8 @@ public class UserApiTest { * @param context Vertx test context for doing assertions */ @Test - public void updateUserTest(TestContext context) { - Async async = context.async(); + public void updateUserTest(TestContext testContext) { + Async async = testContext.async(); String username = null; User user = null; api.updateUser(username, user, result -> { @@ -186,4 +189,4 @@ public class UserApiTest { }); } -} \ No newline at end of file +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java deleted file mode 100644 index 4f6fd800ab7..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesAnyType - */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - - /** - * Model tests for AdditionalPropertiesAnyType - */ - @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java deleted file mode 100644 index 41e6497ecee..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ /dev/null @@ -1,51 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesArray - */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - - /** - * Model tests for AdditionalPropertiesArray - */ - @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java deleted file mode 100644 index d2e17831ba7..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesBoolean - */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - - /** - * Model tests for AdditionalPropertiesBoolean - */ - @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 14fd8022feb..29bc5ae9694 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -18,15 +18,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for AdditionalPropertiesClass */ @@ -42,91 +39,19 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapString' + * Test the property 'mapProperty' */ @Test - public void mapStringTest() { - // TODO: test mapString + public void mapPropertyTest() { + // TODO: test mapProperty } /** - * Test the property 'mapNumber' + * Test the property 'mapOfMapProperty' */ @Test - public void mapNumberTest() { - // TODO: test mapNumber - } - - /** - * Test the property 'mapInteger' - */ - @Test - public void mapIntegerTest() { - // TODO: test mapInteger - } - - /** - * Test the property 'mapBoolean' - */ - @Test - public void mapBooleanTest() { - // TODO: test mapBoolean - } - - /** - * Test the property 'mapArrayInteger' - */ - @Test - public void mapArrayIntegerTest() { - // TODO: test mapArrayInteger - } - - /** - * Test the property 'mapArrayAnytype' - */ - @Test - public void mapArrayAnytypeTest() { - // TODO: test mapArrayAnytype - } - - /** - * Test the property 'mapMapString' - */ - @Test - public void mapMapStringTest() { - // TODO: test mapMapString - } - - /** - * Test the property 'mapMapAnytype' - */ - @Test - public void mapMapAnytypeTest() { - // TODO: test mapMapAnytype - } - - /** - * Test the property 'anytype1' - */ - @Test - public void anytype1Test() { - // TODO: test anytype1 - } - - /** - * Test the property 'anytype2' - */ - @Test - public void anytype2Test() { - // TODO: test anytype2 - } - - /** - * Test the property 'anytype3' - */ - @Test - public void anytype3Test() { - // TODO: test anytype3 + public void mapOfMapPropertyTest() { + // TODO: test mapOfMapProperty } } diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java deleted file mode 100644 index 58b7521c6a7..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesInteger - */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - - /** - * Model tests for AdditionalPropertiesInteger - */ - @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java deleted file mode 100644 index bcbb9c54b27..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesObject - */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); - - /** - * Model tests for AdditionalPropertiesObject - */ - @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java deleted file mode 100644 index f7662d6c469..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ /dev/null @@ -1,50 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesString - */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); - - /** - * Model tests for AdditionalPropertiesString - */ - @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java new file mode 100644 index 00000000000..dad0e9235de --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -0,0 +1,56 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for AllOfWithSingleRef + */ +public class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); + + /** + * Model tests for AllOfWithSingleRef + */ + @Test + public void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + public void singleRefTypeTest() { + // TODO: test singleRefType + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AnimalTest.java index 930e5c17d07..da5609b5489 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,14 +21,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.Cat; -import org.openapitools.client.model.Dog; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Animal */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index 57a1c4f37ec..cbc199f1575 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 4f127b838bc..762f9d6dc33 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -20,12 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayOfNumberOnly */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 5874400602c..20dc34a8c51 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ReadOnlyFirst; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ArrayTest */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 765bd150512..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,75 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CapitalizationTest.java index c69ffc12a07..4fd3728ab89 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Capitalization */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CatTest.java index 90fdba14c24..d591bdd30ef 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CatTest.java @@ -22,12 +22,10 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Cat */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CategoryTest.java index 393f73bd5e6..12de38c0c08 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Category */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ClassModelTest.java index 5005bcb800e..d1936d85e81 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ClassModel */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ClientTest.java index bda3b360b74..7aa0f5859ff 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ClientTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Client */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java similarity index 71% rename from samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java rename to samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index bcbb9c54b27..65fd3cc0b76 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -18,25 +18,22 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesObject + * Model tests for DeprecatedObject */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); +public class DeprecatedObjectTest { + private final DeprecatedObject model = new DeprecatedObject(); /** - * Model tests for AdditionalPropertiesObject + * Model tests for DeprecatedObject */ @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject + public void testDeprecatedObject() { + // TODO: test DeprecatedObject } /** diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DogTest.java index de77d6711bd..744c8a406fe 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DogTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Dog */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 73206626b9c..694e4196138 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -19,12 +19,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumArrays */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumClassTest.java index 9e45543facd..3f50e1bfb9e 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumClass */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumTestTest.java index 8907cfa8e8f..0a1fd0f4268 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -19,11 +19,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for EnumTest */ @@ -78,4 +84,28 @@ public class EnumTestTest { // TODO: test outerEnum } + /** + * Test the property 'outerEnumInteger' + */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } + + /** + * Test the property 'outerEnumDefaultValue' + */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + + /** + * Test the property 'outerEnumIntegerDefaultValue' + */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } + } diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java similarity index 62% rename from samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java rename to samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java index 10ad938f52c..88c1d374be6 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java @@ -25,27 +25,34 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesNumber + * Model tests for FakeBigDecimalMap200Response */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); +public class FakeBigDecimalMap200ResponseTest { + private final FakeBigDecimalMap200Response model = new FakeBigDecimalMap200Response(); /** - * Model tests for AdditionalPropertiesNumber + * Model tests for FakeBigDecimalMap200Response */ @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber + public void testFakeBigDecimalMap200Response() { + // TODO: test FakeBigDecimalMap200Response } /** - * Test the property 'name' + * Test the property 'someId' */ @Test - public void nameTest() { - // TODO: test name + public void someIdTest() { + // TODO: test someId + } + + /** + * Test the property 'someMap' + */ + @Test + public void someMapTest() { + // TODO: test someMap } } diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index 493d84aa1bc..fb8827a1e88 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.openapitools.client.model.ModelFile; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FileSchemaTestClass */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java new file mode 100644 index 00000000000..cd15af86ee9 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for FooGetDefaultResponse + */ +public class FooGetDefaultResponseTest { + private final FooGetDefaultResponse model = new FooGetDefaultResponse(); + + /** + * Model tests for FooGetDefaultResponse + */ + @Test + public void testFooGetDefaultResponse() { + // TODO: test FooGetDefaultResponse + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FooTest.java new file mode 100644 index 00000000000..2a92367019b --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FooTest.java @@ -0,0 +1,47 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for Foo + */ +public class FooTest { + private final Foo model = new Foo(); + + /** + * Model tests for Foo + */ + @Test + public void testFoo() { + // TODO: test Foo + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FormatTestTest.java index 6cb5d4fa066..137d96ba0f4 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for FormatTest */ @@ -90,6 +89,14 @@ public class FormatTestTest { // TODO: test _double } + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + /** * Test the property 'string' */ @@ -147,11 +154,19 @@ public class FormatTestTest { } /** - * Test the property 'bigDecimal' + * Test the property 'patternWithDigits' */ @Test - public void bigDecimalTest() { - // TODO: test bigDecimal + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** + * Test the property 'patternWithDigitsAndDelimiter' + */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter } } diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index da9073d4500..bf777b061cc 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for HasOnlyReadOnly */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 00000000000..e96ffaa18f4 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,51 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for HealthCheckResult + */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** + * Model tests for HealthCheckResult + */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** + * Test the property 'nullableMessage' + */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/MapTestTest.java index 22c8519472b..50e909f0381 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MapTest */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index f29932e96be..b16858dc17e 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -27,7 +27,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 0cd3f976198..dd90f6799d3 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Model200Response */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index be8cca35e3e..e63f2ae5e9c 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelApiResponse */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelFileTest.java index a0247ae71be..264249edc1c 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelFileTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelFile */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelListTest.java index 0ead99db3a5..81fd2dcc6a6 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelListTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelListTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelList */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b6ca02f8d23..5840d4f8f0c 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ModelReturn */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NameTest.java index 07684c9eb40..9280c171539 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Name */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 00000000000..c79c6366f83 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for NullableClass + */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** + * Model tests for NullableClass + */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** + * Test the property 'integerProp' + */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** + * Test the property 'numberProp' + */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** + * Test the property 'booleanProp' + */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** + * Test the property 'stringProp' + */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** + * Test the property 'dateProp' + */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** + * Test the property 'datetimeProp' + */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** + * Test the property 'arrayNullableProp' + */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** + * Test the property 'arrayAndItemsNullableProp' + */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** + * Test the property 'arrayItemsNullable' + */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** + * Test the property 'objectNullableProp' + */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** + * Test the property 'objectAndItemsNullableProp' + */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** + * Test the property 'objectItemsNullable' + */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 878095093ad..63b5bc0440e 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for NumberOnly */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java similarity index 55% rename from samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java rename to samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index 8c096c188fc..4203b62f784 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -20,64 +20,57 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.openapitools.client.model.DeprecatedObject; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); +public class ObjectWithDeprecatedFieldsTest { + private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault + public void testObjectWithDeprecatedFields() { + // TODO: test ObjectWithDeprecatedFields } /** - * Test the property 'stringItem' + * Test the property 'uuid' */ @Test - public void stringItemTest() { - // TODO: test stringItem + public void uuidTest() { + // TODO: test uuid } /** - * Test the property 'numberItem' + * Test the property 'id' */ @Test - public void numberItemTest() { - // TODO: test numberItem + public void idTest() { + // TODO: test id } /** - * Test the property 'integerItem' + * Test the property 'deprecatedRef' */ @Test - public void integerItemTest() { - // TODO: test integerItem + public void deprecatedRefTest() { + // TODO: test deprecatedRef } /** - * Test the property 'boolItem' + * Test the property 'bars' */ @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem + public void barsTest() { + // TODO: test bars } } diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OrderTest.java index f31e10a9df1..e0fbb529af6 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OrderTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Order */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 8b823572e5e..840cf65c8d0 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -23,7 +23,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterComposite */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 00000000000..5b9bae28ec6 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumDefaultValue + */ +public class OuterEnumDefaultValueTest { + /** + * Model tests for OuterEnumDefaultValue + */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 00000000000..731acbf905f --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumIntegerDefaultValue + */ +public class OuterEnumIntegerDefaultValueTest { + /** + * Model tests for OuterEnumIntegerDefaultValue + */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 00000000000..234945cec0f --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for OuterEnumInteger + */ +public class OuterEnumIntegerTest { + /** + * Model tests for OuterEnumInteger + */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumTest.java index cf0ebae0faf..b312b11a09e 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -17,7 +17,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for OuterEnum */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java similarity index 64% rename from samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java rename to samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java index d2e17831ba7..964d1281b21 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java @@ -18,33 +18,31 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; +import org.openapitools.client.model.OuterEnumInteger; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** - * Model tests for AdditionalPropertiesBoolean + * Model tests for OuterObjectWithEnumProperty */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); +public class OuterObjectWithEnumPropertyTest { + private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty(); /** - * Model tests for AdditionalPropertiesBoolean + * Model tests for OuterObjectWithEnumProperty */ @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean + public void testOuterObjectWithEnumProperty() { + // TODO: test OuterObjectWithEnumProperty } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/PetTest.java index b48657d0c9a..ca23198fbf1 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/PetTest.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -29,7 +30,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Pet */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index 26356ec2048..b356d6993c5 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for ReadOnlyFirst */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 00000000000..920d02c930c --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,32 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for SingleRefType + */ +public class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + public void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 4e59989875a..8eb0b1bd269 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for SpecialModelName */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TagTest.java index 5aeb2f3f948..6dc0868167c 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TagTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for Tag */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index b1655df6165..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'floatItem' - */ - @Test - public void floatItemTest() { - // TODO: test floatItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/UserTest.java index e0153a4cf1b..b029d279409 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/UserTest.java @@ -22,7 +22,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for User */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 4bab95a9126..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,275 +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: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNsString' - */ - @Test - public void prefixNsStringTest() { - // TODO: test prefixNsString - } - - /** - * Test the property 'prefixNsNumber' - */ - @Test - public void prefixNsNumberTest() { - // TODO: test prefixNsNumber - } - - /** - * Test the property 'prefixNsInteger' - */ - @Test - public void prefixNsIntegerTest() { - // TODO: test prefixNsInteger - } - - /** - * Test the property 'prefixNsBoolean' - */ - @Test - public void prefixNsBooleanTest() { - // TODO: test prefixNsBoolean - } - - /** - * Test the property 'prefixNsArray' - */ - @Test - public void prefixNsArrayTest() { - // TODO: test prefixNsArray - } - - /** - * Test the property 'prefixNsWrappedArray' - */ - @Test - public void prefixNsWrappedArrayTest() { - // TODO: test prefixNsWrappedArray - } - -}