(this, dtf);
+ }
+
+ @Override
+ public T deserialize(JsonParser parser, DeserializationContext context) throws IOException {
+ //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only
+ //string values have to be adjusted to the configured TZ.
+ switch (parser.getCurrentTokenId()) {
+ case JsonTokenId.ID_NUMBER_FLOAT: {
+ BigDecimal value = parser.getDecimalValue();
+ long seconds = value.longValue();
+ int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds);
+ return fromNanoseconds.apply(new FromDecimalArguments(
+ seconds, nanoseconds, getZone(context)));
+ }
+
+ case JsonTokenId.ID_NUMBER_INT: {
+ long timestamp = parser.getLongValue();
+ if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) {
+ return this.fromNanoseconds.apply(new FromDecimalArguments(
+ timestamp, 0, this.getZone(context)
+ ));
+ }
+ return this.fromMilliseconds.apply(new FromIntegerArguments(
+ timestamp, this.getZone(context)
+ ));
+ }
+
+ case JsonTokenId.ID_STRING: {
+ String string = parser.getText().trim();
+ if (string.length() == 0) {
+ return null;
+ }
+ if (string.endsWith("+0000")) {
+ string = string.substring(0, string.length() - 5) + "Z";
+ }
+ T value;
+ try {
+ TemporalAccessor acc = _formatter.parse(string);
+ value = parsedToValue.apply(acc);
+ if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) {
+ return adjust.apply(value, this.getZone(context));
+ }
+ } catch (DateTimeException e) {
+ throw _peelDTE(e);
+ }
+ return value;
+ }
+ }
+ throw context.mappingException("Expected type float, integer, or string.");
+ }
+
+ private ZoneId getZone(DeserializationContext context) {
+ // Instants are always in UTC, so don't waste compute cycles
+ return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone());
+ }
+
+ private static class FromIntegerArguments {
+ public final long value;
+ public final ZoneId zoneId;
+
+ private FromIntegerArguments(long value, ZoneId zoneId) {
+ this.value = value;
+ this.zoneId = zoneId;
+ }
+ }
+
+ private static class FromDecimalArguments {
+ public final long integer;
+ public final int fraction;
+ public final ZoneId zoneId;
+
+ private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) {
+ this.integer = integer;
+ this.fraction = fraction;
+ this.zoneId = zoneId;
+ }
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/EncodingUtils.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/EncodingUtils.java
new file mode 100644
index 00000000000..c5a76a97857
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/EncodingUtils.java
@@ -0,0 +1,86 @@
+package org.openapitools.client;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+* Utilities to support Swagger encoding formats in Feign.
+*/
+public final class EncodingUtils {
+
+ /**
+ * Private constructor. Do not construct this class.
+ */
+ private EncodingUtils() {}
+
+ /**
+ * Encodes a collection of query parameters according to the Swagger
+ * collection format.
+ *
+ * Of the various collection formats defined by Swagger ("csv", "tsv",
+ * etc), Feign only natively supports "multi". This utility generates the
+ * other format types so it will be properly processed by Feign.
+ *
+ * Note, as part of reformatting, it URL encodes the parameters as
+ * well.
+ * @param parameters The collection object to be formatted. This object will
+ * not be changed.
+ * @param collectionFormat The Swagger collection format (eg, "csv", "tsv",
+ * "pipes"). See the
+ *
+ * OpenAPI Spec for more details.
+ * @return An object that will be correctly formatted by Feign.
+ */
+ public static Object encodeCollection(Collection> parameters,
+ String collectionFormat) {
+ if (parameters == null) {
+ return parameters;
+ }
+ List stringValues = new ArrayList<>(parameters.size());
+ for (Object parameter : parameters) {
+ // ignore null values (same behavior as Feign)
+ if (parameter != null) {
+ stringValues.add(encode(parameter));
+ }
+ }
+ // Feign natively handles single-element lists and the "multi" format.
+ if (stringValues.size() < 2 || "multi".equals(collectionFormat)) {
+ return stringValues;
+ }
+ // Otherwise return a formatted String
+ String[] stringArray = stringValues.toArray(new String[0]);
+ switch (collectionFormat) {
+ case "csv":
+ default:
+ return StringUtil.join(stringArray, ",");
+ case "ssv":
+ return StringUtil.join(stringArray, " ");
+ case "tsv":
+ return StringUtil.join(stringArray, "\t");
+ case "pipes":
+ return StringUtil.join(stringArray, "|");
+ }
+ }
+
+ /**
+ * URL encode a single query parameter.
+ * @param parameter The query parameter to encode. This object will not be
+ * changed.
+ * @return The URL encoded string representation of the parameter. If the
+ * parameter is null, returns null.
+ */
+ public static String encode(Object parameter) {
+ if (parameter == null) {
+ return null;
+ }
+ try {
+ return URLEncoder.encode(parameter.toString(), "UTF-8").replaceAll("\\+", "%20");
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen, UTF-8 is always supported
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ParamExpander.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ParamExpander.java
new file mode 100644
index 00000000000..2331d87fdbd
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ParamExpander.java
@@ -0,0 +1,22 @@
+package org.openapitools.client;
+
+import feign.Param;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+/**
+ * Param Expander to convert {@link Date} to RFC3339
+ */
+public class ParamExpander implements Param.Expander {
+
+ private static final DateFormat dateformat = new RFC3339DateFormat();
+
+ @Override
+ public String expand(Object value) {
+ if (value instanceof Date) {
+ return dateformat.format(value);
+ }
+ return value.toString();
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/RFC3339DateFormat.java
new file mode 100644
index 00000000000..07d7e782b0d
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/RFC3339DateFormat.java
@@ -0,0 +1,55 @@
+/*
+ * 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;
+
+import com.fasterxml.jackson.databind.util.StdDateFormat;
+
+import java.text.DateFormat;
+import java.text.FieldPosition;
+import java.text.ParsePosition;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+public class RFC3339DateFormat extends DateFormat {
+ private static final long serialVersionUID = 1L;
+ private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC");
+
+ private final StdDateFormat fmt = new StdDateFormat()
+ .withTimeZone(TIMEZONE_Z)
+ .withColonInTimeZone(true);
+
+ public RFC3339DateFormat() {
+ this.calendar = new GregorianCalendar();
+ }
+
+ @Override
+ public Date parse(String source) {
+ return parse(source, new ParsePosition(0));
+ }
+
+ @Override
+ public Date parse(String source, ParsePosition pos) {
+ return fmt.parse(source, pos);
+ }
+
+ @Override
+ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
+ return fmt.format(date, toAppendTo, fieldPosition);
+ }
+
+ @Override
+ public Object clone() {
+ return this;
+ }
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ServerConfiguration.java
new file mode 100644
index 00000000000..a1107a8690e
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ServerConfiguration.java
@@ -0,0 +1,58 @@
+package org.openapitools.client;
+
+import java.util.Map;
+
+/**
+ * Representing a Server configuration.
+ */
+public class ServerConfiguration {
+ public String URL;
+ public String description;
+ public Map variables;
+
+ /**
+ * @param URL A URL to the target host.
+ * @param description A describtion of the host designated by the URL.
+ * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
+ */
+ public ServerConfiguration(String URL, String description, Map variables) {
+ this.URL = URL;
+ this.description = description;
+ this.variables = variables;
+ }
+
+ /**
+ * Format URL template using given variables.
+ *
+ * @param variables A map between a variable name and its value.
+ * @return Formatted URL.
+ */
+ public String URL(Map variables) {
+ String url = this.URL;
+
+ // go through variables and replace placeholders
+ for (Map.Entry variable: this.variables.entrySet()) {
+ String name = variable.getKey();
+ ServerVariable serverVariable = variable.getValue();
+ String value = serverVariable.defaultValue;
+
+ if (variables != null && variables.containsKey(name)) {
+ value = variables.get(name);
+ if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
+ throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
+ }
+ }
+ url = url.replaceAll("\\{" + name + "\\}", value);
+ }
+ return url;
+ }
+
+ /**
+ * Format URL template using default server variables.
+ *
+ * @return Formatted URL.
+ */
+ public String URL() {
+ return URL(null);
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ServerVariable.java
new file mode 100644
index 00000000000..c2f13e21666
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/ServerVariable.java
@@ -0,0 +1,23 @@
+package org.openapitools.client;
+
+import java.util.HashSet;
+
+/**
+ * Representing a Server Variable for server URL template substitution.
+ */
+public class ServerVariable {
+ public String description;
+ public String defaultValue;
+ public HashSet enumValues = null;
+
+ /**
+ * @param description A description for the server variable.
+ * @param defaultValue The default value to use for substitution.
+ * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
+ */
+ public ServerVariable(String description, String defaultValue, HashSet enumValues) {
+ this.description = description;
+ this.defaultValue = defaultValue;
+ this.enumValues = enumValues;
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/StringUtil.java
new file mode 100644
index 00000000000..4dc60597910
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/StringUtil.java
@@ -0,0 +1,83 @@
+/*
+ * 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;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class StringUtil {
+ /**
+ * Check if the given array contains the given value (with case-insensitive comparison).
+ *
+ * @param array The array
+ * @param value The value to search
+ * @return true if the array contains the value
+ */
+ public static boolean containsIgnoreCase(String[] array, String value) {
+ for (String str : array) {
+ if (value == null && str == null) {
+ return true;
+ }
+ if (value != null && value.equalsIgnoreCase(str)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Join an array of strings with the given separator.
+ *
+ * Note: This might be replaced by utility method from commons-lang or guava someday
+ * if one of those libraries is added as dependency.
+ *
+ *
+ * @param array The array of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(String[] array, String separator) {
+ int len = array.length;
+ if (len == 0) {
+ return "";
+ }
+
+ StringBuilder out = new StringBuilder();
+ out.append(array[0]);
+ for (int i = 1; i < len; i++) {
+ out.append(separator).append(array[i]);
+ }
+ return out.toString();
+ }
+
+ /**
+ * Join a list of strings with the given separator.
+ *
+ * @param list The list of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(Collection list, String separator) {
+ Iterator iterator = list.iterator();
+ StringBuilder out = new StringBuilder();
+ if (iterator.hasNext()) {
+ out.append(iterator.next());
+ }
+ while (iterator.hasNext()) {
+ out.append(separator).append(iterator.next());
+ }
+ return out.toString();
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
new file mode 100644
index 00000000000..a7d60c2b64f
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
@@ -0,0 +1,30 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.EncodingUtils;
+
+import org.openapitools.client.model.Client;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import feign.*;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public interface AnotherFakeApi extends ApiClient.Api {
+
+
+ /**
+ * To test special tags
+ * To test special tags and operation ID starting with number
+ * @param client client model (required)
+ * @return Client
+ */
+ @RequestLine("PATCH /another-fake/dummy")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ Client call123testSpecialTags(Client client);
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/DefaultApi.java
new file mode 100644
index 00000000000..cd9b94c2e12
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/DefaultApi.java
@@ -0,0 +1,28 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.EncodingUtils;
+
+import org.openapitools.client.model.InlineResponseDefault;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import feign.*;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public interface DefaultApi extends ApiClient.Api {
+
+
+ /**
+ *
+ *
+ * @return InlineResponseDefault
+ */
+ @RequestLine("GET /foo")
+ @Headers({
+ "Accept: application/json",
+ })
+ InlineResponseDefault fooGet();
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/FakeApi.java
new file mode 100644
index 00000000000..c70e1a6b159
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/FakeApi.java
@@ -0,0 +1,498 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.EncodingUtils;
+
+import java.math.BigDecimal;
+import org.openapitools.client.model.Client;
+import java.io.File;
+import org.openapitools.client.model.FileSchemaTestClass;
+import org.openapitools.client.model.HealthCheckResult;
+import org.threeten.bp.LocalDate;
+import org.threeten.bp.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 java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import feign.*;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public interface FakeApi extends ApiClient.Api {
+
+
+ /**
+ * Health check endpoint
+ *
+ * @return HealthCheckResult
+ */
+ @RequestLine("GET /fake/health")
+ @Headers({
+ "Accept: application/json",
+ })
+ HealthCheckResult fakeHealthGet();
+
+ /**
+ * 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)
+ */
+ @RequestLine("GET /fake/http-signature-test?query_1={query1}")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ "header_1: {header1}"
+ })
+ void fakeHttpSignatureTest(Pet pet, @Param("query1") String query1, @Param("header1") String header1);
+
+ /**
+ * test http signature authentication
+ *
+ * Note, this is equivalent to the other fakeHttpSignatureTest
method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link FakeHttpSignatureTestQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param pet Pet object that needs to be added to the store (required)
+ * @param header1 header parameter (optional)
+ * @param queryParams Map of query parameters as name-value pairs
+ * The following elements may be specified in the query map:
+ *
+ * - query1 - query parameter (optional)
+ *
+ */
+ @RequestLine("GET /fake/http-signature-test?query_1={query1}")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ "header_1: {header1}"
+ })
+ void fakeHttpSignatureTest(Pet pet, @Param("header1") String header1, @QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * fakeHttpSignatureTest
method in a fluent style.
+ */
+ public static class FakeHttpSignatureTestQueryParams extends HashMap {
+ public FakeHttpSignatureTestQueryParams query1(final String value) {
+ put("query_1", EncodingUtils.encode(value));
+ return this;
+ }
+ }
+
+ /**
+ *
+ * Test serialization of outer boolean types
+ * @param body Input boolean as post body (optional)
+ * @return Boolean
+ */
+ @RequestLine("POST /fake/outer/boolean")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: */*",
+ })
+ Boolean fakeOuterBooleanSerialize(Boolean body);
+
+ /**
+ *
+ * Test serialization of object with outer number type
+ * @param outerComposite Input composite as post body (optional)
+ * @return OuterComposite
+ */
+ @RequestLine("POST /fake/outer/composite")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: */*",
+ })
+ OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite);
+
+ /**
+ *
+ * Test serialization of outer number types
+ * @param body Input number as post body (optional)
+ * @return BigDecimal
+ */
+ @RequestLine("POST /fake/outer/number")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: */*",
+ })
+ BigDecimal fakeOuterNumberSerialize(BigDecimal body);
+
+ /**
+ *
+ * Test serialization of outer string types
+ * @param body Input string as post body (optional)
+ * @return String
+ */
+ @RequestLine("POST /fake/outer/string")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: */*",
+ })
+ String fakeOuterStringSerialize(String body);
+
+ /**
+ *
+ * Test serialization of enum (int) properties with examples
+ * @param outerObjectWithEnumProperty Input enum (int) as post body (required)
+ * @return OuterObjectWithEnumProperty
+ */
+ @RequestLine("POST /fake/property/enum-int")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: */*",
+ })
+ OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty);
+
+ /**
+ *
+ * For this test, the body has to be a binary file.
+ * @param body image to upload (required)
+ */
+ @RequestLine("PUT /fake/body-with-binary")
+ @Headers({
+ "Content-Type: image/png",
+ "Accept: application/json",
+ })
+ void testBodyWithBinary(File body);
+
+ /**
+ *
+ * For this test, the body for this request must reference a schema named `File`.
+ * @param fileSchemaTestClass (required)
+ */
+ @RequestLine("PUT /fake/body-with-file-schema")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass);
+
+ /**
+ *
+ *
+ * @param query (required)
+ * @param user (required)
+ */
+ @RequestLine("PUT /fake/body-with-query-params?query={query}")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void testBodyWithQueryParams(@Param("query") String query, User user);
+
+ /**
+ *
+ *
+ * Note, this is equivalent to the other testBodyWithQueryParams
method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link TestBodyWithQueryParamsQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param user (required)
+ * @param queryParams Map of query parameters as name-value pairs
+ * The following elements may be specified in the query map:
+ *
+ * - query - (required)
+ *
+ */
+ @RequestLine("PUT /fake/body-with-query-params?query={query}")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void testBodyWithQueryParams(User user, @QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * testBodyWithQueryParams
method in a fluent style.
+ */
+ public static class TestBodyWithQueryParamsQueryParams extends HashMap {
+ public TestBodyWithQueryParamsQueryParams query(final String value) {
+ put("query", EncodingUtils.encode(value));
+ return this;
+ }
+ }
+
+ /**
+ * To test \"client\" model
+ * To test \"client\" model
+ * @param client client model (required)
+ * @return Client
+ */
+ @RequestLine("PATCH /fake")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ Client testClientModel(Client client);
+
+ /**
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ */
+ @RequestLine("POST /fake")
+ @Headers({
+ "Content-Type: application/x-www-form-urlencoded",
+ "Accept: application/json",
+ })
+ void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
+
+ /**
+ * To test enum parameters
+ * To test enum parameters
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional)
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ */
+ @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
+ @Headers({
+ "Content-Type: application/x-www-form-urlencoded",
+ "Accept: application/json",
+ "enum_header_string_array: {enumHeaderStringArray}",
+
+ "enum_header_string: {enumHeaderString}"
+ })
+ void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString);
+
+ /**
+ * To test enum parameters
+ * To test enum parameters
+ * Note, this is equivalent to the other testEnumParameters
method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link TestEnumParametersQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @param queryParams Map of query parameters as name-value pairs
+ * The following elements may be specified in the query map:
+ *
+ * - enumQueryStringArray - Query parameter enum test (string array) (optional)
+ * - enumQueryString - Query parameter enum test (string) (optional, default to -efg)
+ * - enumQueryInteger - Query parameter enum test (double) (optional)
+ * - enumQueryDouble - Query parameter enum test (double) (optional)
+ *
+ */
+ @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
+ @Headers({
+ "Content-Type: application/x-www-form-urlencoded",
+ "Accept: application/json",
+ "enum_header_string_array: {enumHeaderStringArray}",
+
+ "enum_header_string: {enumHeaderString}"
+ })
+ void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * testEnumParameters
method in a fluent style.
+ */
+ public static class TestEnumParametersQueryParams extends HashMap {
+ public TestEnumParametersQueryParams enumQueryStringArray(final List value) {
+ put("enum_query_string_array", EncodingUtils.encodeCollection(value, "multi"));
+ return this;
+ }
+ public TestEnumParametersQueryParams enumQueryString(final String value) {
+ put("enum_query_string", EncodingUtils.encode(value));
+ return this;
+ }
+ public TestEnumParametersQueryParams enumQueryInteger(final Integer value) {
+ put("enum_query_integer", EncodingUtils.encode(value));
+ return this;
+ }
+ public TestEnumParametersQueryParams enumQueryDouble(final Double value) {
+ put("enum_query_double", EncodingUtils.encode(value));
+ return this;
+ }
+ }
+
+ /**
+ * Fake endpoint to test group parameters (optional)
+ * Fake endpoint to test group parameters (optional)
+ * @param requiredStringGroup Required String in group parameters (required)
+ * @param requiredBooleanGroup Required Boolean in group parameters (required)
+ * @param requiredInt64Group Required Integer in group parameters (required)
+ * @param stringGroup String in group parameters (optional)
+ * @param booleanGroup Boolean in group parameters (optional)
+ * @param int64Group Integer in group parameters (optional)
+ */
+ @RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
+ @Headers({
+ "Accept: application/json",
+ "required_boolean_group: {requiredBooleanGroup}",
+
+ "boolean_group: {booleanGroup}"
+ })
+ void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
+
+ /**
+ * Fake endpoint to test group parameters (optional)
+ * Fake endpoint to test group parameters (optional)
+ * Note, this is equivalent to the other testGroupParameters
method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link TestGroupParametersQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param requiredBooleanGroup Required Boolean in group parameters (required)
+ * @param booleanGroup Boolean in group parameters (optional)
+ * @param queryParams Map of query parameters as name-value pairs
+ * The following elements may be specified in the query map:
+ *
+ * - requiredStringGroup - Required String in group parameters (required)
+ * - requiredInt64Group - Required Integer in group parameters (required)
+ * - stringGroup - String in group parameters (optional)
+ * - int64Group - Integer in group parameters (optional)
+ *
+ */
+ @RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
+ @Headers({
+ "Accept: application/json",
+ "required_boolean_group: {requiredBooleanGroup}",
+
+ "boolean_group: {booleanGroup}"
+ })
+ void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * testGroupParameters
method in a fluent style.
+ */
+ public static class TestGroupParametersQueryParams extends HashMap {
+ public TestGroupParametersQueryParams requiredStringGroup(final Integer value) {
+ put("required_string_group", EncodingUtils.encode(value));
+ return this;
+ }
+ public TestGroupParametersQueryParams requiredInt64Group(final Long value) {
+ put("required_int64_group", EncodingUtils.encode(value));
+ return this;
+ }
+ public TestGroupParametersQueryParams stringGroup(final Integer value) {
+ put("string_group", EncodingUtils.encode(value));
+ return this;
+ }
+ public TestGroupParametersQueryParams int64Group(final Long value) {
+ put("int64_group", EncodingUtils.encode(value));
+ return this;
+ }
+ }
+
+ /**
+ * test inline additionalProperties
+ *
+ * @param requestBody request body (required)
+ */
+ @RequestLine("POST /fake/inline-additionalProperties")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void testInlineAdditionalProperties(Map requestBody);
+
+ /**
+ * test json serialization of form data
+ *
+ * @param param field1 (required)
+ * @param param2 field2 (required)
+ */
+ @RequestLine("GET /fake/jsonFormData")
+ @Headers({
+ "Content-Type: application/x-www-form-urlencoded",
+ "Accept: application/json",
+ })
+ void testJsonFormData(@Param("param") String param, @Param("param2") String param2);
+
+ /**
+ *
+ * To test the collection format in query parameters
+ * @param pipe (required)
+ * @param ioutil (required)
+ * @param http (required)
+ * @param url (required)
+ * @param context (required)
+ */
+ @RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
+ @Headers({
+ "Accept: application/json",
+ })
+ void testQueryParameterCollectionFormat(@Param("pipe") List pipe, @Param("ioutil") List ioutil, @Param("http") List http, @Param("url") List url, @Param("context") List context);
+
+ /**
+ *
+ * To test the collection format in query parameters
+ * Note, this is equivalent to the other testQueryParameterCollectionFormat
method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link TestQueryParameterCollectionFormatQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param queryParams Map of query parameters as name-value pairs
+ * The following elements may be specified in the query map:
+ *
+ * - pipe - (required)
+ * - ioutil - (required)
+ * - http - (required)
+ * - url - (required)
+ * - context - (required)
+ *
+ */
+ @RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
+ @Headers({
+ "Accept: application/json",
+ })
+ void testQueryParameterCollectionFormat(@QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * testQueryParameterCollectionFormat
method in a fluent style.
+ */
+ public static class TestQueryParameterCollectionFormatQueryParams extends HashMap {
+ public TestQueryParameterCollectionFormatQueryParams pipe(final List value) {
+ put("pipe", EncodingUtils.encodeCollection(value, "pipes"));
+ return this;
+ }
+ public TestQueryParameterCollectionFormatQueryParams ioutil(final List value) {
+ put("ioutil", EncodingUtils.encodeCollection(value, "csv"));
+ return this;
+ }
+ public TestQueryParameterCollectionFormatQueryParams http(final List value) {
+ put("http", EncodingUtils.encodeCollection(value, "ssv"));
+ return this;
+ }
+ public TestQueryParameterCollectionFormatQueryParams url(final List value) {
+ put("url", EncodingUtils.encodeCollection(value, "csv"));
+ return this;
+ }
+ public TestQueryParameterCollectionFormatQueryParams context(final List value) {
+ put("context", EncodingUtils.encodeCollection(value, "multi"));
+ return this;
+ }
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
new file mode 100644
index 00000000000..17c6bfa6695
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
@@ -0,0 +1,30 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.EncodingUtils;
+
+import org.openapitools.client.model.Client;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import feign.*;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public interface FakeClassnameTags123Api extends ApiClient.Api {
+
+
+ /**
+ * To test class name in snake case
+ * To test class name in snake case
+ * @param client client model (required)
+ * @return Client
+ */
+ @RequestLine("PATCH /fake_classname_test")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ Client testClassname(Client client);
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/PetApi.java
new file mode 100644
index 00000000000..10cb8950f63
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/PetApi.java
@@ -0,0 +1,205 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.EncodingUtils;
+
+import java.io.File;
+import org.openapitools.client.model.ModelApiResponse;
+import org.openapitools.client.model.Pet;
+import java.util.Set;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import feign.*;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public interface PetApi extends ApiClient.Api {
+
+
+ /**
+ * Add a new pet to the store
+ *
+ * @param pet Pet object that needs to be added to the store (required)
+ */
+ @RequestLine("POST /pet")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void addPet(Pet pet);
+
+ /**
+ * Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ */
+ @RequestLine("DELETE /pet/{petId}")
+ @Headers({
+ "Accept: application/json",
+ "api_key: {apiKey}"
+ })
+ void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey);
+
+ /**
+ * Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ * @param status Status values that need to be considered for filter (required)
+ * @return List<Pet>
+ */
+ @RequestLine("GET /pet/findByStatus?status={status}")
+ @Headers({
+ "Accept: application/json",
+ })
+ List findPetsByStatus(@Param("status") List status);
+
+ /**
+ * Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ * Note, this is equivalent to the other findPetsByStatus
method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link FindPetsByStatusQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param queryParams Map of query parameters as name-value pairs
+ * The following elements may be specified in the query map:
+ *
+ * - status - Status values that need to be considered for filter (required)
+ *
+ * @return List<Pet>
+ */
+ @RequestLine("GET /pet/findByStatus?status={status}")
+ @Headers({
+ "Accept: application/json",
+ })
+ List findPetsByStatus(@QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * findPetsByStatus
method in a fluent style.
+ */
+ public static class FindPetsByStatusQueryParams extends HashMap {
+ public FindPetsByStatusQueryParams status(final List value) {
+ put("status", EncodingUtils.encodeCollection(value, "csv"));
+ return this;
+ }
+ }
+
+ /**
+ * Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * @param tags Tags to filter by (required)
+ * @return Set<Pet>
+ * @deprecated
+ */
+ @Deprecated
+ @RequestLine("GET /pet/findByTags?tags={tags}")
+ @Headers({
+ "Accept: application/json",
+ })
+ Set findPetsByTags(@Param("tags") Set tags);
+
+ /**
+ * Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * Note, this is equivalent to the other findPetsByTags
method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link FindPetsByTagsQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param queryParams Map of query parameters as name-value pairs
+ * The following elements may be specified in the query map:
+ *
+ * - tags - Tags to filter by (required)
+ *
+ * @return Set<Pet>
+ * @deprecated
+ */
+ @Deprecated
+ @RequestLine("GET /pet/findByTags?tags={tags}")
+ @Headers({
+ "Accept: application/json",
+ })
+ Set findPetsByTags(@QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * findPetsByTags
method in a fluent style.
+ */
+ public static class FindPetsByTagsQueryParams extends HashMap {
+ public FindPetsByTagsQueryParams tags(final Set value) {
+ put("tags", EncodingUtils.encodeCollection(value, "csv"));
+ return this;
+ }
+ }
+
+ /**
+ * Find pet by ID
+ * Returns a single pet
+ * @param petId ID of pet to return (required)
+ * @return Pet
+ */
+ @RequestLine("GET /pet/{petId}")
+ @Headers({
+ "Accept: application/json",
+ })
+ Pet getPetById(@Param("petId") Long petId);
+
+ /**
+ * Update an existing pet
+ *
+ * @param pet Pet object that needs to be added to the store (required)
+ */
+ @RequestLine("PUT /pet")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void updatePet(Pet pet);
+
+ /**
+ * Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ */
+ @RequestLine("POST /pet/{petId}")
+ @Headers({
+ "Content-Type: application/x-www-form-urlencoded",
+ "Accept: application/json",
+ })
+ void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
+
+ /**
+ * uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return ModelApiResponse
+ */
+ @RequestLine("POST /pet/{petId}/uploadImage")
+ @Headers({
+ "Content-Type: multipart/form-data",
+ "Accept: application/json",
+ })
+ ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
+
+ /**
+ * uploads an image (required)
+ *
+ * @param petId ID of pet to update (required)
+ * @param requiredFile file to upload (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @return ModelApiResponse
+ */
+ @RequestLine("POST /fake/{petId}/uploadImageWithRequiredFile")
+ @Headers({
+ "Content-Type: multipart/form-data",
+ "Accept: application/json",
+ })
+ ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/StoreApi.java
new file mode 100644
index 00000000000..21611cabe79
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/StoreApi.java
@@ -0,0 +1,64 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.EncodingUtils;
+
+import org.openapitools.client.model.Order;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import feign.*;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public interface StoreApi extends ApiClient.Api {
+
+
+ /**
+ * Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * @param orderId ID of the order that needs to be deleted (required)
+ */
+ @RequestLine("DELETE /store/order/{orderId}")
+ @Headers({
+ "Accept: application/json",
+ })
+ void deleteOrder(@Param("orderId") String orderId);
+
+ /**
+ * Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ * @return Map<String, Integer>
+ */
+ @RequestLine("GET /store/inventory")
+ @Headers({
+ "Accept: application/json",
+ })
+ Map getInventory();
+
+ /**
+ * Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * @param orderId ID of pet that needs to be fetched (required)
+ * @return Order
+ */
+ @RequestLine("GET /store/order/{orderId}")
+ @Headers({
+ "Accept: application/json",
+ })
+ Order getOrderById(@Param("orderId") Long orderId);
+
+ /**
+ * Place an order for a pet
+ *
+ * @param order order placed for purchasing the pet (required)
+ * @return Order
+ */
+ @RequestLine("POST /store/order")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ Order placeOrder(Order order);
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/UserApi.java
new file mode 100644
index 00000000000..f7f9fcb3194
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/api/UserApi.java
@@ -0,0 +1,149 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.EncodingUtils;
+
+import org.openapitools.client.model.User;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import feign.*;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public interface UserApi extends ApiClient.Api {
+
+
+ /**
+ * Create user
+ * This can only be done by the logged in user.
+ * @param user Created user object (required)
+ */
+ @RequestLine("POST /user")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void createUser(User user);
+
+ /**
+ * Creates list of users with given input array
+ *
+ * @param user List of user object (required)
+ */
+ @RequestLine("POST /user/createWithArray")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void createUsersWithArrayInput(List user);
+
+ /**
+ * Creates list of users with given input array
+ *
+ * @param user List of user object (required)
+ */
+ @RequestLine("POST /user/createWithList")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void createUsersWithListInput(List user);
+
+ /**
+ * Delete user
+ * This can only be done by the logged in user.
+ * @param username The name that needs to be deleted (required)
+ */
+ @RequestLine("DELETE /user/{username}")
+ @Headers({
+ "Accept: application/json",
+ })
+ void deleteUser(@Param("username") String username);
+
+ /**
+ * Get user by user name
+ *
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @return User
+ */
+ @RequestLine("GET /user/{username}")
+ @Headers({
+ "Accept: application/json",
+ })
+ User getUserByName(@Param("username") String username);
+
+ /**
+ * Logs user into the system
+ *
+ * @param username The user name for login (required)
+ * @param password The password for login in clear text (required)
+ * @return String
+ */
+ @RequestLine("GET /user/login?username={username}&password={password}")
+ @Headers({
+ "Accept: application/json",
+ })
+ String loginUser(@Param("username") String username, @Param("password") String password);
+
+ /**
+ * Logs user into the system
+ *
+ * Note, this is equivalent to the other loginUser
method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link LoginUserQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param queryParams Map of query parameters as name-value pairs
+ * The following elements may be specified in the query map:
+ *
+ * - username - The user name for login (required)
+ * - password - The password for login in clear text (required)
+ *
+ * @return String
+ */
+ @RequestLine("GET /user/login?username={username}&password={password}")
+ @Headers({
+ "Accept: application/json",
+ })
+ String loginUser(@QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * loginUser
method in a fluent style.
+ */
+ public static class LoginUserQueryParams extends HashMap {
+ public LoginUserQueryParams username(final String value) {
+ put("username", EncodingUtils.encode(value));
+ return this;
+ }
+ public LoginUserQueryParams password(final String value) {
+ put("password", EncodingUtils.encode(value));
+ return this;
+ }
+ }
+
+ /**
+ * Logs out current logged in user session
+ *
+ */
+ @RequestLine("GET /user/logout")
+ @Headers({
+ "Accept: application/json",
+ })
+ void logoutUser();
+
+ /**
+ * Updated user
+ * This can only be done by the logged in user.
+ * @param username name that need to be deleted (required)
+ * @param user Updated user object (required)
+ */
+ @RequestLine("PUT /user/{username}")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void updateUser(@Param("username") String username, User user);
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
new file mode 100644
index 00000000000..44511e4641c
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
@@ -0,0 +1,43 @@
+package org.openapitools.client.auth;
+
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+
+public class ApiKeyAuth implements RequestInterceptor {
+ private final String location;
+ private final String paramName;
+
+ private String apiKey;
+
+ public ApiKeyAuth(String location, String paramName) {
+ this.location = location;
+ this.paramName = paramName;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getParamName() {
+ return paramName;
+ }
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
+
+ @Override
+ public void apply(RequestTemplate template) {
+ if ("query".equals(location)) {
+ template.query(paramName, apiKey);
+ } else if ("header".equals(location)) {
+ template.header(paramName, apiKey);
+ } else if ("cookie".equals(location)) {
+ template.header("Cookie", String.format("%s=%s", paramName, apiKey));
+ }
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/DefaultApi20Impl.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/DefaultApi20Impl.java
new file mode 100644
index 00000000000..80db21111f9
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/DefaultApi20Impl.java
@@ -0,0 +1,47 @@
+package org.openapitools.client.auth;
+
+import com.github.scribejava.core.builder.api.DefaultApi20;
+import com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor;
+import com.github.scribejava.core.extractors.TokenExtractor;
+import com.github.scribejava.core.model.OAuth2AccessToken;
+import com.github.scribejava.core.oauth2.bearersignature.BearerSignature;
+import com.github.scribejava.core.oauth2.bearersignature.BearerSignatureURIQueryParameter;
+import com.github.scribejava.core.oauth2.clientauthentication.ClientAuthentication;
+import com.github.scribejava.core.oauth2.clientauthentication.RequestBodyAuthenticationScheme;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class DefaultApi20Impl extends DefaultApi20 {
+
+ private final String accessTokenEndpoint;
+ private final String authorizationBaseUrl;
+
+ protected DefaultApi20Impl(String authorizationBaseUrl, String accessTokenEndpoint) {
+ this.authorizationBaseUrl = authorizationBaseUrl;
+ this.accessTokenEndpoint = accessTokenEndpoint;
+ }
+
+ @Override
+ public String getAccessTokenEndpoint() {
+ return accessTokenEndpoint;
+ }
+
+ @Override
+ protected String getAuthorizationBaseUrl() {
+ return authorizationBaseUrl;
+ }
+
+ @Override
+ public BearerSignature getBearerSignature() {
+ return BearerSignatureURIQueryParameter.instance();
+ }
+
+ @Override
+ public ClientAuthentication getClientAuthentication() {
+ return RequestBodyAuthenticationScheme.instance();
+ }
+
+ @Override
+ public TokenExtractor getAccessTokenExtractor() {
+ return OAuth2AccessTokenJsonExtractor.instance();
+ }
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
new file mode 100644
index 00000000000..b275826472a
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
@@ -0,0 +1,41 @@
+package org.openapitools.client.auth;
+
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+import feign.auth.BasicAuthRequestInterceptor;
+
+/**
+ * An interceptor that adds the request header needed to use HTTP basic authentication.
+ */
+public class HttpBasicAuth implements RequestInterceptor {
+
+ private String username;
+ private String password;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public void setCredentials(String username, String password) {
+ this.username = username;
+ this.password = password;
+ }
+
+ @Override
+ public void apply(RequestTemplate template) {
+ RequestInterceptor requestInterceptor = new BasicAuthRequestInterceptor(username, password);
+ requestInterceptor.apply(template);
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
new file mode 100644
index 00000000000..d4c9cbe6361
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
@@ -0,0 +1,43 @@
+package org.openapitools.client.auth;
+
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+
+/**
+ * An interceptor that adds the request header needed to use HTTP bearer authentication.
+ */
+public class HttpBearerAuth implements RequestInterceptor {
+ private final String scheme;
+ private String bearerToken;
+
+ public HttpBearerAuth(String scheme) {
+ this.scheme = scheme;
+ }
+
+ /**
+ * Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ */
+ public String getBearerToken() {
+ return bearerToken;
+ }
+
+ /**
+ * Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ */
+ public void setBearerToken(String bearerToken) {
+ this.bearerToken = bearerToken;
+ }
+
+ @Override
+ public void apply(RequestTemplate template) {
+ if(bearerToken == null) {
+ return;
+ }
+
+ template.header("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
+ }
+
+ private static String upperCaseBearer(String scheme) {
+ return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OAuth.java
new file mode 100644
index 00000000000..d41eca7a0a5
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OAuth.java
@@ -0,0 +1,81 @@
+package org.openapitools.client.auth;
+
+import com.github.scribejava.core.model.OAuth2AccessToken;
+import com.github.scribejava.core.oauth.OAuth20Service;
+import feign.Request.HttpMethod;
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+import feign.RetryableException;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public abstract class OAuth implements RequestInterceptor {
+
+ static final int MILLIS_PER_SECOND = 1000;
+
+ public interface AccessTokenListener {
+ void notify(OAuth2AccessToken token);
+ }
+
+ private volatile String accessToken;
+ private Long expirationTimeMillis;
+ private AccessTokenListener accessTokenListener;
+
+ protected OAuth20Service service;
+ protected String scopes;
+ protected String authorizationUrl;
+ protected String tokenUrl;
+
+ public OAuth(String authorizationUrl, String tokenUrl, String scopes) {
+ this.scopes = scopes;
+ this.authorizationUrl = authorizationUrl;
+ this.tokenUrl = tokenUrl;
+ }
+
+ @Override
+ public void apply(RequestTemplate template) {
+ // If the request already have an authorization (eg. Basic auth), do nothing
+ if (template.headers().containsKey("Authorization")) {
+ return;
+ }
+ // If first time, get the token
+ if (expirationTimeMillis == null || System.currentTimeMillis() >= expirationTimeMillis) {
+ updateAccessToken(template);
+ }
+ if (getAccessToken() != null) {
+ template.header("Authorization", "Bearer " + getAccessToken());
+ }
+ }
+
+ private synchronized void updateAccessToken(RequestTemplate template) {
+ OAuth2AccessToken accessTokenResponse;
+ try {
+ accessTokenResponse = getOAuth2AccessToken();
+ } catch (Exception e) {
+ throw new RetryableException(0, e.getMessage(), HttpMethod.POST, e, null, template.request());
+ }
+ if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) {
+ setAccessToken(accessTokenResponse.getAccessToken(), accessTokenResponse.getExpiresIn());
+ if (accessTokenListener != null) {
+ accessTokenListener.notify(accessTokenResponse);
+ }
+ }
+ }
+
+ abstract OAuth2AccessToken getOAuth2AccessToken();
+
+ abstract OAuthFlow getFlow();
+
+ public synchronized void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
+ this.accessTokenListener = accessTokenListener;
+ }
+
+ public synchronized String getAccessToken() {
+ return accessToken;
+ }
+
+ public synchronized void setAccessToken(String accessToken, Integer expiresIn) {
+ this.accessToken = accessToken;
+ this.expirationTimeMillis = expiresIn == null ? null : System.currentTimeMillis() + expiresIn * MILLIS_PER_SECOND;
+ }
+
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OAuthFlow.java
new file mode 100644
index 00000000000..75c2a0c9740
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OAuthFlow.java
@@ -0,0 +1,22 @@
+/*
+ * 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.auth;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public enum OAuthFlow {
+ accessCode, //called authorizationCode in OpenAPI 3.0
+ implicit,
+ password,
+ application //called clientCredentials in OpenAPI 3.0
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java
new file mode 100644
index 00000000000..a21c5a15ba2
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OauthClientCredentialsGrant.java
@@ -0,0 +1,39 @@
+package org.openapitools.client.auth;
+
+import com.github.scribejava.core.builder.ServiceBuilder;
+import com.github.scribejava.core.model.OAuth2AccessToken;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class OauthClientCredentialsGrant extends OAuth {
+
+ public OauthClientCredentialsGrant(String authorizationUrl, String tokenUrl, String scopes) {
+ super(authorizationUrl, tokenUrl, scopes);
+ }
+
+ @Override
+ protected OAuth2AccessToken getOAuth2AccessToken() {
+ try {
+ return service.getAccessTokenClientCredentialsGrant(scopes);
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to get oauth token", e);
+ }
+ }
+
+ @Override
+ protected OAuthFlow getFlow() {
+ return OAuthFlow.application;
+ }
+
+ /**
+ * Configures the client credentials flow
+ *
+ * @param clientId
+ * @param clientSecret
+ */
+ public void configure(String clientId, String clientSecret) {
+ service = new ServiceBuilder(clientId)
+ .apiSecret(clientSecret)
+ .defaultScope(scopes)
+ .build(new DefaultApi20Impl(authorizationUrl, tokenUrl));
+ }
+}
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java
new file mode 100644
index 00000000000..dba4fb3a076
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/auth/OauthPasswordGrant.java
@@ -0,0 +1,48 @@
+package org.openapitools.client.auth;
+
+import com.github.scribejava.core.builder.ServiceBuilder;
+import com.github.scribejava.core.model.OAuth2AccessToken;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class OauthPasswordGrant extends OAuth {
+
+ private String username;
+ private String password;
+
+ public OauthPasswordGrant(String tokenUrl, String scopes) {
+ super(null, tokenUrl, scopes);
+ }
+
+ @Override
+ protected OAuth2AccessToken getOAuth2AccessToken() {
+ try {
+ return service.getAccessTokenPasswordGrant(username, password);
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to get oauth token", e);
+ }
+ }
+
+ @Override
+ protected OAuthFlow getFlow() {
+ return OAuthFlow.password;
+ }
+
+ /**
+ * Configures Oauth password grant flow
+ * Note: this flow is deprecated.
+ *
+ * @param username
+ * @param password
+ * @param clientId
+ * @param clientSecret
+ */
+ public void configure(String username, String password, String clientId, String clientSecret) {
+ this.username = username;
+ this.password = password;
+ //TODO the clientId and secret are optional according with the RFC
+ service = new ServiceBuilder(clientId)
+ .apiSecret(clientSecret)
+ .defaultScope(scopes)
+ .build(new DefaultApi20Impl(authorizationUrl, tokenUrl));
+ }
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
new file mode 100644
index 00000000000..ae545659226
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -0,0 +1,157 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * AdditionalPropertiesClass
+ */
+@JsonPropertyOrder({
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY,
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY
+})
+@JsonTypeName("AdditionalPropertiesClass")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class AdditionalPropertiesClass {
+ public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property";
+ private Map mapProperty = null;
+
+ public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property";
+ private Map> mapOfMapProperty = null;
+
+
+ public AdditionalPropertiesClass mapProperty(Map mapProperty) {
+
+ this.mapProperty = mapProperty;
+ return this;
+ }
+
+ public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
+ if (this.mapProperty == null) {
+ this.mapProperty = new HashMap();
+ }
+ this.mapProperty.put(key, mapPropertyItem);
+ return this;
+ }
+
+ /**
+ * Get mapProperty
+ * @return mapProperty
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Map getMapProperty() {
+ return mapProperty;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setMapProperty(Map mapProperty) {
+ this.mapProperty = mapProperty;
+ }
+
+
+ public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) {
+
+ this.mapOfMapProperty = mapOfMapProperty;
+ return this;
+ }
+
+ public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) {
+ if (this.mapOfMapProperty == null) {
+ this.mapOfMapProperty = new HashMap>();
+ }
+ this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
+ return this;
+ }
+
+ /**
+ * Get mapOfMapProperty
+ * @return mapOfMapProperty
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Map> getMapOfMapProperty() {
+ return mapOfMapProperty;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setMapOfMapProperty(Map> mapOfMapProperty) {
+ this.mapOfMapProperty = mapOfMapProperty;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
+ return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
+ Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mapProperty, mapOfMapProperty);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesClass {\n");
+ sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
+ sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Animal.java
new file mode 100644
index 00000000000..89964b059c5
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Animal.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.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.client.model.Cat;
+import org.openapitools.client.model.Dog;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * Animal
+ */
+@JsonPropertyOrder({
+ Animal.JSON_PROPERTY_CLASS_NAME,
+ Animal.JSON_PROPERTY_COLOR
+})
+@JsonTypeName("Animal")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = Cat.class, name = "Cat"),
+ @JsonSubTypes.Type(value = Dog.class, name = "Dog"),
+})
+
+public class Animal {
+ public static final String JSON_PROPERTY_CLASS_NAME = "className";
+ protected String className;
+
+ public static final String JSON_PROPERTY_COLOR = "color";
+ private String color = "red";
+
+
+ public Animal className(String className) {
+
+ this.className = className;
+ return this;
+ }
+
+ /**
+ * Get className
+ * @return className
+ **/
+ @ApiModelProperty(required = true, value = "")
+ @JsonProperty(JSON_PROPERTY_CLASS_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getClassName() {
+ return className;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_CLASS_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+
+ public Animal color(String color) {
+
+ this.color = color;
+ return this;
+ }
+
+ /**
+ * Get color
+ * @return color
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_COLOR)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getColor() {
+ return color;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_COLOR)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setColor(String color) {
+ this.color = color;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Animal animal = (Animal) o;
+ return Objects.equals(this.className, animal.className) &&
+ Objects.equals(this.color, animal.color);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(className, color);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Animal {\n");
+ sb.append(" className: ").append(toIndentedString(className)).append("\n");
+ sb.append(" color: ").append(toIndentedString(color)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
new file mode 100644
index 00000000000..e558e02ebe5
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
@@ -0,0 +1,116 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * ArrayOfArrayOfNumberOnly
+ */
+@JsonPropertyOrder({
+ ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER
+})
+@JsonTypeName("ArrayOfArrayOfNumberOnly")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class ArrayOfArrayOfNumberOnly {
+ public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber";
+ private List> arrayArrayNumber = null;
+
+
+ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) {
+
+ this.arrayArrayNumber = arrayArrayNumber;
+ return this;
+ }
+
+ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) {
+ if (this.arrayArrayNumber == null) {
+ this.arrayArrayNumber = new ArrayList>();
+ }
+ this.arrayArrayNumber.add(arrayArrayNumberItem);
+ return this;
+ }
+
+ /**
+ * Get arrayArrayNumber
+ * @return arrayArrayNumber
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public List> getArrayArrayNumber() {
+ return arrayArrayNumber;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setArrayArrayNumber(List> arrayArrayNumber) {
+ this.arrayArrayNumber = arrayArrayNumber;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
+ return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(arrayArrayNumber);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ArrayOfArrayOfNumberOnly {\n");
+ sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
new file mode 100644
index 00000000000..fd5f507f169
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
@@ -0,0 +1,116 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * ArrayOfNumberOnly
+ */
+@JsonPropertyOrder({
+ ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER
+})
+@JsonTypeName("ArrayOfNumberOnly")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class ArrayOfNumberOnly {
+ public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber";
+ private List arrayNumber = null;
+
+
+ public ArrayOfNumberOnly arrayNumber(List arrayNumber) {
+
+ this.arrayNumber = arrayNumber;
+ return this;
+ }
+
+ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
+ if (this.arrayNumber == null) {
+ this.arrayNumber = new ArrayList();
+ }
+ this.arrayNumber.add(arrayNumberItem);
+ return this;
+ }
+
+ /**
+ * Get arrayNumber
+ * @return arrayNumber
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public List getArrayNumber() {
+ return arrayNumber;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setArrayNumber(List arrayNumber) {
+ this.arrayNumber = arrayNumber;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
+ return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(arrayNumber);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ArrayOfNumberOnly {\n");
+ sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayTest.java
new file mode 100644
index 00000000000..281f50c3fb3
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ArrayTest.java
@@ -0,0 +1,198 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.openapitools.client.model.ReadOnlyFirst;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * ArrayTest
+ */
+@JsonPropertyOrder({
+ ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING,
+ ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER,
+ ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL
+})
+@JsonTypeName("ArrayTest")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class ArrayTest {
+ public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string";
+ private List arrayOfString = null;
+
+ public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer";
+ private List> arrayArrayOfInteger = null;
+
+ public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model";
+ private List> arrayArrayOfModel = null;
+
+
+ public ArrayTest arrayOfString(List arrayOfString) {
+
+ this.arrayOfString = arrayOfString;
+ return this;
+ }
+
+ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
+ if (this.arrayOfString == null) {
+ this.arrayOfString = new ArrayList();
+ }
+ this.arrayOfString.add(arrayOfStringItem);
+ return this;
+ }
+
+ /**
+ * Get arrayOfString
+ * @return arrayOfString
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public List getArrayOfString() {
+ return arrayOfString;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setArrayOfString(List arrayOfString) {
+ this.arrayOfString = arrayOfString;
+ }
+
+
+ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) {
+
+ this.arrayArrayOfInteger = arrayArrayOfInteger;
+ return this;
+ }
+
+ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) {
+ if (this.arrayArrayOfInteger == null) {
+ this.arrayArrayOfInteger = new ArrayList>();
+ }
+ this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
+ return this;
+ }
+
+ /**
+ * Get arrayArrayOfInteger
+ * @return arrayArrayOfInteger
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public List> getArrayArrayOfInteger() {
+ return arrayArrayOfInteger;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setArrayArrayOfInteger(List> arrayArrayOfInteger) {
+ this.arrayArrayOfInteger = arrayArrayOfInteger;
+ }
+
+
+ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) {
+
+ this.arrayArrayOfModel = arrayArrayOfModel;
+ return this;
+ }
+
+ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) {
+ if (this.arrayArrayOfModel == null) {
+ this.arrayArrayOfModel = new ArrayList>();
+ }
+ this.arrayArrayOfModel.add(arrayArrayOfModelItem);
+ return this;
+ }
+
+ /**
+ * Get arrayArrayOfModel
+ * @return arrayArrayOfModel
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public List> getArrayArrayOfModel() {
+ return arrayArrayOfModel;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setArrayArrayOfModel(List> arrayArrayOfModel) {
+ this.arrayArrayOfModel = arrayArrayOfModel;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ArrayTest arrayTest = (ArrayTest) o;
+ return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
+ Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
+ Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ArrayTest {\n");
+ sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
+ sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
+ sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Capitalization.java
new file mode 100644
index 00000000000..db68e647294
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Capitalization.java
@@ -0,0 +1,270 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * Capitalization
+ */
+@JsonPropertyOrder({
+ Capitalization.JSON_PROPERTY_SMALL_CAMEL,
+ Capitalization.JSON_PROPERTY_CAPITAL_CAMEL,
+ Capitalization.JSON_PROPERTY_SMALL_SNAKE,
+ Capitalization.JSON_PROPERTY_CAPITAL_SNAKE,
+ Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS,
+ Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E
+})
+@JsonTypeName("Capitalization")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class Capitalization {
+ public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel";
+ private String smallCamel;
+
+ public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel";
+ private String capitalCamel;
+
+ public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake";
+ private String smallSnake;
+
+ public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake";
+ private String capitalSnake;
+
+ public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points";
+ private String scAETHFlowPoints;
+
+ public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME";
+ private String ATT_NAME;
+
+
+ public Capitalization smallCamel(String smallCamel) {
+
+ this.smallCamel = smallCamel;
+ return this;
+ }
+
+ /**
+ * Get smallCamel
+ * @return smallCamel
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_SMALL_CAMEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getSmallCamel() {
+ return smallCamel;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_SMALL_CAMEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setSmallCamel(String smallCamel) {
+ this.smallCamel = smallCamel;
+ }
+
+
+ public Capitalization capitalCamel(String capitalCamel) {
+
+ this.capitalCamel = capitalCamel;
+ return this;
+ }
+
+ /**
+ * Get capitalCamel
+ * @return capitalCamel
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getCapitalCamel() {
+ return capitalCamel;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setCapitalCamel(String capitalCamel) {
+ this.capitalCamel = capitalCamel;
+ }
+
+
+ public Capitalization smallSnake(String smallSnake) {
+
+ this.smallSnake = smallSnake;
+ return this;
+ }
+
+ /**
+ * Get smallSnake
+ * @return smallSnake
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_SMALL_SNAKE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getSmallSnake() {
+ return smallSnake;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_SMALL_SNAKE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setSmallSnake(String smallSnake) {
+ this.smallSnake = smallSnake;
+ }
+
+
+ public Capitalization capitalSnake(String capitalSnake) {
+
+ this.capitalSnake = capitalSnake;
+ return this;
+ }
+
+ /**
+ * Get capitalSnake
+ * @return capitalSnake
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getCapitalSnake() {
+ return capitalSnake;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setCapitalSnake(String capitalSnake) {
+ this.capitalSnake = capitalSnake;
+ }
+
+
+ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
+
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ return this;
+ }
+
+ /**
+ * Get scAETHFlowPoints
+ * @return scAETHFlowPoints
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getScAETHFlowPoints() {
+ return scAETHFlowPoints;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setScAETHFlowPoints(String scAETHFlowPoints) {
+ this.scAETHFlowPoints = scAETHFlowPoints;
+ }
+
+
+ public Capitalization ATT_NAME(String ATT_NAME) {
+
+ this.ATT_NAME = ATT_NAME;
+ return this;
+ }
+
+ /**
+ * Name of the pet
+ * @return ATT_NAME
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "Name of the pet ")
+ @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getATTNAME() {
+ return ATT_NAME;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setATTNAME(String ATT_NAME) {
+ this.ATT_NAME = ATT_NAME;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Capitalization capitalization = (Capitalization) o;
+ return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
+ Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
+ Objects.equals(this.smallSnake, capitalization.smallSnake) &&
+ Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
+ Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
+ Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Capitalization {\n");
+ sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
+ sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
+ sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
+ sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
+ sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
+ sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Cat.java
new file mode 100644
index 00000000000..fe6e7ae4050
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Cat.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.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.client.model.Animal;
+import org.openapitools.client.model.CatAllOf;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * Cat
+ */
+@JsonPropertyOrder({
+ Cat.JSON_PROPERTY_DECLAWED
+})
+@JsonTypeName("Cat")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
+
+public class Cat extends Animal {
+ public static final String JSON_PROPERTY_DECLAWED = "declawed";
+ private Boolean declawed;
+
+
+ public Cat declawed(Boolean declawed) {
+
+ this.declawed = declawed;
+ return this;
+ }
+
+ /**
+ * Get declawed
+ * @return declawed
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_DECLAWED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Boolean isDeclawed() {
+ return declawed;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_DECLAWED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setDeclawed(Boolean declawed) {
+ this.declawed = declawed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Cat cat = (Cat) o;
+ return Objects.equals(this.declawed, cat.declawed) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(declawed, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Cat {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/CatAllOf.java
new file mode 100644
index 00000000000..997f76d215b
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/CatAllOf.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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * CatAllOf
+ */
+@JsonPropertyOrder({
+ CatAllOf.JSON_PROPERTY_DECLAWED
+})
+@JsonTypeName("Cat_allOf")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class CatAllOf {
+ public static final String JSON_PROPERTY_DECLAWED = "declawed";
+ private Boolean declawed;
+
+
+ public CatAllOf declawed(Boolean declawed) {
+
+ this.declawed = declawed;
+ return this;
+ }
+
+ /**
+ * Get declawed
+ * @return declawed
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_DECLAWED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Boolean isDeclawed() {
+ return declawed;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_DECLAWED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setDeclawed(Boolean declawed) {
+ this.declawed = declawed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CatAllOf catAllOf = (CatAllOf) o;
+ return Objects.equals(this.declawed, catAllOf.declawed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(declawed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CatAllOf {\n");
+ sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Category.java
new file mode 100644
index 00000000000..32f72e70f3d
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Category.java
@@ -0,0 +1,137 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * Category
+ */
+@JsonPropertyOrder({
+ Category.JSON_PROPERTY_ID,
+ Category.JSON_PROPERTY_NAME
+})
+@JsonTypeName("Category")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class Category {
+ public static final String JSON_PROPERTY_ID = "id";
+ private Long id;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name = "default-name";
+
+
+ public Category id(Long id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get id
+ * @return id
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Long getId() {
+ return id;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+
+ public Category name(String name) {
+
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ **/
+ @ApiModelProperty(required = true, value = "")
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getName() {
+ return name;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ 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;
+ }
+ Category category = (Category) o;
+ return Objects.equals(this.id, category.id) &&
+ Objects.equals(this.name, category.name);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Category {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\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/feign-openapi3/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ClassModel.java
new file mode 100644
index 00000000000..1872b8ad887
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/ClassModel.java
@@ -0,0 +1,106 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * Model for testing model with \"_class\" property
+ */
+@ApiModel(description = "Model for testing model with \"_class\" property")
+@JsonPropertyOrder({
+ ClassModel.JSON_PROPERTY_PROPERTY_CLASS
+})
+@JsonTypeName("ClassModel")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class ClassModel {
+ public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
+ private String propertyClass;
+
+
+ public ClassModel propertyClass(String propertyClass) {
+
+ this.propertyClass = propertyClass;
+ return this;
+ }
+
+ /**
+ * Get propertyClass
+ * @return propertyClass
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getPropertyClass() {
+ return propertyClass;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setPropertyClass(String propertyClass) {
+ this.propertyClass = propertyClass;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ClassModel classModel = (ClassModel) o;
+ return Objects.equals(this.propertyClass, classModel.propertyClass);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(propertyClass);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ClassModel {\n");
+ sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Client.java
new file mode 100644
index 00000000000..13c8982196c
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Client.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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * Client
+ */
+@JsonPropertyOrder({
+ Client.JSON_PROPERTY_CLIENT
+})
+@JsonTypeName("Client")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class Client {
+ public static final String JSON_PROPERTY_CLIENT = "client";
+ private String client;
+
+
+ public Client client(String client) {
+
+ this.client = client;
+ return this;
+ }
+
+ /**
+ * Get client
+ * @return client
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_CLIENT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getClient() {
+ return client;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_CLIENT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Client client = (Client) o;
+ return Objects.equals(this.client, client.client);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(client);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Client {\n");
+ sb.append(" client: ").append(toIndentedString(client)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/DeprecatedObject.java
new file mode 100644
index 00000000000..b442dc3dcff
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/DeprecatedObject.java
@@ -0,0 +1,107 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * DeprecatedObject
+ * @deprecated
+ */
+@Deprecated
+@JsonPropertyOrder({
+ DeprecatedObject.JSON_PROPERTY_NAME
+})
+@JsonTypeName("DeprecatedObject")
+@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 name(String name) {
+
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @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/feign-openapi3/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Dog.java
new file mode 100644
index 00000000000..5820cea9ab4
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/Dog.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.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.client.model.Animal;
+import org.openapitools.client.model.DogAllOf;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * Dog
+ */
+@JsonPropertyOrder({
+ Dog.JSON_PROPERTY_BREED
+})
+@JsonTypeName("Dog")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
+
+public class Dog extends Animal {
+ public static final String JSON_PROPERTY_BREED = "breed";
+ private String breed;
+
+
+ public Dog breed(String breed) {
+
+ this.breed = breed;
+ return this;
+ }
+
+ /**
+ * Get breed
+ * @return breed
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_BREED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getBreed() {
+ return breed;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_BREED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setBreed(String breed) {
+ this.breed = breed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Dog dog = (Dog) o;
+ return Objects.equals(this.breed, dog.breed) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(breed, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Dog {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/DogAllOf.java
new file mode 100644
index 00000000000..26cd9000e38
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/DogAllOf.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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * DogAllOf
+ */
+@JsonPropertyOrder({
+ DogAllOf.JSON_PROPERTY_BREED
+})
+@JsonTypeName("Dog_allOf")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class DogAllOf {
+ public static final String JSON_PROPERTY_BREED = "breed";
+ private String breed;
+
+
+ public DogAllOf breed(String breed) {
+
+ this.breed = breed;
+ return this;
+ }
+
+ /**
+ * Get breed
+ * @return breed
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_BREED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getBreed() {
+ return breed;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_BREED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setBreed(String breed) {
+ this.breed = breed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ DogAllOf dogAllOf = (DogAllOf) o;
+ return Objects.equals(this.breed, dogAllOf.breed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(breed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DogAllOf {\n");
+ sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumArrays.java
new file mode 100644
index 00000000000..6f8c2056318
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumArrays.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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * EnumArrays
+ */
+@JsonPropertyOrder({
+ EnumArrays.JSON_PROPERTY_JUST_SYMBOL,
+ EnumArrays.JSON_PROPERTY_ARRAY_ENUM
+})
+@JsonTypeName("EnumArrays")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EnumArrays {
+ /**
+ * Gets or Sets justSymbol
+ */
+ public enum JustSymbolEnum {
+ GREATER_THAN_OR_EQUAL_TO(">="),
+
+ DOLLAR("$");
+
+ private String value;
+
+ JustSymbolEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static JustSymbolEnum fromValue(String value) {
+ for (JustSymbolEnum b : JustSymbolEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol";
+ private JustSymbolEnum justSymbol;
+
+ /**
+ * Gets or Sets arrayEnum
+ */
+ public enum ArrayEnumEnum {
+ FISH("fish"),
+
+ CRAB("crab");
+
+ private String value;
+
+ ArrayEnumEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static ArrayEnumEnum fromValue(String value) {
+ for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum";
+ private List arrayEnum = null;
+
+
+ public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
+
+ this.justSymbol = justSymbol;
+ return this;
+ }
+
+ /**
+ * Get justSymbol
+ * @return justSymbol
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_JUST_SYMBOL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public JustSymbolEnum getJustSymbol() {
+ return justSymbol;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_JUST_SYMBOL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setJustSymbol(JustSymbolEnum justSymbol) {
+ this.justSymbol = justSymbol;
+ }
+
+
+ public EnumArrays arrayEnum(List arrayEnum) {
+
+ this.arrayEnum = arrayEnum;
+ return this;
+ }
+
+ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
+ if (this.arrayEnum == null) {
+ this.arrayEnum = new ArrayList();
+ }
+ this.arrayEnum.add(arrayEnumItem);
+ return this;
+ }
+
+ /**
+ * Get arrayEnum
+ * @return arrayEnum
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ARRAY_ENUM)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public List getArrayEnum() {
+ return arrayEnum;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ARRAY_ENUM)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setArrayEnum(List arrayEnum) {
+ this.arrayEnum = arrayEnum;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ EnumArrays enumArrays = (EnumArrays) o;
+ return Objects.equals(this.justSymbol, enumArrays.justSymbol) &&
+ Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(justSymbol, arrayEnum);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EnumArrays {\n");
+ sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n");
+ sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumClass.java
new file mode 100644
index 00000000000..e9102d97427
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumClass.java
@@ -0,0 +1,60 @@
+/*
+ * 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.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Gets or Sets EnumClass
+ */
+public enum EnumClass {
+
+ _ABC("_abc"),
+
+ _EFG("-efg"),
+
+ _XYZ_("(xyz)");
+
+ private String value;
+
+ EnumClass(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static EnumClass fromValue(String value) {
+ for (EnumClass b : EnumClass.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumTest.java
new file mode 100644
index 00000000000..cbb00130d67
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -0,0 +1,494 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+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 com.fasterxml.jackson.annotation.JsonIgnore;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.util.NoSuchElementException;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * EnumTest
+ */
+@JsonPropertyOrder({
+ EnumTest.JSON_PROPERTY_ENUM_STRING,
+ 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_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")
+public class EnumTest {
+ /**
+ * Gets or Sets enumString
+ */
+ public enum EnumStringEnum {
+ UPPER("UPPER"),
+
+ LOWER("lower"),
+
+ EMPTY("");
+
+ private String value;
+
+ EnumStringEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static EnumStringEnum fromValue(String value) {
+ for (EnumStringEnum b : EnumStringEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ public static final String JSON_PROPERTY_ENUM_STRING = "enum_string";
+ private EnumStringEnum enumString;
+
+ /**
+ * Gets or Sets enumStringRequired
+ */
+ public enum EnumStringRequiredEnum {
+ UPPER("UPPER"),
+
+ LOWER("lower"),
+
+ EMPTY("");
+
+ private String value;
+
+ EnumStringRequiredEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static EnumStringRequiredEnum fromValue(String value) {
+ for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required";
+ private EnumStringRequiredEnum enumStringRequired;
+
+ /**
+ * Gets or Sets enumInteger
+ */
+ public enum EnumIntegerEnum {
+ NUMBER_1(1),
+
+ NUMBER_MINUS_1(-1);
+
+ private Integer value;
+
+ EnumIntegerEnum(Integer value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public Integer getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static EnumIntegerEnum fromValue(Integer value) {
+ for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer";
+ private EnumIntegerEnum enumInteger;
+
+ /**
+ * Gets or Sets enumNumber
+ */
+ public enum EnumNumberEnum {
+ NUMBER_1_DOT_1(1.1),
+
+ NUMBER_MINUS_1_DOT_2(-1.2);
+
+ private Double value;
+
+ EnumNumberEnum(Double value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public Double getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static EnumNumberEnum fromValue(Double value) {
+ for (EnumNumberEnum b : EnumNumberEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number";
+ private EnumNumberEnum enumNumber;
+
+ public static final String JSON_PROPERTY_OUTER_ENUM = "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 enumString(EnumStringEnum enumString) {
+
+ this.enumString = enumString;
+ return this;
+ }
+
+ /**
+ * Get enumString
+ * @return enumString
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ENUM_STRING)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public EnumStringEnum getEnumString() {
+ return enumString;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ENUM_STRING)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setEnumString(EnumStringEnum enumString) {
+ this.enumString = enumString;
+ }
+
+
+ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
+
+ this.enumStringRequired = enumStringRequired;
+ return this;
+ }
+
+ /**
+ * Get enumStringRequired
+ * @return enumStringRequired
+ **/
+ @ApiModelProperty(required = true, value = "")
+ @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public EnumStringRequiredEnum getEnumStringRequired() {
+ return enumStringRequired;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
+ this.enumStringRequired = enumStringRequired;
+ }
+
+
+ public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
+
+ this.enumInteger = enumInteger;
+ return this;
+ }
+
+ /**
+ * Get enumInteger
+ * @return enumInteger
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ENUM_INTEGER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public EnumIntegerEnum getEnumInteger() {
+ return enumInteger;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ENUM_INTEGER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setEnumInteger(EnumIntegerEnum enumInteger) {
+ this.enumInteger = enumInteger;
+ }
+
+
+ public EnumTest enumNumber(EnumNumberEnum enumNumber) {
+
+ this.enumNumber = enumNumber;
+ return this;
+ }
+
+ /**
+ * Get enumNumber
+ * @return enumNumber
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_ENUM_NUMBER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public EnumNumberEnum getEnumNumber() {
+ return enumNumber;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ENUM_NUMBER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setEnumNumber(EnumNumberEnum enumNumber) {
+ this.enumNumber = enumNumber;
+ }
+
+
+ public EnumTest outerEnum(OuterEnum outerEnum) {
+ this.outerEnum = JsonNullable.of(outerEnum);
+
+ return this;
+ }
+
+ /**
+ * Get outerEnum
+ * @return outerEnum
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonIgnore
+
+ public OuterEnum getOuterEnum() {
+ return outerEnum.orElse(null);
+ }
+
+ @JsonProperty(JSON_PROPERTY_OUTER_ENUM)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ 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);
+ }
+
+
+ public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) {
+
+ this.outerEnumInteger = outerEnumInteger;
+ return this;
+ }
+
+ /**
+ * Get outerEnumInteger
+ * @return outerEnumInteger
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ 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
+ @ApiModelProperty(value = "")
+ @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
+ @ApiModelProperty(value = "")
+ @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
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ EnumTest enumTest = (EnumTest) o;
+ return Objects.equals(this.enumString, enumTest.enumString) &&
+ Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
+ Objects.equals(this.enumInteger, enumTest.enumInteger) &&
+ Objects.equals(this.enumNumber, enumTest.enumNumber) &&
+ Objects.equals(this.outerEnum, enumTest.outerEnum) &&
+ Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) &&
+ Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) &&
+ Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum, outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EnumTest {\n");
+ sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
+ sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
+ sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
+ sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
+ sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
+ sb.append(" 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();
+ }
+
+ /**
+ * 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/feign-openapi3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
new file mode 100644
index 00000000000..fdc4c5a0920
--- /dev/null
+++ b/samples/client/petstore/java/feign-openapi3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
@@ -0,0 +1,148 @@
+/*
+ * 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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * FileSchemaTestClass
+ */
+@JsonPropertyOrder({
+ FileSchemaTestClass.JSON_PROPERTY_FILE,
+ FileSchemaTestClass.JSON_PROPERTY_FILES
+})
+@JsonTypeName("FileSchemaTestClass")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class FileSchemaTestClass {
+ public static final String JSON_PROPERTY_FILE = "file";
+ private java.io.File file;
+
+ public static final String JSON_PROPERTY_FILES = "files";
+ private List files = null;
+
+
+ public FileSchemaTestClass file(java.io.File file) {
+
+ this.file = file;
+ return this;
+ }
+
+ /**
+ * Get file
+ * @return file
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_FILE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.io.File getFile() {
+ return file;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_FILE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setFile(java.io.File file) {
+ this.file = file;
+ }
+
+
+ public FileSchemaTestClass files(List files) {
+
+ this.files = files;
+ return this;
+ }
+
+ public FileSchemaTestClass addFilesItem(java.io.File filesItem) {
+ if (this.files == null) {
+ this.files = new ArrayList