diff --git a/bin/configs/java-feign10x.yaml b/bin/configs/java-feign.yaml
similarity index 78%
rename from bin/configs/java-feign10x.yaml
rename to bin/configs/java-feign.yaml
index 4d741daac24..9c44ae91d0d 100644
--- a/bin/configs/java-feign10x.yaml
+++ b/bin/configs/java-feign.yaml
@@ -1,9 +1,9 @@
generatorName: java
-outputDir: samples/client/petstore/java/feign10x
+outputDir: samples/client/petstore/java/feign
library: feign
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
booleanGetterPrefix: is
- artifactId: petstore-feign-10x
+ artifactId: petstore-feign
hideGenerationTimestamp: "true"
diff --git a/docs/generators/java.md b/docs/generators/java.md
index 7a0fae8db4a..aa3e6ebd712 100644
--- a/docs/generators/java.md
+++ b/docs/generators/java.md
@@ -25,14 +25,13 @@ sidebar_label: java
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
-|feignVersion|Version of OpenFeign: '10.x' (default), '9.x' (deprecated)| |false|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|groupId|groupId in generated pom.xml| |org.openapitools|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|invokerPackage|root package for generated code| |org.openapitools.client|
|java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
-|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**feign**
HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client 1.x. JSON processing: Jackson 2.9.x
|okhttp-gson|
+|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**feign**
HTTP client: OpenFeign 11.x. JSON processing: Jackson 2.9.x.
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client 1.x. JSON processing: Jackson 2.9.x
|okhttp-gson|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.client.model|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
index 0b89fbd4430..b733ffbe720 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java
@@ -55,7 +55,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
public static final String DO_NOT_USE_RX = "doNotUseRx";
public static final String USE_PLAY_WS = "usePlayWS";
public static final String PLAY_VERSION = "playVersion";
- public static final String FEIGN_VERSION = "feignVersion";
public static final String ASYNC_NATIVE = "asyncNative";
public static final String PARCELABLE_MODEL = "parcelableModel";
public static final String USE_RUNTIME_EXCEPTION = "useRuntimeException";
@@ -66,9 +65,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
public static final String PLAY_25 = "play25";
public static final String PLAY_26 = "play26";
- public static final String FEIGN_9 = "9.x";
- public static final String FEIGN_10 = "10.x";
-
public static final String FEIGN = "feign";
public static final String GOOGLE_API_CLIENT = "google-api-client";
public static final String JERSEY1 = "jersey1";
@@ -95,7 +91,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
protected boolean doNotUseRx = true;
protected boolean usePlayWS = false;
protected String playVersion = PLAY_26;
- protected String feignVersion = FEIGN_10;
protected boolean asyncNative = false;
protected boolean parcelableModel = false;
protected boolean useBeanValidation = false;
@@ -143,13 +138,12 @@ public class JavaClientCodegen extends AbstractJavaCodegen
cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE, "Send gzip-encoded requests"));
cliOptions.add(CliOption.newBoolean(USE_RUNTIME_EXCEPTION, "Use RuntimeException instead of Exception"));
cliOptions.add(CliOption.newBoolean(ASYNC_NATIVE, "If true, async handlers will be used, instead of the sync version"));
- cliOptions.add(CliOption.newBoolean(FEIGN_VERSION, "Version of OpenFeign: '10.x' (default), '9.x' (deprecated)"));
cliOptions.add(CliOption.newBoolean(USE_REFLECTION_EQUALS_HASHCODE, "Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact."));
cliOptions.add(CliOption.newBoolean(CASE_INSENSITIVE_RESPONSE_HEADERS, "Make API response's headers case-insensitive. Available on " + OKHTTP_GSON + ", " + JERSEY2 + " libraries"));
supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.");
supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x");
- supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.");
+ supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 11.x. JSON processing: Jackson 2.9.x.");
supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)");
supportedLibraries.put(RESTTEMPLATE, "HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x");
@@ -257,12 +251,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
}
additionalProperties.put(PLAY_VERSION, playVersion);
- // default to feign 10.x
- if (additionalProperties.containsKey(FEIGN_VERSION)) {
- once(LOGGER).warn("feignVersion has been deprecated. 10.x is the default.");
- }
- additionalProperties.put(FEIGN_VERSION, feignVersion);
-
if (additionalProperties.containsKey(ASYNC_NATIVE)) {
this.setAsyncNative(convertPropertyToBooleanAndWriteBack(ASYNC_NATIVE));
}
@@ -845,10 +833,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
this.playVersion = playVersion;
}
- public void setFeignVersion(String feignVersion) {
- this.feignVersion = feignVersion;
- }
-
public void setAsyncNative(boolean asyncNative) {
this.asyncNative = asyncNative;
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OAuth.mustache
index feefdb93981..b451e97ae6e 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OAuth.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/OAuth.mustache
@@ -19,9 +19,7 @@ import org.apache.oltu.oauth2.common.message.types.GrantType;
import org.apache.oltu.oauth2.common.token.BasicOAuthToken;
import feign.Client;
-{{#useFeign10}}
import feign.Request.HttpMethod;
-{{/useFeign10}}
import feign.Request.Options;
import feign.RequestInterceptor;
import feign.RequestTemplate;
@@ -95,12 +93,7 @@ public class OAuth implements RequestInterceptor {
try {
accessTokenResponse = oauthClient.accessToken(tokenRequestBuilder.buildBodyMessage());
} catch (Exception e) {
- {{#useFeign10}}
throw new RetryableException(0, e.getMessage(), HttpMethod.POST, e, null, template.request());
- {{/useFeign10}}
- {{^useFeign10}}
- throw new RetryableException(e.getMessage(), e,null);
- {{/useFeign10}}
}
if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) {
setAccessToken(accessTokenResponse.getAccessToken(), accessTokenResponse.getExpiresIn());
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache
index 8302b841064..075db4f0cdb 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache
@@ -126,8 +126,8 @@ ext {
{{#threetenbp}}
jackson_threetenbp_version = "2.9.10"
{{/threetenbp}}
- feign_version = "{{#useFeign10}}11.0{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}"
- feign_form_version = "{{#useFeign10}}3.8.0{{/useFeign10}}{{^useFeign10}}2.1.0{{/useFeign10}}"
+ feign_version = "11.0"
+ feign_form_version = "3.8.0"
junit_version = "4.13"
oltu_version = "1.0.1"
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache
index e5caa1b2000..664cc67edfc 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache
@@ -10,10 +10,10 @@ lazy val root = (project in file(".")).
resolvers += Resolver.mavenLocal,
libraryDependencies ++= Seq(
"io.swagger" % "swagger-annotations" % "1.5.24" % "compile",
- "io.github.openfeign" % "feign-core" % "{{#useFeign10}}11.0{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile",
- "io.github.openfeign" % "feign-jackson" % "{{#useFeign10}}11.0{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile",
- "io.github.openfeign" % "feign-slf4j" % "{{#useFeign10}}11.0{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile",
- "io.github.openfeign.form" % "feign-form" % "{{#useFeign10}}3.8.0{{/useFeign10}}{{^useFeign10}}2.1.0{{/useFeign10}}" % "compile",
+ "io.github.openfeign" % "feign-core" % "11.0" % "compile",
+ "io.github.openfeign" % "feign-jackson" % "11.0" % "compile",
+ "io.github.openfeign" % "feign-slf4j" % "11.0" % "compile",
+ "io.github.openfeign.form" % "feign-form" % "3.8.0" % "compile",
"com.fasterxml.jackson.core" % "jackson-core" % "2.10.3" % "compile",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.3" % "compile",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.10.3" % "compile",
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache
index b76784db04a..60581b5336f 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache
@@ -348,8 +348,8 @@
${java.version}${java.version}1.5.24
- {{#useFeign10}}11.0{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}
- {{#useFeign10}}3.8.0{{/useFeign10}}{{^useFeign10}}2.1.0{{/useFeign10}}
+ 11.0
+ 3.8.02.10.30.2.12.10.3
diff --git a/pom.xml b/pom.xml
index 3d5a95a4cfc..9da7c127f69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -731,7 +731,7 @@
- samples/client/petstore/java/feign10x
+ samples/client/petstore/java/feign
@@ -1252,7 +1252,7 @@
samples/client/petstore/scala-httpclientsamples/client/petstore/scalazsamples/client/petstore/clojure
- samples/client/petstore/java/feign10x
+ samples/client/petstore/java/feignsamples/client/petstore/java/jersey1samples/client/petstore/java/jersey2-java8samples/openapi3/client/petstore/java/jersey2-java8
diff --git a/samples/client/petstore/java/feign10x/.gitignore b/samples/client/petstore/java/feign/.gitignore
similarity index 100%
rename from samples/client/petstore/java/feign10x/.gitignore
rename to samples/client/petstore/java/feign/.gitignore
diff --git a/samples/client/petstore/java/feign/.openapi-generator-ignore b/samples/client/petstore/java/feign/.openapi-generator-ignore
new file mode 100644
index 00000000000..7484ee590a3
--- /dev/null
+++ b/samples/client/petstore/java/feign/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/client/petstore/java/feign10x/.openapi-generator/FILES b/samples/client/petstore/java/feign/.openapi-generator/FILES
similarity index 100%
rename from samples/client/petstore/java/feign10x/.openapi-generator/FILES
rename to samples/client/petstore/java/feign/.openapi-generator/FILES
diff --git a/samples/client/petstore/java/feign10x/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION
similarity index 100%
rename from samples/client/petstore/java/feign10x/.openapi-generator/VERSION
rename to samples/client/petstore/java/feign/.openapi-generator/VERSION
diff --git a/samples/client/petstore/java/feign10x/.travis.yml b/samples/client/petstore/java/feign/.travis.yml
similarity index 100%
rename from samples/client/petstore/java/feign10x/.travis.yml
rename to samples/client/petstore/java/feign/.travis.yml
diff --git a/samples/client/petstore/java/feign/README.md b/samples/client/petstore/java/feign/README.md
new file mode 100644
index 00000000000..646dfdc4e2b
--- /dev/null
+++ b/samples/client/petstore/java/feign/README.md
@@ -0,0 +1,43 @@
+# petstore-feign
+
+## Requirements
+
+Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
+
+## Installation & Usage
+
+To install the API client library to your local Maven repository, simply execute:
+
+```shell
+mvn install
+```
+
+To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
+
+```shell
+mvn deploy
+```
+
+Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
+
+After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*:
+
+```xml
+
+ org.openapitools
+ petstore-feign
+ 1.0.0
+ compile
+
+
+```
+
+## Recommendation
+
+It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
+
+## Author
+
+
+
+
diff --git a/samples/client/petstore/java/feign10x/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml
similarity index 100%
rename from samples/client/petstore/java/feign10x/api/openapi.yaml
rename to samples/client/petstore/java/feign/api/openapi.yaml
diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle
new file mode 100644
index 00000000000..5e255fb6e1a
--- /dev/null
+++ b/samples/client/petstore/java/feign/build.gradle
@@ -0,0 +1,125 @@
+apply plugin: 'idea'
+apply plugin: 'eclipse'
+
+group = 'org.openapitools'
+version = '1.0.0'
+
+buildscript {
+ repositories {
+ maven { url "https://repo1.maven.org/maven2" }
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.3.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
+ }
+}
+
+repositories {
+ jcenter()
+}
+
+
+if(hasProperty('target') && target == 'android') {
+
+ apply plugin: 'com.android.library'
+ apply plugin: 'com.github.dcendents.android-maven'
+
+ android {
+ compileSdkVersion 25
+ buildToolsVersion '25.0.2'
+ defaultConfig {
+ minSdkVersion 14
+ targetSdkVersion 25
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_7
+ targetCompatibility JavaVersion.VERSION_1_7
+ }
+
+ // Rename the aar correctly
+ libraryVariants.all { variant ->
+ variant.outputs.each { output ->
+ def outputFile = output.outputFile
+ if (outputFile != null && outputFile.name.endsWith('.aar')) {
+ def fileName = "${project.name}-${variant.baseName}-${version}.aar"
+ output.outputFile = new File(outputFile.parent, fileName)
+ }
+ }
+ }
+
+ dependencies {
+ provided 'javax.annotation:jsr250-api:1.0'
+ }
+ }
+
+ afterEvaluate {
+ android.libraryVariants.all { variant ->
+ def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
+ task.description = "Create jar artifact for ${variant.name}"
+ task.dependsOn variant.javaCompile
+ task.from variant.javaCompile.destinationDir
+ task.destinationDir = project.file("${project.buildDir}/outputs/jar")
+ task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
+ artifacts.add('archives', task);
+ }
+ }
+
+ task sourcesJar(type: Jar) {
+ from android.sourceSets.main.java.srcDirs
+ classifier = 'sources'
+ }
+
+ artifacts {
+ archives sourcesJar
+ }
+
+} else {
+
+ apply plugin: 'java'
+ apply plugin: 'maven'
+
+ sourceCompatibility = JavaVersion.VERSION_1_7
+ targetCompatibility = JavaVersion.VERSION_1_7
+
+ install {
+ repositories.mavenInstaller {
+ pom.artifactId = 'petstore-feign'
+ }
+ }
+
+ task execute(type:JavaExec) {
+ main = System.getProperty('mainClass')
+ classpath = sourceSets.main.runtimeClasspath
+ }
+}
+
+ext {
+ swagger_annotations_version = "1.5.24"
+ jackson_version = "2.10.3"
+ jackson_databind_version = "2.10.3"
+ jackson_databind_nullable_version = "0.2.1"
+ jackson_threetenbp_version = "2.9.10"
+ feign_version = "11.0"
+ feign_form_version = "3.8.0"
+ junit_version = "4.13"
+ oltu_version = "1.0.1"
+}
+
+dependencies {
+ compile "io.swagger:swagger-annotations:$swagger_annotations_version"
+ compile "com.google.code.findbugs:jsr305:3.0.2"
+ compile "io.github.openfeign:feign-core:$feign_version"
+ compile "io.github.openfeign:feign-jackson:$feign_version"
+ compile "io.github.openfeign:feign-slf4j:$feign_version"
+ compile "io.github.openfeign.form:feign-form:$feign_form_version"
+ compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
+ compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
+ compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
+ compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
+ compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
+ compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
+ compile "com.brsanthu:migbase64:2.2"
+ compile 'javax.annotation:javax.annotation-api:1.3.2'
+ testCompile "junit:junit:$junit_version"
+}
diff --git a/samples/client/petstore/java/feign/build.sbt b/samples/client/petstore/java/feign/build.sbt
new file mode 100644
index 00000000000..7cb8c67a8ba
--- /dev/null
+++ b/samples/client/petstore/java/feign/build.sbt
@@ -0,0 +1,28 @@
+lazy val root = (project in file(".")).
+ settings(
+ organization := "org.openapitools",
+ name := "petstore-feign",
+ version := "1.0.0",
+ scalaVersion := "2.11.4",
+ scalacOptions ++= Seq("-feature"),
+ javacOptions in compile ++= Seq("-Xlint:deprecation"),
+ publishArtifact in (Compile, packageDoc) := false,
+ resolvers += Resolver.mavenLocal,
+ libraryDependencies ++= Seq(
+ "io.swagger" % "swagger-annotations" % "1.5.24" % "compile",
+ "io.github.openfeign" % "feign-core" % "11.0" % "compile",
+ "io.github.openfeign" % "feign-jackson" % "11.0" % "compile",
+ "io.github.openfeign" % "feign-slf4j" % "11.0" % "compile",
+ "io.github.openfeign.form" % "feign-form" % "3.8.0" % "compile",
+ "com.fasterxml.jackson.core" % "jackson-core" % "2.10.3" % "compile",
+ "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.3" % "compile",
+ "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.3" % "compile",
+ "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile",
+ "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile",
+ "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
+ "com.brsanthu" % "migbase64" % "2.2" % "compile",
+ "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile",
+ "junit" % "junit" % "4.13" % "test",
+ "com.novocode" % "junit-interface" % "0.10" % "test"
+ )
+ )
diff --git a/samples/client/petstore/java/feign/feign10x/.gitignore b/samples/client/petstore/java/feign/feign10x/.gitignore
new file mode 100644
index 00000000000..a530464afa1
--- /dev/null
+++ b/samples/client/petstore/java/feign/feign10x/.gitignore
@@ -0,0 +1,21 @@
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# exclude jar for gradle wrapper
+!gradle/wrapper/*.jar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+# build files
+**/target
+target
+.gradle
+build
diff --git a/samples/client/petstore/java/feign10x/.openapi-generator-ignore b/samples/client/petstore/java/feign/feign10x/.openapi-generator-ignore
similarity index 100%
rename from samples/client/petstore/java/feign10x/.openapi-generator-ignore
rename to samples/client/petstore/java/feign/feign10x/.openapi-generator-ignore
diff --git a/samples/client/petstore/java/feign/feign10x/.openapi-generator/FILES b/samples/client/petstore/java/feign/feign10x/.openapi-generator/FILES
new file mode 100644
index 00000000000..1e341310444
--- /dev/null
+++ b/samples/client/petstore/java/feign/feign10x/.openapi-generator/FILES
@@ -0,0 +1,80 @@
+.gitignore
+.travis.yml
+README.md
+api/openapi.yaml
+build.gradle
+build.sbt
+git_push.sh
+gradle.properties
+gradle/wrapper/gradle-wrapper.jar
+gradle/wrapper/gradle-wrapper.properties
+gradlew
+gradlew.bat
+pom.xml
+settings.gradle
+src/main/AndroidManifest.xml
+src/main/java/org/openapitools/client/ApiClient.java
+src/main/java/org/openapitools/client/CustomInstantDeserializer.java
+src/main/java/org/openapitools/client/EncodingUtils.java
+src/main/java/org/openapitools/client/ParamExpander.java
+src/main/java/org/openapitools/client/RFC3339DateFormat.java
+src/main/java/org/openapitools/client/ServerConfiguration.java
+src/main/java/org/openapitools/client/ServerVariable.java
+src/main/java/org/openapitools/client/StringUtil.java
+src/main/java/org/openapitools/client/api/AnotherFakeApi.java
+src/main/java/org/openapitools/client/api/FakeApi.java
+src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
+src/main/java/org/openapitools/client/api/PetApi.java
+src/main/java/org/openapitools/client/api/StoreApi.java
+src/main/java/org/openapitools/client/api/UserApi.java
+src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
+src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
+src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
+src/main/java/org/openapitools/client/auth/OAuth.java
+src/main/java/org/openapitools/client/auth/OAuthFlow.java
+src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
+src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
+src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
+src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
+src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
+src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
+src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
+src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
+src/main/java/org/openapitools/client/model/Animal.java
+src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+src/main/java/org/openapitools/client/model/ArrayTest.java
+src/main/java/org/openapitools/client/model/BigCat.java
+src/main/java/org/openapitools/client/model/BigCatAllOf.java
+src/main/java/org/openapitools/client/model/Capitalization.java
+src/main/java/org/openapitools/client/model/Cat.java
+src/main/java/org/openapitools/client/model/CatAllOf.java
+src/main/java/org/openapitools/client/model/Category.java
+src/main/java/org/openapitools/client/model/ClassModel.java
+src/main/java/org/openapitools/client/model/Client.java
+src/main/java/org/openapitools/client/model/Dog.java
+src/main/java/org/openapitools/client/model/DogAllOf.java
+src/main/java/org/openapitools/client/model/EnumArrays.java
+src/main/java/org/openapitools/client/model/EnumClass.java
+src/main/java/org/openapitools/client/model/EnumTest.java
+src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+src/main/java/org/openapitools/client/model/FormatTest.java
+src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+src/main/java/org/openapitools/client/model/MapTest.java
+src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+src/main/java/org/openapitools/client/model/Model200Response.java
+src/main/java/org/openapitools/client/model/ModelApiResponse.java
+src/main/java/org/openapitools/client/model/ModelReturn.java
+src/main/java/org/openapitools/client/model/Name.java
+src/main/java/org/openapitools/client/model/NumberOnly.java
+src/main/java/org/openapitools/client/model/Order.java
+src/main/java/org/openapitools/client/model/OuterComposite.java
+src/main/java/org/openapitools/client/model/OuterEnum.java
+src/main/java/org/openapitools/client/model/Pet.java
+src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+src/main/java/org/openapitools/client/model/SpecialModelName.java
+src/main/java/org/openapitools/client/model/Tag.java
+src/main/java/org/openapitools/client/model/TypeHolderDefault.java
+src/main/java/org/openapitools/client/model/TypeHolderExample.java
+src/main/java/org/openapitools/client/model/User.java
+src/main/java/org/openapitools/client/model/XmlItem.java
diff --git a/samples/client/petstore/java/feign/feign10x/.openapi-generator/VERSION b/samples/client/petstore/java/feign/feign10x/.openapi-generator/VERSION
new file mode 100644
index 00000000000..d99e7162d01
--- /dev/null
+++ b/samples/client/petstore/java/feign/feign10x/.openapi-generator/VERSION
@@ -0,0 +1 @@
+5.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/feign10x/.travis.yml b/samples/client/petstore/java/feign/feign10x/.travis.yml
new file mode 100644
index 00000000000..e3bdf2af1be
--- /dev/null
+++ b/samples/client/petstore/java/feign/feign10x/.travis.yml
@@ -0,0 +1,22 @@
+#
+# Generated by OpenAPI Generator: https://openapi-generator.tech
+#
+# Ref: https://docs.travis-ci.com/user/languages/java/
+#
+language: java
+jdk:
+ - openjdk12
+ - openjdk11
+ - openjdk10
+ - openjdk9
+ - openjdk8
+before_install:
+ # ensure gradlew has proper permission
+ - chmod a+x ./gradlew
+script:
+ # test using maven
+ #- mvn test
+ # test using gradle
+ - gradle test
+ # test using sbt
+ # - sbt test
diff --git a/samples/client/petstore/java/feign10x/README.md b/samples/client/petstore/java/feign/feign10x/README.md
similarity index 100%
rename from samples/client/petstore/java/feign10x/README.md
rename to samples/client/petstore/java/feign/feign10x/README.md
diff --git a/samples/client/petstore/java/feign/feign10x/api/openapi.yaml b/samples/client/petstore/java/feign/feign10x/api/openapi.yaml
new file mode 100644
index 00000000000..a49359fd348
--- /dev/null
+++ b/samples/client/petstore/java/feign/feign10x/api/openapi.yaml
@@ -0,0 +1,2187 @@
+openapi: 3.0.1
+info:
+ description: 'This spec is mainly for testing Petstore server and contains fake
+ endpoints, models. Please do not use this for any other purpose. Special characters:
+ " \'
+ license:
+ name: Apache-2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+ title: OpenAPI Petstore
+ version: 1.0.0
+servers:
+- url: http://petstore.swagger.io:80/v2
+tags:
+- description: Everything about your Pets
+ name: pet
+- description: Access to Petstore orders
+ name: store
+- description: Operations about user
+ name: user
+paths:
+ /pet:
+ post:
+ operationId: addPet
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: Pet object that needs to be added to the store
+ required: true
+ responses:
+ "200":
+ content: {}
+ description: successful operation
+ "405":
+ content: {}
+ description: Invalid input
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Add a new pet to the store
+ tags:
+ - pet
+ x-codegen-request-body-name: body
+ x-contentType: application/json
+ x-accepts: application/json
+ put:
+ operationId: updatePet
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: Pet object that needs to be added to the store
+ required: true
+ responses:
+ "200":
+ content: {}
+ description: successful operation
+ "400":
+ content: {}
+ description: Invalid ID supplied
+ "404":
+ content: {}
+ description: Pet not found
+ "405":
+ content: {}
+ description: Validation exception
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Update an existing pet
+ tags:
+ - pet
+ x-codegen-request-body-name: body
+ x-contentType: application/json
+ x-accepts: application/json
+ /pet/findByStatus:
+ get:
+ description: Multiple status values can be provided with comma separated strings
+ operationId: findPetsByStatus
+ parameters:
+ - description: Status values that need to be considered for filter
+ explode: false
+ in: query
+ name: status
+ required: true
+ schema:
+ items:
+ default: available
+ enum:
+ - available
+ - pending
+ - sold
+ type: string
+ type: array
+ style: form
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ description: successful operation
+ "400":
+ content: {}
+ description: Invalid status value
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Finds Pets by status
+ tags:
+ - pet
+ x-accepts: application/json
+ /pet/findByTags:
+ get:
+ deprecated: true
+ description: Multiple tags can be provided with comma separated strings. Use
+ tag1, tag2, tag3 for testing.
+ operationId: findPetsByTags
+ parameters:
+ - description: Tags to filter by
+ explode: false
+ in: query
+ name: tags
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ uniqueItems: true
+ style: form
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ uniqueItems: true
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ uniqueItems: true
+ description: successful operation
+ "400":
+ content: {}
+ description: Invalid tag value
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Finds Pets by tags
+ tags:
+ - pet
+ x-accepts: application/json
+ /pet/{petId}:
+ delete:
+ operationId: deletePet
+ parameters:
+ - in: header
+ name: api_key
+ schema:
+ type: string
+ - description: Pet id to delete
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ responses:
+ "200":
+ content: {}
+ description: successful operation
+ "400":
+ content: {}
+ description: Invalid pet value
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Deletes a pet
+ tags:
+ - pet
+ x-accepts: application/json
+ get:
+ description: Returns a single pet
+ operationId: getPetById
+ parameters:
+ - description: ID of pet to return
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: successful operation
+ "400":
+ content: {}
+ description: Invalid ID supplied
+ "404":
+ content: {}
+ description: Pet not found
+ security:
+ - api_key: []
+ summary: Find pet by ID
+ tags:
+ - pet
+ x-accepts: application/json
+ post:
+ operationId: updatePetWithForm
+ parameters:
+ - description: ID of pet that needs to be updated
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ properties:
+ name:
+ description: Updated name of the pet
+ type: string
+ status:
+ description: Updated status of the pet
+ type: string
+ responses:
+ "405":
+ content: {}
+ description: Invalid input
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Updates a pet in the store with form data
+ tags:
+ - pet
+ x-contentType: application/x-www-form-urlencoded
+ x-accepts: application/json
+ /pet/{petId}/uploadImage:
+ post:
+ operationId: uploadFile
+ parameters:
+ - description: ID of pet to update
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image
+ tags:
+ - pet
+ x-contentType: multipart/form-data
+ x-accepts: application/json
+ /store/inventory:
+ get:
+ description: Returns a map of status codes to quantities
+ operationId: getInventory
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ format: int32
+ type: integer
+ type: object
+ description: successful operation
+ security:
+ - api_key: []
+ summary: Returns pet inventories by status
+ tags:
+ - store
+ x-accepts: application/json
+ /store/order:
+ post:
+ operationId: placeOrder
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: order placed for purchasing the pet
+ required: true
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Order'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: successful operation
+ "400":
+ content: {}
+ description: Invalid Order
+ summary: Place an order for a pet
+ tags:
+ - store
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: application/json
+ /store/order/{order_id}:
+ delete:
+ description: For valid response try integer IDs with value < 1000. Anything
+ above 1000 or nonintegers will generate API errors
+ operationId: deleteOrder
+ parameters:
+ - description: ID of the order that needs to be deleted
+ in: path
+ name: order_id
+ required: true
+ schema:
+ type: string
+ responses:
+ "400":
+ content: {}
+ description: Invalid ID supplied
+ "404":
+ content: {}
+ description: Order not found
+ summary: Delete purchase order by ID
+ tags:
+ - store
+ x-accepts: application/json
+ get:
+ description: For valid response try integer IDs with value <= 5 or > 10. Other
+ values will generated exceptions
+ operationId: getOrderById
+ parameters:
+ - description: ID of pet that needs to be fetched
+ in: path
+ name: order_id
+ required: true
+ schema:
+ format: int64
+ maximum: 5
+ minimum: 1
+ type: integer
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Order'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: successful operation
+ "400":
+ content: {}
+ description: Invalid ID supplied
+ "404":
+ content: {}
+ description: Order not found
+ summary: Find purchase order by ID
+ tags:
+ - store
+ x-accepts: application/json
+ /user:
+ post:
+ description: This can only be done by the logged in user.
+ operationId: createUser
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/User'
+ description: Created user object
+ required: true
+ responses:
+ default:
+ content: {}
+ description: successful operation
+ summary: Create user
+ tags:
+ - user
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: application/json
+ /user/createWithArray:
+ post:
+ operationId: createUsersWithArrayInput
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ items:
+ $ref: '#/components/schemas/User'
+ type: array
+ description: List of user object
+ required: true
+ responses:
+ default:
+ content: {}
+ description: successful operation
+ summary: Creates list of users with given input array
+ tags:
+ - user
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: application/json
+ /user/createWithList:
+ post:
+ operationId: createUsersWithListInput
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ items:
+ $ref: '#/components/schemas/User'
+ type: array
+ description: List of user object
+ required: true
+ responses:
+ default:
+ content: {}
+ description: successful operation
+ summary: Creates list of users with given input array
+ tags:
+ - user
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: application/json
+ /user/login:
+ get:
+ operationId: loginUser
+ parameters:
+ - description: The user name for login
+ in: query
+ name: username
+ required: true
+ schema:
+ type: string
+ - description: The password for login in clear text
+ in: query
+ name: password
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ type: string
+ application/json:
+ schema:
+ type: string
+ description: successful operation
+ headers:
+ X-Rate-Limit:
+ description: calls per hour allowed by the user
+ schema:
+ format: int32
+ type: integer
+ X-Expires-After:
+ description: date in UTC when token expires
+ schema:
+ format: date-time
+ type: string
+ "400":
+ content: {}
+ description: Invalid username/password supplied
+ summary: Logs user into the system
+ tags:
+ - user
+ x-accepts: application/json
+ /user/logout:
+ get:
+ operationId: logoutUser
+ responses:
+ default:
+ content: {}
+ description: successful operation
+ summary: Logs out current logged in user session
+ tags:
+ - user
+ x-accepts: application/json
+ /user/{username}:
+ delete:
+ description: This can only be done by the logged in user.
+ operationId: deleteUser
+ parameters:
+ - description: The name that needs to be deleted
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ responses:
+ "400":
+ content: {}
+ description: Invalid username supplied
+ "404":
+ content: {}
+ description: User not found
+ summary: Delete user
+ tags:
+ - user
+ x-accepts: application/json
+ get:
+ operationId: getUserByName
+ parameters:
+ - description: The name that needs to be fetched. Use user1 for testing.
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/User'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ description: successful operation
+ "400":
+ content: {}
+ description: Invalid username supplied
+ "404":
+ content: {}
+ description: User not found
+ summary: Get user by user name
+ tags:
+ - user
+ x-accepts: application/json
+ put:
+ description: This can only be done by the logged in user.
+ operationId: updateUser
+ parameters:
+ - description: name that need to be deleted
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/User'
+ description: Updated user object
+ required: true
+ responses:
+ "400":
+ content: {}
+ description: Invalid user supplied
+ "404":
+ content: {}
+ description: User not found
+ summary: Updated user
+ tags:
+ - user
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: application/json
+ /fake_classname_test:
+ patch:
+ description: To test class name in snake case
+ operationId: testClassname
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: client model
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ security:
+ - api_key_query: []
+ summary: To test class name in snake case
+ tags:
+ - fake_classname_tags 123#$%^
+ x-codegen-request-body-name: body
+ x-contentType: application/json
+ x-accepts: application/json
+ /fake:
+ delete:
+ description: Fake endpoint to test group parameters (optional)
+ operationId: testGroupParameters
+ parameters:
+ - description: Required String in group parameters
+ in: query
+ name: required_string_group
+ required: true
+ schema:
+ type: integer
+ - description: Required Boolean in group parameters
+ in: header
+ name: required_boolean_group
+ required: true
+ schema:
+ type: boolean
+ - description: Required Integer in group parameters
+ in: query
+ name: required_int64_group
+ required: true
+ schema:
+ format: int64
+ type: integer
+ - description: String in group parameters
+ in: query
+ name: string_group
+ schema:
+ type: integer
+ - description: Boolean in group parameters
+ in: header
+ name: boolean_group
+ schema:
+ type: boolean
+ - description: Integer in group parameters
+ in: query
+ name: int64_group
+ schema:
+ format: int64
+ type: integer
+ responses:
+ "400":
+ content: {}
+ description: Someting wrong
+ summary: Fake endpoint to test group parameters (optional)
+ tags:
+ - fake
+ x-group-parameters: true
+ x-accepts: application/json
+ get:
+ description: To test enum parameters
+ operationId: testEnumParameters
+ parameters:
+ - description: Header parameter enum test (string array)
+ explode: false
+ in: header
+ name: enum_header_string_array
+ schema:
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ style: simple
+ - description: Header parameter enum test (string)
+ in: header
+ name: enum_header_string
+ schema:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ - description: Query parameter enum test (string array)
+ explode: false
+ in: query
+ name: enum_query_string_array
+ schema:
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ style: form
+ - description: Query parameter enum test (string)
+ in: query
+ name: enum_query_string
+ schema:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ - description: Query parameter enum test (double)
+ in: query
+ name: enum_query_integer
+ schema:
+ enum:
+ - 1
+ - -2
+ format: int32
+ type: integer
+ - description: Query parameter enum test (double)
+ in: query
+ name: enum_query_double
+ schema:
+ enum:
+ - 1.1
+ - -1.2
+ format: double
+ type: number
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ properties:
+ enum_form_string_array:
+ description: Form parameter enum test (string array)
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ enum_form_string:
+ default: -efg
+ description: Form parameter enum test (string)
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ responses:
+ "400":
+ content: {}
+ description: Invalid request
+ "404":
+ content: {}
+ description: Not found
+ summary: To test enum parameters
+ tags:
+ - fake
+ x-contentType: application/x-www-form-urlencoded
+ x-accepts: application/json
+ patch:
+ description: To test "client" model
+ operationId: testClientModel
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: client model
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ summary: To test "client" model
+ tags:
+ - fake
+ x-codegen-request-body-name: body
+ x-contentType: application/json
+ x-accepts: application/json
+ post:
+ description: |-
+ Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ operationId: testEndpointParameters
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ properties:
+ integer:
+ description: None
+ format: int32
+ maximum: 100
+ minimum: 10
+ type: integer
+ int32:
+ description: None
+ format: int32
+ maximum: 200
+ minimum: 20
+ type: integer
+ int64:
+ description: None
+ format: int64
+ type: integer
+ number:
+ description: None
+ maximum: 543.2
+ minimum: 32.1
+ type: number
+ float:
+ description: None
+ format: float
+ maximum: 987.6
+ type: number
+ double:
+ description: None
+ format: double
+ maximum: 123.4
+ minimum: 67.8
+ type: number
+ string:
+ description: None
+ pattern: /[a-z]/i
+ type: string
+ pattern_without_delimiter:
+ description: None
+ pattern: ^[A-Z].*
+ type: string
+ byte:
+ description: None
+ format: byte
+ type: string
+ binary:
+ description: None
+ format: binary
+ type: string
+ date:
+ description: None
+ format: date
+ type: string
+ dateTime:
+ description: None
+ format: date-time
+ type: string
+ password:
+ description: None
+ format: password
+ maxLength: 64
+ minLength: 10
+ type: string
+ callback:
+ description: None
+ type: string
+ required:
+ - byte
+ - double
+ - number
+ - pattern_without_delimiter
+ required: true
+ responses:
+ "400":
+ content: {}
+ description: Invalid username supplied
+ "404":
+ content: {}
+ description: User not found
+ security:
+ - http_basic_test: []
+ summary: |-
+ Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ tags:
+ - fake
+ x-contentType: application/x-www-form-urlencoded
+ x-accepts: application/json
+ /fake/outer/number:
+ post:
+ description: Test serialization of outer number types
+ operationId: fakeOuterNumberSerialize
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterNumber'
+ description: Input number as post body
+ required: false
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterNumber'
+ description: Output number
+ tags:
+ - fake
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: '*/*'
+ /fake/outer/string:
+ post:
+ description: Test serialization of outer string types
+ operationId: fakeOuterStringSerialize
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterString'
+ description: Input string as post body
+ required: false
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterString'
+ description: Output string
+ tags:
+ - fake
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: '*/*'
+ /fake/outer/boolean:
+ post:
+ description: Test serialization of outer boolean types
+ operationId: fakeOuterBooleanSerialize
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterBoolean'
+ description: Input boolean as post body
+ required: false
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterBoolean'
+ description: Output boolean
+ tags:
+ - fake
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: '*/*'
+ /fake/outer/composite:
+ post:
+ description: Test serialization of object with outer number type
+ operationId: fakeOuterCompositeSerialize
+ requestBody:
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterComposite'
+ description: Input composite as post body
+ required: false
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterComposite'
+ description: Output composite
+ tags:
+ - fake
+ x-codegen-request-body-name: body
+ x-contentType: '*/*'
+ x-accepts: '*/*'
+ /fake/jsonFormData:
+ get:
+ operationId: testJsonFormData
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ properties:
+ param:
+ description: field1
+ type: string
+ param2:
+ description: field2
+ type: string
+ required:
+ - param
+ - param2
+ required: true
+ responses:
+ "200":
+ content: {}
+ description: successful operation
+ summary: test json serialization of form data
+ tags:
+ - fake
+ x-contentType: application/x-www-form-urlencoded
+ x-accepts: application/json
+ /fake/inline-additionalProperties:
+ post:
+ operationId: testInlineAdditionalProperties
+ requestBody:
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ type: string
+ type: object
+ description: request body
+ required: true
+ responses:
+ "200":
+ content: {}
+ description: successful operation
+ summary: test inline additionalProperties
+ tags:
+ - fake
+ x-codegen-request-body-name: param
+ x-contentType: application/json
+ x-accepts: application/json
+ /fake/body-with-query-params:
+ put:
+ operationId: testBodyWithQueryParams
+ parameters:
+ - in: query
+ name: query
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ required: true
+ responses:
+ "200":
+ content: {}
+ description: Success
+ tags:
+ - fake
+ x-codegen-request-body-name: body
+ x-contentType: application/json
+ x-accepts: application/json
+ /fake/create_xml_item:
+ post:
+ description: this route creates an XmlItem
+ operationId: createXmlItem
+ requestBody:
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/XmlItem'
+ application/xml; charset=utf-8:
+ schema:
+ $ref: '#/components/schemas/XmlItem'
+ application/xml; charset=utf-16:
+ schema:
+ $ref: '#/components/schemas/XmlItem'
+ text/xml:
+ schema:
+ $ref: '#/components/schemas/XmlItem'
+ text/xml; charset=utf-8:
+ schema:
+ $ref: '#/components/schemas/XmlItem'
+ text/xml; charset=utf-16:
+ schema:
+ $ref: '#/components/schemas/XmlItem'
+ description: XmlItem Body
+ required: true
+ responses:
+ "200":
+ content: {}
+ description: successful operation
+ summary: creates an XmlItem
+ tags:
+ - fake
+ x-codegen-request-body-name: XmlItem
+ x-contentType: application/xml
+ x-accepts: application/json
+ /another-fake/dummy:
+ patch:
+ description: To test special tags and operation ID starting with number
+ operationId: 123_test_@#$%_special_tags
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: client model
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ summary: To test special tags
+ tags:
+ - $another-fake?
+ x-codegen-request-body-name: body
+ x-contentType: application/json
+ x-accepts: application/json
+ /fake/body-with-file-schema:
+ put:
+ description: For this test, the body for this request much reference a schema
+ named `File`.
+ operationId: testBodyWithFileSchema
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FileSchemaTestClass'
+ required: true
+ responses:
+ "200":
+ content: {}
+ description: Success
+ tags:
+ - fake
+ x-codegen-request-body-name: body
+ x-contentType: application/json
+ x-accepts: application/json
+ /fake/test-query-paramters:
+ put:
+ description: To test the collection format in query parameters
+ operationId: testQueryParameterCollectionFormat
+ parameters:
+ - explode: false
+ in: query
+ name: pipe
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - in: query
+ name: ioutil
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ - in: query
+ name: http
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: spaceDelimited
+ - explode: false
+ in: query
+ name: url
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: true
+ in: query
+ name: context
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ responses:
+ "200":
+ content: {}
+ description: Success
+ tags:
+ - fake
+ x-accepts: application/json
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ requiredFile:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - requiredFile
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image (required)
+ tags:
+ - pet
+ x-contentType: multipart/form-data
+ x-accepts: application/json
+components:
+ schemas:
+ Order:
+ example:
+ petId: 6
+ quantity: 1
+ id: 0
+ shipDate: 2000-01-23T04:56:07.000+00:00
+ complete: false
+ status: placed
+ properties:
+ id:
+ format: int64
+ type: integer
+ petId:
+ format: int64
+ type: integer
+ quantity:
+ format: int32
+ type: integer
+ shipDate:
+ format: date-time
+ type: string
+ status:
+ description: Order Status
+ enum:
+ - placed
+ - approved
+ - delivered
+ type: string
+ complete:
+ default: false
+ type: boolean
+ type: object
+ xml:
+ name: Order
+ Category:
+ example:
+ name: default-name
+ id: 6
+ properties:
+ id:
+ format: int64
+ type: integer
+ name:
+ default: default-name
+ type: string
+ required:
+ - name
+ type: object
+ xml:
+ name: Category
+ User:
+ example:
+ firstName: firstName
+ lastName: lastName
+ password: password
+ userStatus: 6
+ phone: phone
+ id: 0
+ email: email
+ username: username
+ properties:
+ id:
+ format: int64
+ type: integer
+ x-is-unique: true
+ username:
+ type: string
+ firstName:
+ type: string
+ lastName:
+ type: string
+ email:
+ type: string
+ password:
+ type: string
+ phone:
+ type: string
+ userStatus:
+ description: User Status
+ format: int32
+ type: integer
+ type: object
+ xml:
+ name: User
+ Tag:
+ example:
+ name: name
+ id: 1
+ properties:
+ id:
+ format: int64
+ type: integer
+ name:
+ type: string
+ type: object
+ xml:
+ name: Tag
+ Pet:
+ example:
+ photoUrls:
+ - photoUrls
+ - photoUrls
+ name: doggie
+ id: 0
+ category:
+ name: default-name
+ id: 6
+ tags:
+ - name: name
+ id: 1
+ - name: name
+ id: 1
+ status: available
+ properties:
+ id:
+ format: int64
+ type: integer
+ x-is-unique: true
+ category:
+ $ref: '#/components/schemas/Category'
+ name:
+ example: doggie
+ type: string
+ photoUrls:
+ items:
+ type: string
+ type: array
+ uniqueItems: true
+ xml:
+ name: photoUrl
+ wrapped: true
+ tags:
+ items:
+ $ref: '#/components/schemas/Tag'
+ type: array
+ xml:
+ name: tag
+ wrapped: true
+ status:
+ description: pet status in the store
+ enum:
+ - available
+ - pending
+ - sold
+ type: string
+ required:
+ - name
+ - photoUrls
+ type: object
+ xml:
+ name: Pet
+ ApiResponse:
+ example:
+ code: 0
+ type: type
+ message: message
+ properties:
+ code:
+ format: int32
+ type: integer
+ type:
+ type: string
+ message:
+ type: string
+ type: object
+ $special[model.name]:
+ properties:
+ $special[property.name]:
+ format: int64
+ type: integer
+ type: object
+ xml:
+ name: $special[model.name]
+ Return:
+ description: Model for testing reserved words
+ properties:
+ return:
+ format: int32
+ type: integer
+ type: object
+ xml:
+ name: Return
+ Name:
+ description: Model for testing model name same as property name
+ properties:
+ name:
+ format: int32
+ type: integer
+ snake_case:
+ format: int32
+ readOnly: true
+ type: integer
+ property:
+ type: string
+ "123Number":
+ readOnly: true
+ type: integer
+ required:
+ - name
+ type: object
+ xml:
+ name: Name
+ "200_response":
+ description: Model for testing model name starting with number
+ properties:
+ name:
+ format: int32
+ type: integer
+ class:
+ type: string
+ type: object
+ xml:
+ name: Name
+ ClassModel:
+ description: Model for testing model with "_class" property
+ properties:
+ _class:
+ type: string
+ type: object
+ Dog:
+ allOf:
+ - $ref: '#/components/schemas/Animal'
+ - $ref: '#/components/schemas/Dog_allOf'
+ Cat:
+ allOf:
+ - $ref: '#/components/schemas/Animal'
+ - $ref: '#/components/schemas/Cat_allOf'
+ BigCat:
+ allOf:
+ - $ref: '#/components/schemas/Cat'
+ - $ref: '#/components/schemas/BigCat_allOf'
+ Animal:
+ discriminator:
+ propertyName: className
+ properties:
+ className:
+ type: string
+ color:
+ default: red
+ type: string
+ required:
+ - className
+ type: object
+ AnimalFarm:
+ items:
+ $ref: '#/components/schemas/Animal'
+ type: array
+ format_test:
+ properties:
+ integer:
+ maximum: 1E+2
+ minimum: 1E+1
+ type: integer
+ int32:
+ format: int32
+ maximum: 2E+2
+ minimum: 2E+1
+ type: integer
+ int64:
+ format: int64
+ type: integer
+ number:
+ maximum: 543.2
+ minimum: 32.1
+ type: number
+ float:
+ format: float
+ maximum: 987.6
+ minimum: 54.3
+ type: number
+ double:
+ format: double
+ maximum: 123.4
+ minimum: 67.8
+ type: number
+ string:
+ pattern: /[a-z]/i
+ type: string
+ byte:
+ format: byte
+ pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
+ type: string
+ binary:
+ format: binary
+ type: string
+ date:
+ format: date
+ type: string
+ dateTime:
+ format: date-time
+ type: string
+ uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ type: string
+ password:
+ format: password
+ maxLength: 64
+ minLength: 10
+ type: string
+ BigDecimal:
+ format: number
+ type: string
+ required:
+ - byte
+ - date
+ - number
+ - password
+ type: object
+ EnumClass:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ Enum_Test:
+ properties:
+ enum_string:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ type: string
+ enum_string_required:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ type: string
+ enum_integer:
+ enum:
+ - 1
+ - -1
+ format: int32
+ type: integer
+ enum_number:
+ enum:
+ - 1.1
+ - -1.2
+ format: double
+ type: number
+ outerEnum:
+ $ref: '#/components/schemas/OuterEnum'
+ required:
+ - enum_string_required
+ type: object
+ AdditionalPropertiesClass:
+ properties:
+ map_string:
+ additionalProperties:
+ type: string
+ type: object
+ map_number:
+ additionalProperties:
+ type: number
+ type: object
+ map_integer:
+ additionalProperties:
+ type: integer
+ type: object
+ map_boolean:
+ additionalProperties:
+ type: boolean
+ type: object
+ map_array_integer:
+ additionalProperties:
+ items:
+ type: integer
+ type: array
+ type: object
+ map_array_anytype:
+ additionalProperties:
+ items:
+ properties: {}
+ type: object
+ type: array
+ type: object
+ map_map_string:
+ additionalProperties:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ map_map_anytype:
+ additionalProperties:
+ additionalProperties:
+ properties: {}
+ type: object
+ type: object
+ type: object
+ anytype_1:
+ properties: {}
+ type: object
+ anytype_2:
+ type: object
+ anytype_3:
+ properties: {}
+ type: object
+ type: object
+ AdditionalPropertiesString:
+ additionalProperties:
+ type: string
+ properties:
+ name:
+ type: string
+ type: object
+ AdditionalPropertiesInteger:
+ additionalProperties:
+ type: integer
+ properties:
+ name:
+ type: string
+ type: object
+ AdditionalPropertiesNumber:
+ additionalProperties:
+ type: number
+ properties:
+ name:
+ type: string
+ type: object
+ AdditionalPropertiesBoolean:
+ additionalProperties:
+ type: boolean
+ properties:
+ name:
+ type: string
+ type: object
+ AdditionalPropertiesArray:
+ additionalProperties:
+ items:
+ properties: {}
+ type: object
+ type: array
+ properties:
+ name:
+ type: string
+ type: object
+ AdditionalPropertiesObject:
+ additionalProperties:
+ additionalProperties:
+ properties: {}
+ type: object
+ type: object
+ properties:
+ name:
+ type: string
+ type: object
+ AdditionalPropertiesAnyType:
+ additionalProperties:
+ properties: {}
+ type: object
+ properties:
+ name:
+ type: string
+ type: object
+ MixedPropertiesAndAdditionalPropertiesClass:
+ properties:
+ uuid:
+ format: uuid
+ type: string
+ dateTime:
+ format: date-time
+ type: string
+ map:
+ additionalProperties:
+ $ref: '#/components/schemas/Animal'
+ type: object
+ type: object
+ List:
+ properties:
+ "123-list":
+ type: string
+ type: object
+ Client:
+ example:
+ client: client
+ properties:
+ client:
+ type: string
+ type: object
+ ReadOnlyFirst:
+ properties:
+ bar:
+ readOnly: true
+ type: string
+ baz:
+ type: string
+ type: object
+ hasOnlyReadOnly:
+ properties:
+ bar:
+ readOnly: true
+ type: string
+ foo:
+ readOnly: true
+ type: string
+ type: object
+ Capitalization:
+ properties:
+ smallCamel:
+ type: string
+ CapitalCamel:
+ type: string
+ small_Snake:
+ type: string
+ Capital_Snake:
+ type: string
+ SCA_ETH_Flow_Points:
+ type: string
+ ATT_NAME:
+ description: |
+ Name of the pet
+ type: string
+ type: object
+ MapTest:
+ properties:
+ map_map_of_string:
+ additionalProperties:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ map_of_enum_string:
+ additionalProperties:
+ enum:
+ - UPPER
+ - lower
+ type: string
+ type: object
+ direct_map:
+ additionalProperties:
+ type: boolean
+ type: object
+ indirect_map:
+ additionalProperties:
+ type: boolean
+ type: object
+ type: object
+ ArrayTest:
+ properties:
+ array_of_string:
+ items:
+ type: string
+ type: array
+ array_array_of_integer:
+ items:
+ items:
+ format: int64
+ type: integer
+ type: array
+ type: array
+ array_array_of_model:
+ items:
+ items:
+ $ref: '#/components/schemas/ReadOnlyFirst'
+ type: array
+ type: array
+ type: object
+ NumberOnly:
+ properties:
+ JustNumber:
+ type: number
+ type: object
+ ArrayOfNumberOnly:
+ properties:
+ ArrayNumber:
+ items:
+ type: number
+ type: array
+ type: object
+ ArrayOfArrayOfNumberOnly:
+ properties:
+ ArrayArrayNumber:
+ items:
+ items:
+ type: number
+ type: array
+ type: array
+ type: object
+ EnumArrays:
+ properties:
+ just_symbol:
+ enum:
+ - '>='
+ - $
+ type: string
+ array_enum:
+ items:
+ enum:
+ - fish
+ - crab
+ type: string
+ type: array
+ type: object
+ OuterEnum:
+ enum:
+ - placed
+ - approved
+ - delivered
+ type: string
+ OuterComposite:
+ example:
+ my_string: my_string
+ my_number: 0.8008281904610115
+ my_boolean: true
+ properties:
+ my_number:
+ type: number
+ my_string:
+ type: string
+ my_boolean:
+ type: boolean
+ x-codegen-body-parameter-name: boolean_post_body
+ type: object
+ OuterNumber:
+ type: number
+ OuterString:
+ type: string
+ OuterBoolean:
+ type: boolean
+ x-codegen-body-parameter-name: boolean_post_body
+ StringBooleanMap:
+ additionalProperties:
+ type: boolean
+ type: object
+ FileSchemaTestClass:
+ example:
+ file:
+ sourceURI: sourceURI
+ files:
+ - sourceURI: sourceURI
+ - sourceURI: sourceURI
+ properties:
+ file:
+ $ref: '#/components/schemas/File'
+ files:
+ items:
+ $ref: '#/components/schemas/File'
+ type: array
+ type: object
+ File:
+ description: Must be named `File` for test.
+ example:
+ sourceURI: sourceURI
+ properties:
+ sourceURI:
+ description: Test capitalization
+ type: string
+ type: object
+ TypeHolderDefault:
+ properties:
+ string_item:
+ default: what
+ type: string
+ number_item:
+ type: number
+ integer_item:
+ type: integer
+ bool_item:
+ default: true
+ type: boolean
+ array_item:
+ items:
+ type: integer
+ type: array
+ required:
+ - array_item
+ - bool_item
+ - integer_item
+ - number_item
+ - string_item
+ type: object
+ TypeHolderExample:
+ properties:
+ string_item:
+ example: what
+ type: string
+ number_item:
+ example: 1.234
+ type: number
+ float_item:
+ example: 1.234
+ format: float
+ type: number
+ integer_item:
+ example: -2
+ type: integer
+ bool_item:
+ example: true
+ type: boolean
+ array_item:
+ example:
+ - 0
+ - 1
+ - 2
+ - 3
+ items:
+ type: integer
+ type: array
+ required:
+ - array_item
+ - bool_item
+ - float_item
+ - integer_item
+ - number_item
+ - string_item
+ type: object
+ XmlItem:
+ properties:
+ attribute_string:
+ example: string
+ type: string
+ xml:
+ attribute: true
+ attribute_number:
+ example: 1.234
+ type: number
+ xml:
+ attribute: true
+ attribute_integer:
+ example: -2
+ type: integer
+ xml:
+ attribute: true
+ attribute_boolean:
+ example: true
+ type: boolean
+ xml:
+ attribute: true
+ wrapped_array:
+ items:
+ type: integer
+ type: array
+ xml:
+ wrapped: true
+ name_string:
+ example: string
+ type: string
+ xml:
+ name: xml_name_string
+ name_number:
+ example: 1.234
+ type: number
+ xml:
+ name: xml_name_number
+ name_integer:
+ example: -2
+ type: integer
+ xml:
+ name: xml_name_integer
+ name_boolean:
+ example: true
+ type: boolean
+ xml:
+ name: xml_name_boolean
+ name_array:
+ items:
+ type: integer
+ xml:
+ name: xml_name_array_item
+ type: array
+ name_wrapped_array:
+ items:
+ type: integer
+ xml:
+ name: xml_name_wrapped_array_item
+ type: array
+ xml:
+ name: xml_name_wrapped_array
+ wrapped: true
+ prefix_string:
+ example: string
+ type: string
+ xml:
+ prefix: ab
+ prefix_number:
+ example: 1.234
+ type: number
+ xml:
+ prefix: cd
+ prefix_integer:
+ example: -2
+ type: integer
+ xml:
+ prefix: ef
+ prefix_boolean:
+ example: true
+ type: boolean
+ xml:
+ prefix: gh
+ prefix_array:
+ items:
+ type: integer
+ xml:
+ prefix: ij
+ type: array
+ prefix_wrapped_array:
+ items:
+ type: integer
+ xml:
+ prefix: mn
+ type: array
+ xml:
+ prefix: kl
+ wrapped: true
+ namespace_string:
+ example: string
+ type: string
+ xml:
+ namespace: http://a.com/schema
+ namespace_number:
+ example: 1.234
+ type: number
+ xml:
+ namespace: http://b.com/schema
+ namespace_integer:
+ example: -2
+ type: integer
+ xml:
+ namespace: http://c.com/schema
+ namespace_boolean:
+ example: true
+ type: boolean
+ xml:
+ namespace: http://d.com/schema
+ namespace_array:
+ items:
+ type: integer
+ xml:
+ namespace: http://e.com/schema
+ type: array
+ namespace_wrapped_array:
+ items:
+ type: integer
+ xml:
+ namespace: http://g.com/schema
+ type: array
+ xml:
+ namespace: http://f.com/schema
+ wrapped: true
+ prefix_ns_string:
+ example: string
+ type: string
+ xml:
+ namespace: http://a.com/schema
+ prefix: a
+ prefix_ns_number:
+ example: 1.234
+ type: number
+ xml:
+ namespace: http://b.com/schema
+ prefix: b
+ prefix_ns_integer:
+ example: -2
+ type: integer
+ xml:
+ namespace: http://c.com/schema
+ prefix: c
+ prefix_ns_boolean:
+ example: true
+ type: boolean
+ xml:
+ namespace: http://d.com/schema
+ prefix: d
+ prefix_ns_array:
+ items:
+ type: integer
+ xml:
+ namespace: http://e.com/schema
+ prefix: e
+ type: array
+ prefix_ns_wrapped_array:
+ items:
+ type: integer
+ xml:
+ namespace: http://g.com/schema
+ prefix: g
+ type: array
+ xml:
+ namespace: http://f.com/schema
+ prefix: f
+ wrapped: true
+ type: object
+ xml:
+ namespace: http://a.com/schema
+ prefix: pre
+ Dog_allOf:
+ properties:
+ breed:
+ type: string
+ Cat_allOf:
+ properties:
+ declawed:
+ type: boolean
+ BigCat_allOf:
+ properties:
+ kind:
+ enum:
+ - lions
+ - tigers
+ - leopards
+ - jaguars
+ type: string
+ securitySchemes:
+ petstore_auth:
+ flows:
+ implicit:
+ authorizationUrl: http://petstore.swagger.io/api/oauth/dialog
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ type: oauth2
+ api_key:
+ in: header
+ name: api_key
+ type: apiKey
+ api_key_query:
+ in: query
+ name: api_key_query
+ type: apiKey
+ http_basic_test:
+ scheme: basic
+ type: http
+
diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign/feign10x/build.gradle
similarity index 100%
rename from samples/client/petstore/java/feign10x/build.gradle
rename to samples/client/petstore/java/feign/feign10x/build.gradle
diff --git a/samples/client/petstore/java/feign10x/build.sbt b/samples/client/petstore/java/feign/feign10x/build.sbt
similarity index 100%
rename from samples/client/petstore/java/feign10x/build.sbt
rename to samples/client/petstore/java/feign/feign10x/build.sbt
diff --git a/samples/client/petstore/java/feign10x/git_push.sh b/samples/client/petstore/java/feign/feign10x/git_push.sh
similarity index 100%
rename from samples/client/petstore/java/feign10x/git_push.sh
rename to samples/client/petstore/java/feign/feign10x/git_push.sh
diff --git a/samples/client/petstore/java/feign10x/gradle.properties b/samples/client/petstore/java/feign/feign10x/gradle.properties
similarity index 100%
rename from samples/client/petstore/java/feign10x/gradle.properties
rename to samples/client/petstore/java/feign/feign10x/gradle.properties
diff --git a/samples/client/petstore/java/feign10x/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/feign/feign10x/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from samples/client/petstore/java/feign10x/gradle/wrapper/gradle-wrapper.jar
rename to samples/client/petstore/java/feign/feign10x/gradle/wrapper/gradle-wrapper.jar
diff --git a/samples/client/petstore/java/feign10x/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/feign/feign10x/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from samples/client/petstore/java/feign10x/gradle/wrapper/gradle-wrapper.properties
rename to samples/client/petstore/java/feign/feign10x/gradle/wrapper/gradle-wrapper.properties
diff --git a/samples/client/petstore/java/feign10x/gradlew b/samples/client/petstore/java/feign/feign10x/gradlew
similarity index 100%
rename from samples/client/petstore/java/feign10x/gradlew
rename to samples/client/petstore/java/feign/feign10x/gradlew
diff --git a/samples/client/petstore/java/feign10x/gradlew.bat b/samples/client/petstore/java/feign/feign10x/gradlew.bat
similarity index 100%
rename from samples/client/petstore/java/feign10x/gradlew.bat
rename to samples/client/petstore/java/feign/feign10x/gradlew.bat
diff --git a/samples/client/petstore/java/feign10x/pom.xml b/samples/client/petstore/java/feign/feign10x/pom.xml
similarity index 100%
rename from samples/client/petstore/java/feign10x/pom.xml
rename to samples/client/petstore/java/feign/feign10x/pom.xml
diff --git a/samples/client/petstore/java/feign10x/settings.gradle b/samples/client/petstore/java/feign/feign10x/settings.gradle
similarity index 100%
rename from samples/client/petstore/java/feign10x/settings.gradle
rename to samples/client/petstore/java/feign/feign10x/settings.gradle
diff --git a/samples/client/petstore/java/feign10x/src/main/AndroidManifest.xml b/samples/client/petstore/java/feign/feign10x/src/main/AndroidManifest.xml
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/AndroidManifest.xml
rename to samples/client/petstore/java/feign/feign10x/src/main/AndroidManifest.xml
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ApiClient.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/ApiClient.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ApiClient.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/CustomInstantDeserializer.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/CustomInstantDeserializer.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/CustomInstantDeserializer.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/EncodingUtils.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/EncodingUtils.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/EncodingUtils.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/EncodingUtils.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/ParamExpander.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ParamExpander.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/ParamExpander.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ParamExpander.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/RFC3339DateFormat.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/RFC3339DateFormat.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/RFC3339DateFormat.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ServerConfiguration.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/ServerConfiguration.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ServerConfiguration.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ServerVariable.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/ServerVariable.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ServerVariable.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/StringUtil.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/StringUtil.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/StringUtil.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/PetApi.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/PetApi.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/UserApi.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/UserApi.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/UserApi.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/OAuthFlow.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuthFlow.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/auth/OAuthFlow.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Animal.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Animal.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Animal.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ArrayTest.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/BigCat.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/BigCat.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/BigCat.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/BigCatAllOf.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/BigCatAllOf.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/BigCatAllOf.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Capitalization.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Cat.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Cat.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Cat.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Category.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Category.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Category.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ClassModel.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Client.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Client.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Client.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Dog.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Dog.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Dog.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/EnumArrays.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/EnumClass.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumClass.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/EnumClass.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/EnumTest.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/FormatTest.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/MapTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MapTest.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/MapTest.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Model200Response.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ModelApiResponse.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ModelReturn.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Name.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Name.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Name.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/NumberOnly.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Order.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Order.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Order.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/OuterComposite.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/OuterEnum.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/OuterEnum.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/OuterEnum.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Pet.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Pet.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Pet.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/SpecialModelName.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Tag.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/Tag.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/Tag.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/TypeHolderDefault.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderDefault.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/TypeHolderDefault.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/TypeHolderExample.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/TypeHolderExample.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/TypeHolderExample.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/User.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/User.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/User.java
diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java
rename to samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/XmlItem.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/StringUtilTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/StringUtilTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/StringUtilTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/StringUtilTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/FakeApiTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/FakeApiTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/FakeApiTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/PetApiTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/PetApiTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/PetApiTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/StoreApiTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/StoreApiTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/StoreApiTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/UserApiTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/api/UserApiTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/UserApiTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AnimalTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/AnimalTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/AnimalTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ArrayTestTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ArrayTestTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ArrayTestTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/BigCatTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CapitalizationTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/CapitalizationTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CapitalizationTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CatAllOfTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/CatAllOfTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CatAllOfTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CatTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/CatTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CatTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CategoryTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/CategoryTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CategoryTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ClassModelTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ClassModelTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ClassModelTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ClientTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ClientTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ClientTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/DogAllOfTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/DogAllOfTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/DogAllOfTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/DogTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/DogTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/DogTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/EnumArraysTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/EnumArraysTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/EnumArraysTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/EnumClassTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/EnumClassTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/EnumClassTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/EnumTestTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/EnumTestTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/EnumTestTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/FormatTestTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/FormatTestTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/FormatTestTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/MapTestTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/MapTestTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/MapTestTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/Model200ResponseTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/Model200ResponseTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/Model200ResponseTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ModelReturnTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ModelReturnTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ModelReturnTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/NameTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/NameTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/NameTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/NumberOnlyTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/NumberOnlyTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/NumberOnlyTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/OrderTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/OrderTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/OrderTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/OuterCompositeTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/OuterCompositeTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/OuterCompositeTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/OuterEnumTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/OuterEnumTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/OuterEnumTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/PetTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/PetTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/PetTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/TagTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/TagTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/TagTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/UserTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/UserTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/UserTest.java
diff --git a/samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/XmlItemTest.java
similarity index 100%
rename from samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/model/XmlItemTest.java
rename to samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/XmlItemTest.java
diff --git a/samples/client/petstore/java/feign/git_push.sh b/samples/client/petstore/java/feign/git_push.sh
new file mode 100644
index 00000000000..ced3be2b0c7
--- /dev/null
+++ b/samples/client/petstore/java/feign/git_push.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+git_host=$4
+
+if [ "$git_host" = "" ]; then
+ git_host="github.com"
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
+fi
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="GIT_USER_ID"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="GIT_REPO_ID"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=`git remote`
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/samples/client/petstore/java/feign/gradle.properties b/samples/client/petstore/java/feign/gradle.properties
new file mode 100644
index 00000000000..05644f0754a
--- /dev/null
+++ b/samples/client/petstore/java/feign/gradle.properties
@@ -0,0 +1,2 @@
+# Uncomment to build for Android
+#target = android
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000000..e35d600ab11
Binary files /dev/null and b/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000000..94920145f34
--- /dev/null
+++ b/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/samples/client/petstore/java/feign/gradlew b/samples/client/petstore/java/feign/gradlew
new file mode 100644
index 00000000000..2fe81a7d95e
--- /dev/null
+++ b/samples/client/petstore/java/feign/gradlew
@@ -0,0 +1,183 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/samples/client/petstore/java/feign/gradlew.bat b/samples/client/petstore/java/feign/gradlew.bat
new file mode 100644
index 00000000000..9618d8d9607
--- /dev/null
+++ b/samples/client/petstore/java/feign/gradlew.bat
@@ -0,0 +1,100 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml
index b27ff94afb8..f39214ac892 100644
--- a/samples/client/petstore/java/feign/pom.xml
+++ b/samples/client/petstore/java/feign/pom.xml
@@ -272,6 +272,12 @@
org.apache.oltu.oauth2.client${oltu-version}
+
+ javax.annotation
+ javax.annotation-api
+ ${javax-annotation-version}
+ provided
+
@@ -299,12 +305,13 @@
${java.version}${java.version}1.5.24
- 9.7.0
- 2.1.0
+ 11.0
+ 3.8.02.10.30.2.12.10.32.9.10
+ 1.3.24.131.0.01.0.1
diff --git a/samples/client/petstore/java/feign/settings.gradle b/samples/client/petstore/java/feign/settings.gradle
new file mode 100644
index 00000000000..56240d66842
--- /dev/null
+++ b/samples/client/petstore/java/feign/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = "petstore-feign"
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/src/main/AndroidManifest.xml b/samples/client/petstore/java/feign/src/main/AndroidManifest.xml
new file mode 100644
index 00000000000..54fbcb3da1e
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/AndroidManifest.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java
new file mode 100644
index 00000000000..4e256daf6b2
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java
@@ -0,0 +1,355 @@
+package org.openapitools.client;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
+
+import org.threeten.bp.*;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import org.openapitools.jackson.nullable.JsonNullableModule;
+import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule;
+
+import feign.Feign;
+import feign.RequestInterceptor;
+import feign.form.FormEncoder;
+import feign.jackson.JacksonDecoder;
+import feign.jackson.JacksonEncoder;
+import feign.slf4j.Slf4jLogger;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.auth.OAuth.AccessTokenListener;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class ApiClient {
+ public interface Api {}
+
+ protected ObjectMapper objectMapper;
+ private String basePath = "http://petstore.swagger.io:80/v2";
+ private Map apiAuthorizations;
+ private Feign.Builder feignBuilder;
+
+ public ApiClient() {
+ objectMapper = createObjectMapper();
+ apiAuthorizations = new LinkedHashMap();
+ feignBuilder = Feign.builder()
+ .encoder(new FormEncoder(new JacksonEncoder(objectMapper)))
+ .decoder(new JacksonDecoder(objectMapper))
+ .logger(new Slf4jLogger());
+ }
+
+ public ApiClient(String[] authNames) {
+ this();
+ for(String authName : authNames) {
+ RequestInterceptor auth;
+ if ("api_key".equals(authName)) {
+ auth = new ApiKeyAuth("header", "api_key");
+ } else if ("api_key_query".equals(authName)) {
+ auth = new ApiKeyAuth("query", "api_key_query");
+ } else if ("http_basic_test".equals(authName)) {
+ auth = new HttpBasicAuth();
+ } else if ("petstore_auth".equals(authName)) {
+ auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
+ } else {
+ throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
+ }
+ addAuthorization(authName, auth);
+ }
+ }
+
+ /**
+ * Basic constructor for single auth name
+ * @param authName
+ */
+ public ApiClient(String authName) {
+ this(new String[]{authName});
+ }
+
+ /**
+ * Helper constructor for single api key
+ * @param authName
+ * @param apiKey
+ */
+ public ApiClient(String authName, String apiKey) {
+ this(authName);
+ this.setApiKey(apiKey);
+ }
+
+ /**
+ * Helper constructor for single basic auth or password oauth2
+ * @param authName
+ * @param username
+ * @param password
+ */
+ public ApiClient(String authName, String username, String password) {
+ this(authName);
+ this.setCredentials(username, password);
+ }
+
+ /**
+ * Helper constructor for single password oauth2
+ * @param authName
+ * @param clientId
+ * @param secret
+ * @param username
+ * @param password
+ */
+ public ApiClient(String authName, String clientId, String secret, String username, String password) {
+ this(authName);
+ this.getTokenEndPoint()
+ .setClientId(clientId)
+ .setClientSecret(secret)
+ .setUsername(username)
+ .setPassword(password);
+ }
+
+ public String getBasePath() {
+ return basePath;
+ }
+
+ public ApiClient setBasePath(String basePath) {
+ this.basePath = basePath;
+ return this;
+ }
+
+ public Map getApiAuthorizations() {
+ return apiAuthorizations;
+ }
+
+ public void setApiAuthorizations(Map apiAuthorizations) {
+ this.apiAuthorizations = apiAuthorizations;
+ }
+
+ public Feign.Builder getFeignBuilder() {
+ return feignBuilder;
+ }
+
+ public ApiClient setFeignBuilder(Feign.Builder feignBuilder) {
+ this.feignBuilder = feignBuilder;
+ return this;
+ }
+
+ private ObjectMapper createObjectMapper() {
+ ObjectMapper objectMapper = new ObjectMapper();
+ objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
+ objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
+ objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+ objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE);
+ objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+ objectMapper.setDateFormat(new RFC3339DateFormat());
+ ThreeTenModule module = new ThreeTenModule();
+ module.addDeserializer(Instant.class, CustomInstantDeserializer.INSTANT);
+ module.addDeserializer(OffsetDateTime.class, CustomInstantDeserializer.OFFSET_DATE_TIME);
+ module.addDeserializer(ZonedDateTime.class, CustomInstantDeserializer.ZONED_DATE_TIME);
+ objectMapper.registerModule(module);
+ JsonNullableModule jnm = new JsonNullableModule();
+ objectMapper.registerModule(jnm);
+ return objectMapper;
+ }
+
+ public ObjectMapper getObjectMapper(){
+ return objectMapper;
+ }
+
+ /**
+ * Creates a feign client for given API interface.
+ *
+ * Usage:
+ * ApiClient apiClient = new ApiClient();
+ * apiClient.setBasePath("http://localhost:8080");
+ * XYZApi api = apiClient.buildClient(XYZApi.class);
+ * XYZResponse response = api.someMethod(...);
+ * @param Type
+ * @param clientClass Client class
+ * @return The Client
+ */
+ public T buildClient(Class clientClass) {
+ return feignBuilder.target(clientClass, basePath);
+ }
+
+ /**
+ * Select the Accept header's value from the given accepts array:
+ * if JSON exists in the given array, use it;
+ * otherwise use all of them (joining into a string)
+ *
+ * @param accepts The accepts array to select from
+ * @return The Accept header to use. If the given array is empty,
+ * null will be returned (not to set the Accept header explicitly).
+ */
+ public String selectHeaderAccept(String[] accepts) {
+ if (accepts.length == 0) return null;
+ if (StringUtil.containsIgnoreCase(accepts, "application/json")) return "application/json";
+ return StringUtil.join(accepts, ",");
+ }
+
+ /**
+ * Select the Content-Type header's value from the given array:
+ * if JSON exists in the given array, use it;
+ * otherwise use the first one of the array.
+ *
+ * @param contentTypes The Content-Type array to select from
+ * @return The Content-Type header to use. If the given array is empty,
+ * JSON will be used.
+ */
+ public String selectHeaderContentType(String[] contentTypes) {
+ if (contentTypes.length == 0) return "application/json";
+ if (StringUtil.containsIgnoreCase(contentTypes, "application/json")) return "application/json";
+ return contentTypes[0];
+ }
+
+
+ /**
+ * Helper method to configure the bearer token.
+ * @param bearerToken the bearer token.
+ */
+ public void setBearerToken(String bearerToken) {
+ for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
+ if (apiAuthorization instanceof HttpBearerAuth) {
+ ((HttpBearerAuth) apiAuthorization).setBearerToken(bearerToken);
+ return;
+ }
+ }
+ throw new RuntimeException("No Bearer authentication configured!");
+ }
+
+ /**
+ * Helper method to configure the first api key found
+ * @param apiKey API key
+ */
+ public void setApiKey(String apiKey) {
+ for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
+ if (apiAuthorization instanceof ApiKeyAuth) {
+ ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization;
+ keyAuth.setApiKey(apiKey);
+ return ;
+ }
+ }
+ throw new RuntimeException("No API key authentication configured!");
+ }
+
+ /**
+ * Helper method to configure the username/password for basic auth or password OAuth
+ * @param username Username
+ * @param password Password
+ */
+ public void setCredentials(String username, String password) {
+ for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
+ if (apiAuthorization instanceof HttpBasicAuth) {
+ HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization;
+ basicAuth.setCredentials(username, password);
+ return;
+ }
+ if (apiAuthorization instanceof OAuth) {
+ OAuth oauth = (OAuth) apiAuthorization;
+ oauth.getTokenRequestBuilder().setUsername(username).setPassword(password);
+ return;
+ }
+ }
+ throw new RuntimeException("No Basic authentication or OAuth configured!");
+ }
+
+ /**
+ * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
+ * @return Token request builder
+ */
+ public TokenRequestBuilder getTokenEndPoint() {
+ for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
+ if (apiAuthorization instanceof OAuth) {
+ OAuth oauth = (OAuth) apiAuthorization;
+ return oauth.getTokenRequestBuilder();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
+ * @return Authentication request builder
+ */
+ public AuthenticationRequestBuilder getAuthorizationEndPoint() {
+ for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
+ if (apiAuthorization instanceof OAuth) {
+ OAuth oauth = (OAuth) apiAuthorization;
+ return oauth.getAuthenticationRequestBuilder();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
+ * @param accessToken Access Token
+ * @param expiresIn Validity period in seconds
+ */
+ public void setAccessToken(String accessToken, Long expiresIn) {
+ for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
+ if (apiAuthorization instanceof OAuth) {
+ OAuth oauth = (OAuth) apiAuthorization;
+ oauth.setAccessToken(accessToken, expiresIn);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Helper method to configure the oauth accessCode/implicit flow parameters
+ * @param clientId Client ID
+ * @param clientSecret Client secret
+ * @param redirectURI Redirect URI
+ */
+ public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
+ for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
+ if (apiAuthorization instanceof OAuth) {
+ OAuth oauth = (OAuth) apiAuthorization;
+ oauth.getTokenRequestBuilder()
+ .setClientId(clientId)
+ .setClientSecret(clientSecret)
+ .setRedirectURI(redirectURI);
+ oauth.getAuthenticationRequestBuilder()
+ .setClientId(clientId)
+ .setRedirectURI(redirectURI);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Configures a listener which is notified when a new access token is received.
+ * @param accessTokenListener Acesss token listener
+ */
+ public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
+ for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) {
+ if (apiAuthorization instanceof OAuth) {
+ OAuth oauth = (OAuth) apiAuthorization;
+ oauth.registerAccessTokenListener(accessTokenListener);
+ return;
+ }
+ }
+ }
+
+ /**
+ * Gets request interceptor based on authentication name
+ * @param authName Authentiation name
+ * @return Request Interceptor
+ */
+ public RequestInterceptor getAuthorization(String authName) {
+ return apiAuthorizations.get(authName);
+ }
+
+ /**
+ * Adds an authorization to be used by the client
+ * @param authName Authentication name
+ * @param authorization Request interceptor
+ */
+ public void addAuthorization(String authName, RequestInterceptor authorization) {
+ if (apiAuthorizations.containsKey(authName)) {
+ throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations");
+ }
+ apiAuthorizations.put(authName, authorization);
+ feignBuilder.requestInterceptor(authorization);
+ }
+
+}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java
new file mode 100644
index 00000000000..83d4514b071
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java
@@ -0,0 +1,232 @@
+package org.openapitools.client;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonTokenId;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils;
+import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase;
+import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction;
+import com.fasterxml.jackson.datatype.threetenbp.function.Function;
+import org.threeten.bp.DateTimeException;
+import org.threeten.bp.DateTimeUtils;
+import org.threeten.bp.Instant;
+import org.threeten.bp.OffsetDateTime;
+import org.threeten.bp.ZoneId;
+import org.threeten.bp.ZonedDateTime;
+import org.threeten.bp.format.DateTimeFormatter;
+import org.threeten.bp.temporal.Temporal;
+import org.threeten.bp.temporal.TemporalAccessor;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+
+/**
+ * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s.
+ * Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format.
+ *
+ * @author Nick Williams
+ */
+public class CustomInstantDeserializer
+ extends ThreeTenDateTimeDeserializerBase {
+ private static final long serialVersionUID = 1L;
+
+ public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer(
+ Instant.class, DateTimeFormatter.ISO_INSTANT,
+ new Function() {
+ @Override
+ public Instant apply(TemporalAccessor temporalAccessor) {
+ return Instant.from(temporalAccessor);
+ }
+ },
+ new Function() {
+ @Override
+ public Instant apply(FromIntegerArguments a) {
+ return Instant.ofEpochMilli(a.value);
+ }
+ },
+ new Function() {
+ @Override
+ public Instant apply(FromDecimalArguments a) {
+ return Instant.ofEpochSecond(a.integer, a.fraction);
+ }
+ },
+ null
+ );
+
+ public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer(
+ OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME,
+ new Function() {
+ @Override
+ public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
+ return OffsetDateTime.from(temporalAccessor);
+ }
+ },
+ new Function() {
+ @Override
+ public OffsetDateTime apply(FromIntegerArguments a) {
+ return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
+ }
+ },
+ new Function() {
+ @Override
+ public OffsetDateTime apply(FromDecimalArguments a) {
+ return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
+ }
+ },
+ new BiFunction() {
+ @Override
+ public OffsetDateTime apply(OffsetDateTime d, ZoneId z) {
+ return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime()));
+ }
+ }
+ );
+
+ public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer(
+ ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME,
+ new Function() {
+ @Override
+ public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
+ return ZonedDateTime.from(temporalAccessor);
+ }
+ },
+ new Function() {
+ @Override
+ public ZonedDateTime apply(FromIntegerArguments a) {
+ return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
+ }
+ },
+ new Function() {
+ @Override
+ public ZonedDateTime apply(FromDecimalArguments a) {
+ return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
+ }
+ },
+ new BiFunction() {
+ @Override
+ public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) {
+ return zonedDateTime.withZoneSameInstant(zoneId);
+ }
+ }
+ );
+
+ protected final Function fromMilliseconds;
+
+ protected final Function fromNanoseconds;
+
+ protected final Function parsedToValue;
+
+ protected final BiFunction adjust;
+
+ protected CustomInstantDeserializer(Class supportedType,
+ DateTimeFormatter parser,
+ Function parsedToValue,
+ Function fromMilliseconds,
+ Function fromNanoseconds,
+ BiFunction adjust) {
+ super(supportedType, parser);
+ this.parsedToValue = parsedToValue;
+ this.fromMilliseconds = fromMilliseconds;
+ this.fromNanoseconds = fromNanoseconds;
+ this.adjust = adjust == null ? new BiFunction() {
+ @Override
+ public T apply(T t, ZoneId zoneId) {
+ return t;
+ }
+ } : adjust;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected CustomInstantDeserializer(CustomInstantDeserializer base, DateTimeFormatter f) {
+ super((Class) base.handledType(), f);
+ parsedToValue = base.parsedToValue;
+ fromMilliseconds = base.fromMilliseconds;
+ fromNanoseconds = base.fromNanoseconds;
+ adjust = base.adjust;
+ }
+
+ @Override
+ protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) {
+ if (dtf == _formatter) {
+ return this;
+ }
+ return new CustomInstantDeserializer(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/src/main/java/org/openapitools/client/EncodingUtils.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/EncodingUtils.java
new file mode 100644
index 00000000000..c5a76a97857
--- /dev/null
+++ b/samples/client/petstore/java/feign/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/src/main/java/org/openapitools/client/ParamExpander.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ParamExpander.java
new file mode 100644
index 00000000000..2331d87fdbd
--- /dev/null
+++ b/samples/client/petstore/java/feign/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/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java
new file mode 100644
index 00000000000..9509fd08981
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java
@@ -0,0 +1,32 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client;
+
+import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
+import com.fasterxml.jackson.databind.util.ISO8601Utils;
+
+import java.text.FieldPosition;
+import java.util.Date;
+
+
+public class RFC3339DateFormat extends ISO8601DateFormat {
+
+ // Same as ISO8601DateFormat but serializing milliseconds.
+ @Override
+ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
+ String value = ISO8601Utils.format(date, true);
+ toAppendTo.append(value);
+ return toAppendTo;
+ }
+
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java
new file mode 100644
index 00000000000..a1107a8690e
--- /dev/null
+++ b/samples/client/petstore/java/feign/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/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerVariable.java
new file mode 100644
index 00000000000..c2f13e21666
--- /dev/null
+++ b/samples/client/petstore/java/feign/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/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/StringUtil.java
new file mode 100644
index 00000000000..4dc60597910
--- /dev/null
+++ b/samples/client/petstore/java/feign/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/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
new file mode 100644
index 00000000000..2cefc6e4185
--- /dev/null
+++ b/samples/client/petstore/java/feign/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 body client model (required)
+ * @return Client
+ */
+ @RequestLine("PATCH /another-fake/dummy")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ Client call123testSpecialTags(Client body);
+}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java
new file mode 100644
index 00000000000..d1d0e6ed88e
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java
@@ -0,0 +1,422 @@
+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.threeten.bp.LocalDate;
+import org.threeten.bp.OffsetDateTime;
+import org.openapitools.client.model.OuterComposite;
+import org.openapitools.client.model.User;
+import org.openapitools.client.model.XmlItem;
+
+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 {
+
+
+ /**
+ * creates an XmlItem
+ * this route creates an XmlItem
+ * @param xmlItem XmlItem Body (required)
+ */
+ @RequestLine("POST /fake/create_xml_item")
+ @Headers({
+ "Content-Type: application/xml",
+ "Accept: application/json",
+ })
+ void createXmlItem(XmlItem xmlItem);
+
+ /**
+ *
+ * Test serialization of outer boolean types
+ * @param body Input boolean as post body (optional)
+ * @return Boolean
+ */
+ @RequestLine("POST /fake/outer/boolean")
+ @Headers({
+ "Content-Type: */*",
+ "Accept: */*",
+ })
+ Boolean fakeOuterBooleanSerialize(Boolean body);
+
+ /**
+ *
+ * Test serialization of object with outer number type
+ * @param body Input composite as post body (optional)
+ * @return OuterComposite
+ */
+ @RequestLine("POST /fake/outer/composite")
+ @Headers({
+ "Content-Type: */*",
+ "Accept: */*",
+ })
+ OuterComposite fakeOuterCompositeSerialize(OuterComposite body);
+
+ /**
+ *
+ * Test serialization of outer number types
+ * @param body Input number as post body (optional)
+ * @return BigDecimal
+ */
+ @RequestLine("POST /fake/outer/number")
+ @Headers({
+ "Content-Type: */*",
+ "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: */*",
+ "Accept: */*",
+ })
+ String fakeOuterStringSerialize(String body);
+
+ /**
+ *
+ * For this test, the body for this request much reference a schema named `File`.
+ * @param body (required)
+ */
+ @RequestLine("PUT /fake/body-with-file-schema")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void testBodyWithFileSchema(FileSchemaTestClass body);
+
+ /**
+ *
+ *
+ * @param query (required)
+ * @param body (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 body);
+
+ /**
+ *
+ *
+ * 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 body (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 body, @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 body client model (required)
+ * @return Client
+ */
+ @RequestLine("PATCH /fake")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ Client testClientModel(Client body);
+
+ /**
+ * 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, "csv"));
+ 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 param request body (required)
+ */
+ @RequestLine("POST /fake/inline-additionalProperties")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void testInlineAdditionalProperties(Map param);
+
+ /**
+ * 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, "csv"));
+ 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/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
new file mode 100644
index 00000000000..c22fbfa8d74
--- /dev/null
+++ b/samples/client/petstore/java/feign/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 body client model (required)
+ * @return Client
+ */
+ @RequestLine("PATCH /fake_classname_test")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ Client testClassname(Client body);
+}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java
new file mode 100644
index 00000000000..b954226800a
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java
@@ -0,0 +1,201 @@
+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 body 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 body);
+
+ /**
+ * 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>
+ */
+ @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>
+ */
+ @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 body 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 body);
+
+ /**
+ * 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/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java
new file mode 100644
index 00000000000..5ba8227e99b
--- /dev/null
+++ b/samples/client/petstore/java/feign/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 body order placed for purchasing the pet (required)
+ * @return Order
+ */
+ @RequestLine("POST /store/order")
+ @Headers({
+ "Content-Type: */*",
+ "Accept: application/json",
+ })
+ Order placeOrder(Order body);
+}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java
new file mode 100644
index 00000000000..40b6010dab2
--- /dev/null
+++ b/samples/client/petstore/java/feign/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 body Created user object (required)
+ */
+ @RequestLine("POST /user")
+ @Headers({
+ "Content-Type: */*",
+ "Accept: application/json",
+ })
+ void createUser(User body);
+
+ /**
+ * Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ */
+ @RequestLine("POST /user/createWithArray")
+ @Headers({
+ "Content-Type: */*",
+ "Accept: application/json",
+ })
+ void createUsersWithArrayInput(List body);
+
+ /**
+ * Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ */
+ @RequestLine("POST /user/createWithList")
+ @Headers({
+ "Content-Type: */*",
+ "Accept: application/json",
+ })
+ void createUsersWithListInput(List body);
+
+ /**
+ * 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 body Updated user object (required)
+ */
+ @RequestLine("PUT /user/{username}")
+ @Headers({
+ "Content-Type: */*",
+ "Accept: application/json",
+ })
+ void updateUser(@Param("username") String username, User body);
+}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
new file mode 100644
index 00000000000..44511e4641c
--- /dev/null
+++ b/samples/client/petstore/java/feign/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/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
new file mode 100644
index 00000000000..b275826472a
--- /dev/null
+++ b/samples/client/petstore/java/feign/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/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
new file mode 100644
index 00000000000..d4c9cbe6361
--- /dev/null
+++ b/samples/client/petstore/java/feign/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/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java
new file mode 100644
index 00000000000..f59ad4a94ba
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java
@@ -0,0 +1,198 @@
+package org.openapitools.client.auth;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.oltu.oauth2.client.HttpClient;
+import org.apache.oltu.oauth2.client.OAuthClient;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
+import org.apache.oltu.oauth2.client.response.OAuthClientResponse;
+import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory;
+import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse;
+import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
+import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
+import org.apache.oltu.oauth2.common.message.types.GrantType;
+import org.apache.oltu.oauth2.common.token.BasicOAuthToken;
+
+import feign.Client;
+import feign.Request.HttpMethod;
+import feign.Request.Options;
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+import feign.Response;
+import feign.RetryableException;
+import feign.Util;
+import org.openapitools.client.StringUtil;
+
+
+public class OAuth implements RequestInterceptor {
+
+ static final int MILLIS_PER_SECOND = 1000;
+
+ public interface AccessTokenListener {
+ void notify(BasicOAuthToken token);
+ }
+
+ private volatile String accessToken;
+ private Long expirationTimeMillis;
+ private OAuthClient oauthClient;
+ private TokenRequestBuilder tokenRequestBuilder;
+ private AuthenticationRequestBuilder authenticationRequestBuilder;
+ private AccessTokenListener accessTokenListener;
+
+ public OAuth(Client client, TokenRequestBuilder requestBuilder) {
+ this.oauthClient = new OAuthClient(new OAuthFeignClient(client));
+ this.tokenRequestBuilder = requestBuilder;
+ }
+
+ public OAuth(Client client, OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) {
+ this(client, OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes));
+
+ switch(flow) {
+ case accessCode:
+ case implicit:
+ tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE);
+ break;
+ case password:
+ tokenRequestBuilder.setGrantType(GrantType.PASSWORD);
+ break;
+ case application:
+ tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS);
+ break;
+ default:
+ break;
+ }
+ authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl);
+ }
+
+ public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) {
+ this(new Client.Default(null, null), flow, authorizationUrl, tokenUrl, scopes);
+ }
+
+ @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());
+ }
+ }
+
+ public synchronized void updateAccessToken(RequestTemplate template) {
+ OAuthJSONAccessTokenResponse accessTokenResponse;
+ try {
+ accessTokenResponse = oauthClient.accessToken(tokenRequestBuilder.buildBodyMessage());
+ } 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((BasicOAuthToken) accessTokenResponse.getOAuthToken());
+ }
+ }
+ }
+
+ public synchronized void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
+ this.accessTokenListener = accessTokenListener;
+ }
+
+ public synchronized String getAccessToken() {
+ return accessToken;
+ }
+
+ public synchronized void setAccessToken(String accessToken, Long expiresIn) {
+ this.accessToken = accessToken;
+ this.expirationTimeMillis = expiresIn == null ? null : System.currentTimeMillis() + expiresIn * MILLIS_PER_SECOND;
+ }
+
+ public TokenRequestBuilder getTokenRequestBuilder() {
+ return tokenRequestBuilder;
+ }
+
+ public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) {
+ this.tokenRequestBuilder = tokenRequestBuilder;
+ }
+
+ public AuthenticationRequestBuilder getAuthenticationRequestBuilder() {
+ return authenticationRequestBuilder;
+ }
+
+ public void setAuthenticationRequestBuilder(AuthenticationRequestBuilder authenticationRequestBuilder) {
+ this.authenticationRequestBuilder = authenticationRequestBuilder;
+ }
+
+ public OAuthClient getOauthClient() {
+ return oauthClient;
+ }
+
+ public void setOauthClient(OAuthClient oauthClient) {
+ this.oauthClient = oauthClient;
+ }
+
+ public void setOauthClient(Client client) {
+ this.oauthClient = new OAuthClient( new OAuthFeignClient(client));
+ }
+
+ public static class OAuthFeignClient implements HttpClient {
+
+ private Client client;
+
+ public OAuthFeignClient() {
+ this.client = new Client.Default(null, null);
+ }
+
+ public OAuthFeignClient(Client client) {
+ this.client = client;
+ }
+
+ public T execute(OAuthClientRequest request, Map headers,
+ String requestMethod, Class responseClass)
+ throws OAuthSystemException, OAuthProblemException {
+
+ RequestTemplate req = new RequestTemplate()
+ .append(request.getLocationUri())
+ .method(requestMethod)
+ .body(request.getBody());
+
+ for (Entry entry : headers.entrySet()) {
+ req.header(entry.getKey(), entry.getValue());
+ }
+ Response feignResponse;
+ String body = "";
+ try {
+ feignResponse = client.execute(req.request(), new Options());
+ body = Util.toString(feignResponse.body().asReader());
+ } catch (IOException e) {
+ throw new OAuthSystemException(e);
+ }
+
+ String contentType = null;
+ Collection contentTypeHeader = feignResponse.headers().get("Content-Type");
+ if(contentTypeHeader != null) {
+ contentType = StringUtil.join(contentTypeHeader.toArray(new String[0]), ";");
+ }
+
+ return OAuthClientResponseFactory.createCustomResponse(
+ body,
+ contentType,
+ feignResponse.status(),
+ responseClass
+ );
+ }
+
+ public void shutdown() {
+ // Nothing to do here
+ }
+ }
+}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java
new file mode 100644
index 00000000000..b2d11ff0c4f
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java
@@ -0,0 +1,18 @@
+/*
+ * 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;
+
+public enum OAuthFlow {
+ accessCode, implicit, password, application
+}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
new file mode 100644
index 00000000000..f84a72518f6
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.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.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * AdditionalPropertiesAnyType
+ */
+@JsonPropertyOrder({
+ AdditionalPropertiesAnyType.JSON_PROPERTY_NAME
+})
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class AdditionalPropertiesAnyType extends HashMap {
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+
+ public AdditionalPropertiesAnyType 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;
+ }
+
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
+ return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesAnyType {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).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(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
new file mode 100644
index 00000000000..3104ead59ee
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.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.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;
+
+/**
+ * AdditionalPropertiesArray
+ */
+@JsonPropertyOrder({
+ AdditionalPropertiesArray.JSON_PROPERTY_NAME
+})
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class AdditionalPropertiesArray extends HashMap {
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+
+ public AdditionalPropertiesArray 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;
+ }
+
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
+ return Objects.equals(this.name, additionalPropertiesArray.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesArray {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).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(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
new file mode 100644
index 00000000000..b485c4825c2
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.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.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * AdditionalPropertiesBoolean
+ */
+@JsonPropertyOrder({
+ AdditionalPropertiesBoolean.JSON_PROPERTY_NAME
+})
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class AdditionalPropertiesBoolean extends HashMap {
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+
+ public AdditionalPropertiesBoolean 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;
+ }
+
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
+ return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, super.hashCode());
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AdditionalPropertiesBoolean {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).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(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
new file mode 100644
index 00000000000..8dffb499959
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
@@ -0,0 +1,480 @@
+/*
+ * 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.JsonValue;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/**
+ * AdditionalPropertiesClass
+ */
+@JsonPropertyOrder({
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING,
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER,
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER,
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN,
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER,
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE,
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING,
+ AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE,
+ AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1,
+ AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2,
+ AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3
+})
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class AdditionalPropertiesClass {
+ public static final String JSON_PROPERTY_MAP_STRING = "map_string";
+ private Map mapString = null;
+
+ public static final String JSON_PROPERTY_MAP_NUMBER = "map_number";
+ private Map mapNumber = null;
+
+ public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer";
+ private Map mapInteger = null;
+
+ public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean";
+ private Map mapBoolean = null;
+
+ public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer";
+ private Map> mapArrayInteger = null;
+
+ public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype";
+ private Map> mapArrayAnytype = null;
+
+ public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string";
+ private Map> mapMapString = null;
+
+ public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype";
+ private Map> mapMapAnytype = null;
+
+ public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1";
+ private Object anytype1;
+
+ public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2";
+ private Object anytype2;
+
+ public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3";
+ private Object anytype3;
+
+
+ public AdditionalPropertiesClass mapString(Map mapString) {
+
+ this.mapString = mapString;
+ return this;
+ }
+
+ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
+ if (this.mapString == null) {
+ this.mapString = new HashMap();
+ }
+ this.mapString.put(key, mapStringItem);
+ return this;
+ }
+
+ /**
+ * Get mapString
+ * @return mapString
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_MAP_STRING)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Map getMapString() {
+ return mapString;
+ }
+
+
+ public void setMapString(Map mapString) {
+ this.mapString = mapString;
+ }
+
+
+ public AdditionalPropertiesClass mapNumber(Map mapNumber) {
+
+ this.mapNumber = mapNumber;
+ return this;
+ }
+
+ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
+ if (this.mapNumber == null) {
+ this.mapNumber = new HashMap();
+ }
+ this.mapNumber.put(key, mapNumberItem);
+ return this;
+ }
+
+ /**
+ * Get mapNumber
+ * @return mapNumber
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_MAP_NUMBER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Map getMapNumber() {
+ return mapNumber;
+ }
+
+
+ public void setMapNumber(Map mapNumber) {
+ this.mapNumber = mapNumber;
+ }
+
+
+ public AdditionalPropertiesClass mapInteger(Map mapInteger) {
+
+ this.mapInteger = mapInteger;
+ return this;
+ }
+
+ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
+ if (this.mapInteger == null) {
+ this.mapInteger = new HashMap();
+ }
+ this.mapInteger.put(key, mapIntegerItem);
+ return this;
+ }
+
+ /**
+ * Get mapInteger
+ * @return mapInteger
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_MAP_INTEGER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Map getMapInteger() {
+ return mapInteger;
+ }
+
+
+ public void setMapInteger(Map mapInteger) {
+ this.mapInteger = mapInteger;
+ }
+
+
+ public AdditionalPropertiesClass mapBoolean(Map mapBoolean) {
+
+ this.mapBoolean = mapBoolean;
+ return this;
+ }
+
+ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
+ if (this.mapBoolean == null) {
+ this.mapBoolean = new HashMap();
+ }
+ this.mapBoolean.put(key, mapBooleanItem);
+ return this;
+ }
+
+ /**
+ * Get mapBoolean
+ * @return mapBoolean
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Map getMapBoolean() {
+ return mapBoolean;
+ }
+
+
+ public void setMapBoolean(Map mapBoolean) {
+ this.mapBoolean = mapBoolean;
+ }
+
+
+ public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) {
+
+ this.mapArrayInteger = mapArrayInteger;
+ return this;
+ }
+
+ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) {
+ if (this.mapArrayInteger == null) {
+ this.mapArrayInteger = new HashMap>();
+ }
+ this.mapArrayInteger.put(key, mapArrayIntegerItem);
+ return this;
+ }
+
+ /**
+ * Get mapArrayInteger
+ * @return mapArrayInteger
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "")
+ @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Map> getMapArrayInteger() {
+ return mapArrayInteger;
+ }
+
+
+ public void setMapArrayInteger(Map> mapArrayInteger) {
+ this.mapArrayInteger = mapArrayInteger;
+ }
+
+
+ public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) {
+
+ this.mapArrayAnytype = mapArrayAnytype;
+ return this;
+ }
+
+ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List