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