diff --git a/.github/workflows/samples-java-client-jdk17.yaml b/.github/workflows/samples-java-client-jdk17.yaml
index 581632abda3e..aacb11a2dbaf 100644
--- a/.github/workflows/samples-java-client-jdk17.yaml
+++ b/.github/workflows/samples-java-client-jdk17.yaml
@@ -8,6 +8,7 @@ on:
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
- samples/client/petstore/java/native-jackson3/**
+ - samples/client/petstore/java/apache-httpclient-jackson3/**
- samples/client/others/java/webclient-sealedInterface/**
- samples/client/others/java/webclient-sealedInterface_3_1/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
@@ -21,6 +22,7 @@ on:
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
- samples/client/petstore/java/native-jackson3/**
+ - samples/client/petstore/java/apache-httpclient-jackson3/**
- samples/client/others/java/webclient-sealedInterface/**
- samples/client/others/java/webclient-sealedInterface_3_1/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
@@ -48,6 +50,7 @@ jobs:
- samples/client/petstore/java/restclient-useSingleRequestParameter
- samples/client/petstore/java/restclient-useSingleRequestParameter-static
- samples/client/petstore/java/native-jackson3
+ - samples/client/petstore/java/apache-httpclient-jackson3
- samples/client/others/java/webclient-sealedInterface
- samples/client/others/java/webclient-sealedInterface_3_1
- samples/client/petstore/java/webclient-springBoot4-jackson3
diff --git a/bin/configs/java-apache-httpclient-jackson3.yaml b/bin/configs/java-apache-httpclient-jackson3.yaml
new file mode 100644
index 000000000000..32a386c77f5c
--- /dev/null
+++ b/bin/configs/java-apache-httpclient-jackson3.yaml
@@ -0,0 +1,10 @@
+generatorName: java
+outputDir: samples/client/petstore/java/apache-httpclient-jackson3
+library: apache-httpclient
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/Java
+additionalProperties:
+ artifactId: petstore-apache-httpclient-jackson3
+ hideGenerationTimestamp: "true"
+ useJackson3: "true"
+ openApiNullable: "true"
diff --git a/docs/generators/java-microprofile.md b/docs/generators/java-microprofile.md
index 6cc849ee61df..a14a153de079 100644
--- a/docs/generators/java-microprofile.md
+++ b/docs/generators/java-microprofile.md
@@ -64,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.client|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**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|**jersey2** HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1 **jersey3** HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1 **feign** HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1 **feign-hc5** HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1 **okhttp-gson** [DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. **retrofit2** HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x) **resttemplate** HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`) **webclient** HTTP client: Spring WebClient 5.1.18 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) **restclient** HTTP client: Spring RestClient 6.1.6 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) **resteasy** HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1 **vertx** HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1 **google-api-client** HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1 **rest-assured** HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8 **native** HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`). Only for Java11+ **microprofile** HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1 **apache-httpclient** HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1 |okhttp-gson|
+|library|library template (sub-template) to use|**jersey2** HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1 **jersey3** HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1 **feign** HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1 **feign-hc5** HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1 **okhttp-gson** [DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. **retrofit2** HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x) **resttemplate** HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`) **webclient** HTTP client: Spring WebClient 5.1.18 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) **restclient** HTTP client: Spring RestClient 6.1.6 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) **resteasy** HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1 **vertx** HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1 **google-api-client** HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1 **rest-assured** HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8 **native** HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`). Only for Java11+ **microprofile** HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1 **apache-httpclient** HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) |okhttp-gson|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null|
@@ -97,7 +97,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations| |false|
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false|
|useGzipFeature|Send gzip-encoded requests| |false|
-|useJackson3|Use Jackson 3 instead of Jackson 2. Supported for 'native' library (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true). Incompatible with 'openApiNullable'.| |false|
+|useJackson3|Use Jackson 3 instead of Jackson 2. Supported for 'native' and 'apache-httpclient' libraries (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true).| |false|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, jersey3, native, okhttp-gson support this option.| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
diff --git a/docs/generators/java.md b/docs/generators/java.md
index b37426133f6f..7a9bac202e0b 100644
--- a/docs/generators/java.md
+++ b/docs/generators/java.md
@@ -64,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.client|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|**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|**jersey2** HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1 **jersey3** HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1 **feign** HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1 **feign-hc5** HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1 **okhttp-gson** [DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. **retrofit2** HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x) **resttemplate** HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`) **webclient** HTTP client: Spring WebClient 5.1.18 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) **restclient** HTTP client: Spring RestClient 6.1.6 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) **resteasy** HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1 **vertx** HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1 **google-api-client** HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1 **rest-assured** HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8 **native** HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`). Only for Java11+ **microprofile** HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1 **apache-httpclient** HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1 |okhttp-gson|
+|library|library template (sub-template) to use|**jersey2** HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1 **jersey3** HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1 **feign** HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1 **feign-hc5** HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1 **okhttp-gson** [DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. **retrofit2** HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x) **resttemplate** HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`) **webclient** HTTP client: Spring WebClient 5.1.18 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) **restclient** HTTP client: Spring RestClient 6.1.6 (7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) **resteasy** HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1 **vertx** HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1 **google-api-client** HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1 **rest-assured** HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8 **native** HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`). Only for Java11+ **microprofile** HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1 **apache-httpclient** HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`) |okhttp-gson|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null|
@@ -97,7 +97,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations| |false|
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false|
|useGzipFeature|Send gzip-encoded requests| |false|
-|useJackson3|Use Jackson 3 instead of Jackson 2. Supported for 'native' library (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true). Incompatible with 'openApiNullable'.| |false|
+|useJackson3|Use Jackson 3 instead of Jackson 2. Supported for 'native' and 'apache-httpclient' libraries (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true).| |false|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, jersey3, native, okhttp-gson support this option.| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
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 b2faed874176..eb74d0509b90 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
@@ -270,7 +270,7 @@ public JavaClientCodegen() {
cliOptions.add(CliOption.newBoolean(SUPPORT_URL_QUERY, "Generate toUrlQueryString in POJO (default to true). Available on `native`, `apache-httpclient` libraries."));
cliOptions.add(CliOption.newBoolean(USE_ENUM_CASE_INSENSITIVE, "Use `equalsIgnoreCase` when String for enum comparison", useEnumCaseInsensitive));
cliOptions.add(CliOption.newBoolean(FAIL_ON_UNKNOWN_PROPERTIES, "Fail Jackson de-serialization on unknown properties", this.failOnUnknownProperties));
- cliOptions.add(CliOption.newBoolean(USE_JACKSON_3, "Use Jackson 3 instead of Jackson 2. Supported for 'native' library (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true). Incompatible with 'openApiNullable'.", this.useJackson3));
+ cliOptions.add(CliOption.newBoolean(USE_JACKSON_3, "Use Jackson 3 instead of Jackson 2. Supported for 'native' and 'apache-httpclient' libraries (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true).", this.useJackson3));
cliOptions.add(CliOption.newBoolean(SUPPORT_VERTX_FUTURE, "Also generate api methods that return a vertx Future instead of taking a callback. Only `vertx` supports this option. Requires vertx 4 or greater.", this.supportVertxFuture));
cliOptions.add(CliOption.newBoolean(USE_SEALED_ONE_OF_INTERFACES, "Generate the oneOf interfaces as sealed interfaces. Only supported for WebClient and RestClient.", this.useSealedOneOfInterfaces));
cliOptions.add(CliOption.newBoolean(USE_UNARY_INTERCEPTOR, "If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption", this.useUnaryInterceptor));
@@ -290,7 +290,7 @@ public JavaClientCodegen() {
supportedLibraries.put(REST_ASSURED, "HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8");
supportedLibraries.put(NATIVE, "HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`). Only for Java11+");
supportedLibraries.put(MICROPROFILE, "HTTP client: Microprofile client " + MICROPROFILE_REST_CLIENT_DEFAULT_VERSION + " (default, set desired version via `" + MICROPROFILE_REST_CLIENT_VERSION + "=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1");
- supportedLibraries.put(APACHE, "HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1");
+ supportedLibraries.put(APACHE, "HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1 (3.x if `useJackson3=true`)");
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
libraryOption.setEnum(supportedLibraries);
@@ -381,14 +381,10 @@ public void processOpts() {
convertPropertyToBooleanAndWriteBack(USE_SPRING_BOOT4, this::setUseSpringBoot4);
if (useJackson3 && (libRestClient || libRestTemplate || libWebClient) && !useSpringBoot4) {
throw new IllegalArgumentException("useJackson3 for the restclient, resttemplate, and webclient libraries requires useSpringBoot4=true");
- } else if (useJackson3 && !libNative && !libRestClient && !libRestTemplate && !libWebClient) {
- throw new IllegalArgumentException("useJackson3 is only supported for the 'native', 'restclient', 'resttemplate', and 'webclient' libraries. " +
+ } else if (useJackson3 && !libNative && !libApache && !libRestClient && !libRestTemplate && !libWebClient) {
+ throw new IllegalArgumentException("useJackson3 is only supported for the 'native', 'apache-httpclient', 'restclient', 'resttemplate', and 'webclient' libraries. " +
"The Spring libraries also require useSpringBoot4=true.");
}
- if (useJackson3 && openApiNullable) {
- throw new IllegalArgumentException("openApiNullable=true is not compatible with useJackson3=true " +
- "(jackson-databind-nullable has no Jackson 3 release). Please set openApiNullable=false explicitly.");
- }
if (this.useJackson3) {
this.applyJackson3Package();
@@ -824,7 +820,7 @@ public void processOpts() {
additionalProperties.remove(SERIALIZATION_LIBRARY_GSON);
additionalProperties.remove(SERIALIZATION_LIBRARY_JSONB);
supportingFiles.add(new SupportingFile("RFC3339DateFormat.mustache", invokerFolder, "RFC3339DateFormat.java"));
- if (!useJackson3 || libNative || libRestTemplate || libWebClient) {
+ if (!useJackson3 || libNative || libApache || libRestTemplate || libWebClient) {
supportingFiles.add(new SupportingFile("RFC3339InstantDeserializer.mustache", invokerFolder, "RFC3339InstantDeserializer.java"));
supportingFiles.add(new SupportingFile("RFC3339JavaTimeModule.mustache", invokerFolder, "RFC3339JavaTimeModule.java"));
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache
index f70c29c21ada..e6418e5fac26 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache
@@ -2,17 +2,33 @@
package {{invokerPackage}};
import com.fasterxml.jackson.annotation.*;
-import com.fasterxml.jackson.databind.*;
+import {{jacksonPackage}}.databind.*;
{{#joda}}
-import com.fasterxml.jackson.datatype.joda.JodaModule;
+import {{jacksonPackage}}.datatype.joda.JodaModule;
{{/joda}}
+{{^useJackson3}}
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+{{/useJackson3}}
+{{#useJackson3}}
+import tools.jackson.databind.cfg.DateTimeFeature;
+import tools.jackson.databind.cfg.EnumFeature;
+import tools.jackson.databind.json.JsonMapper;
+{{/useJackson3}}
import java.time.OffsetDateTime;
-import com.fasterxml.jackson.core.type.TypeReference;
+import {{jacksonPackage}}.core.type.TypeReference;
+{{^useJackson3}}
import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JavaType;
+{{/useJackson3}}
+{{#useJackson3}}
+import tools.jackson.core.JacksonException;
+{{/useJackson3}}
{{#openApiNullable}}
+{{^useJackson3}}
import org.openapitools.jackson.nullable.JsonNullableModule;
+{{/useJackson3}}
+{{#useJackson3}}
+import org.openapitools.jackson.nullable.JsonNullableJackson3Module;
+{{/useJackson3}}
{{/openApiNullable}}
import org.apache.hc.client5.http.cookie.BasicCookieStore;
@@ -135,6 +151,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
protected static List bodyMethods = Arrays.asList("POST", "PUT", "DELETE", "PATCH");
public ApiClient(CloseableHttpClient httpClient) {
+ {{^useJackson3}}
objectMapper = new ObjectMapper();
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}});
@@ -151,6 +168,30 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
{{/openApiNullable}}
objectMapper.registerModule(new RFC3339JavaTimeModule());
objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat());
+ {{/useJackson3}}
+ {{#useJackson3}}
+ objectMapper = JsonMapper.builder()
+ .changeDefaultPropertyInclusion(v -> v.withValueInclusion(JsonInclude.Include.NON_NULL))
+ {{#failOnUnknownProperties}}
+ .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ {{/failOnUnknownProperties}}
+ {{^failOnUnknownProperties}}
+ .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ {{/failOnUnknownProperties}}
+ .disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE)
+ .disable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
+ .enable(EnumFeature.WRITE_ENUMS_USING_TO_STRING)
+ .enable(EnumFeature.READ_ENUMS_USING_TO_STRING)
+ {{#joda}}
+ .addModule(new JodaModule())
+ {{/joda}}
+ {{#openApiNullable}}
+ .addModule(new JsonNullableJackson3Module())
+ {{/openApiNullable}}
+ .addModule(new RFC3339JavaTimeModule())
+ .defaultDateFormat(ApiClient.buildDefaultDateFormat())
+ .build();
+ {{/useJackson3}}
dateFormat = ApiClient.buildDefaultDateFormat();
@@ -540,7 +581,16 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
// Also set the date format for model (de)serialization with Date properties.
+ {{^useJackson3}}
this.objectMapper.setDateFormat((DateFormat) dateFormat.clone());
+ {{/useJackson3}}
+ {{#useJackson3}}
+ if (this.objectMapper instanceof JsonMapper) {
+ this.objectMapper = ((JsonMapper) this.objectMapper).rebuild().defaultDateFormat((DateFormat) dateFormat.clone()).build();
+ } else {
+ throw new UnsupportedOperationException("setDateFormat is only supported when objectMapper is a JsonMapper instance");
+ }
+ {{/useJackson3}}
return this;
}
@@ -790,7 +840,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
if (isJsonMime(mimeType)) {
try {
return new StringEntity(objectMapper.writeValueAsString(obj), contentType.withCharset(StandardCharsets.UTF_8));
- } catch (JsonProcessingException e) {
+ } catch ({{^useJackson3}}JsonProcessingException{{/useJackson3}}{{#useJackson3}}JacksonException{{/useJackson3}} e) {
throw new ApiException(e);
}
} else if (mimeType.equals(ContentType.MULTIPART_FORM_DATA.getMimeType())) {
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/BaseApi.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/BaseApi.mustache
index f046b1995bcb..fb00de41f167 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/BaseApi.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/BaseApi.mustache
@@ -1,7 +1,7 @@
{{>licenseInfo}}
package {{invokerPackage}};
-import com.fasterxml.jackson.core.type.TypeReference;
+import {{jacksonPackage}}.core.type.TypeReference;
import java.util.Collections;
import java.util.Map;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache
index 289adc98c1f3..85a7e5b62bf2 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache
@@ -1,7 +1,7 @@
{{>licenseInfo}}
package {{package}};
-import com.fasterxml.jackson.core.type.TypeReference;
+import {{jacksonPackage}}.core.type.TypeReference;
import {{invokerPackage}}.ApiException;
import {{invokerPackage}}.ApiClient;
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache
index 25d8b4855666..b169bf764efd 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache
@@ -78,8 +78,14 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'java'
apply plugin: 'maven-publish'
+ {{^useJackson3}}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
+ {{/useJackson3}}
+ {{#useJackson3}}
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+ {{/useJackson3}}
publishing {
publications {
@@ -110,26 +116,40 @@ if(hasProperty('target') && target == 'android') {
archives sourcesJar
archives javadocJar
}
+
+ test {
+ useJUnitPlatform()
+ }
}
ext {
swagger_annotations_version = "1.6.6"
+ {{^useJackson3}}
jackson_version = "2.21.1"
jackson_annotations_version = "2.21"
jackson_databind_version = "2.21.1"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.10"
{{/openApiNullable}}
+ {{/useJackson3}}
+ {{#useJackson3}}
+ jackson3_version = "3.1.0"
+ jackson_annotations_version = "2.21"
+ {{#openApiNullable}}
+ jackson_databind_nullable_version = "0.2.10"
+ {{/openApiNullable}}
+ {{/useJackson3}}
jakarta_annotation_version = "1.3.5"
httpclient_version = "5.1.3"
jodatime_version = "2.9.9"
- junit_version = "4.13.2"
+ junit_version = "5.10.2"
}
dependencies {
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "org.apache.httpcomponents.client5:httpclient5:$httpclient_version"
+ {{^useJackson3}}
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_annotations_version"
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
@@ -141,6 +161,20 @@ dependencies {
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
{{/joda}}
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
+ {{/useJackson3}}
+ {{#useJackson3}}
+ implementation "tools.jackson.core:jackson-core:$jackson3_version"
+ implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_annotations_version"
+ implementation "tools.jackson.core:jackson-databind:$jackson3_version"
+ implementation "tools.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson3_version"
+ {{#openApiNullable}}
+ implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
+ {{/openApiNullable}}
+ {{#joda}}
+ implementation "tools.jackson.datatype:jackson-datatype-joda:$jackson3_version"
+ {{/joda}}
+ {{/useJackson3}}
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
- testImplementation "junit:junit:$junit_version"
+ testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
+ testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache
index 1c757a00729d..780f3a00689c 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache
@@ -244,6 +244,7 @@
+ {{^useJackson3}}
com.fasterxml.jackson.core
jackson-core
@@ -295,6 +296,46 @@
jackson-datatype-jsr310
${jackson-version}
+ {{/useJackson3}}
+ {{#useJackson3}}
+
+ tools.jackson.core
+ jackson-core
+ ${jackson3-version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson-annotations-version}
+
+
+ tools.jackson.core
+ jackson-databind
+ ${jackson3-version}
+
+ {{^useJakartaEe}}
+
+ tools.jackson.jakarta.rs
+ jackson-jakarta-rs-json-provider
+ ${jackson3-version}
+
+ {{/useJakartaEe}}
+ {{#useJakartaEe}}
+
+ tools.jackson.jakarta.rs
+ jackson-jakarta-rs-json-provider
+ ${jackson3-version}
+
+ {{/useJakartaEe}}
+ {{#joda}}
+
+ tools.jackson.datatype
+ jackson-datatype-joda
+ ${jackson3-version}
+
+ {{/joda}}
+
+ {{/useJackson3}}
{{#useBeanValidation}}
@@ -351,12 +392,21 @@
2.2.15
{{/swagger2AnnotationLibrary}}
5.2.1
+ {{^useJackson3}}
2.21.1
2.21
2.21.1
{{#openApiNullable}}
0.2.10
{{/openApiNullable}}
+ {{/useJackson3}}
+ {{#useJackson3}}
+ 3.1.0
+ 2.21
+ {{#openApiNullable}}
+ 0.2.10
+ {{/openApiNullable}}
+ {{/useJackson3}}
{{#useJakartaEe}}
2.1.1
3.0.2
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache
index d6a3330066b8..bbbccdeb5806 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache
@@ -15,6 +15,9 @@ import org.openapitools.jackson.nullable.JsonNullableModule;
import tools.jackson.databind.cfg.DateTimeFeature;
import tools.jackson.databind.cfg.EnumFeature;
import tools.jackson.databind.json.JsonMapper;
+{{#openApiNullable}}
+import org.openapitools.jackson.nullable.JsonNullableJackson3Module;
+{{/openApiNullable}}
{{/useJackson3}}
import java.io.InputStream;
@@ -237,6 +240,9 @@ public class ApiClient {
.enable(EnumFeature.WRITE_ENUMS_USING_TO_STRING)
.enable(EnumFeature.READ_ENUMS_USING_TO_STRING)
.disable(DateTimeFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)
+ {{#openApiNullable}}
+ .addModule(new JsonNullableJackson3Module())
+ {{/openApiNullable}}
.addModule(new RFC3339JavaTimeModule())
.build();
{{/useJackson3}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/JSON.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/JSON.mustache
index 3d00cafc9033..a2443a17da16 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/native/JSON.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/JSON.mustache
@@ -14,6 +14,9 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
{{#useJackson3}}
import tools.jackson.databind.cfg.DateTimeFeature;
import tools.jackson.databind.cfg.EnumFeature;
+{{#openApiNullable}}
+import org.openapitools.jackson.nullable.JsonNullableJackson3Module;
+{{/openApiNullable}}
{{/useJackson3}}
{{#joda}}
import {{jacksonPackage}}.datatype.joda.JodaModule;
@@ -76,6 +79,9 @@ public class JSON {
{{#joda}}
jsonMapperBuilder.addModule(new JodaModule());
{{/joda}}
+ {{#openApiNullable}}
+ jsonMapperBuilder.addModule(new JsonNullableJackson3Module());
+ {{/openApiNullable}}
mapper = jsonMapperBuilder.build();
{{/useJackson3}}
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache
index 71865af72a12..2387333e37e4 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache
@@ -122,6 +122,9 @@ dependencies {
implementation "tools.jackson.core:jackson-core:$jackson3_version"
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_annotations_version"
implementation "tools.jackson.core:jackson-databind:$jackson3_version"
+ {{#openApiNullable}}
+ implementation "org.openapitools:jackson-databind-nullable:0.2.10"
+ {{/openApiNullable}}
{{/useJackson3}}
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
{{#useBeanValidation}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache
index 26dbfb44a778..3581cbc23a8c 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache
@@ -261,7 +261,11 @@
${jackson3-version}
-
+
+ org.openapitools
+ jackson-databind-nullable
+ ${jackson-databind-nullable-version}
+
{{/useJackson3}}
@@ -334,6 +338,7 @@
{{#useJackson3}}
3.1.0
2.21
+ 0.2.10
{{/useJackson3}}
{{#useJakartaEe}}
2.1.1
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache
index e63ea452fadc..e5c987f94db8 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache
@@ -30,7 +30,12 @@ import org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConve
import java.util.function.Consumer;
{{#openApiNullable}}
+{{^useJackson3}}
import org.openapitools.jackson.nullable.JsonNullableModule;
+{{/useJackson3}}
+{{#useJackson3}}
+import org.openapitools.jackson.nullable.JsonNullableJackson3Module;
+{{/useJackson3}}
{{/openApiNullable}}
{{#generateClientAsBean}}
import org.springframework.beans.factory.annotation.Autowired;
@@ -192,6 +197,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
{{^failOnUnknownProperties}}
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
{{/failOnUnknownProperties}}
+ {{#openApiNullable}}
+ .addModule(new JsonNullableJackson3Module())
+ {{/openApiNullable}}
.build();
}
{{/useJackson3}}
@@ -233,7 +241,12 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
XmlMapper xmlMapper = new XmlMapper();
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
{{#openApiNullable}}
+ {{^useJackson3}}
xmlMapper.registerModule(new JsonNullableModule());
+ {{/useJackson3}}
+ {{#useJackson3}}
+ xmlMapper.registerModule(new JsonNullableJackson3Module());
+ {{/useJackson3}}
{{/openApiNullable}}
{{/withXml}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache
index ee29f17088d3..5a6cca9ad49f 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache
@@ -40,7 +40,12 @@ import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.web.util.DefaultUriBuilderFactory;
{{#openApiNullable}}
+{{^useJackson3}}
import org.openapitools.jackson.nullable.JsonNullableModule;
+{{/useJackson3}}
+{{#useJackson3}}
+import org.openapitools.jackson.nullable.JsonNullableJackson3Module;
+{{/useJackson3}}
{{/openApiNullable}}
@@ -874,7 +879,12 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
XmlMapper xmlMapper = new XmlMapper();
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
{{#openApiNullable}}
+ {{^useJackson3}}
xmlMapper.registerModule(new JsonNullableModule());
+ {{/useJackson3}}
+ {{#useJackson3}}
+ xmlMapper.registerModule(new JsonNullableJackson3Module());
+ {{/useJackson3}}
{{/openApiNullable}}
messageConverters.add(new MappingJackson2XmlHttpMessageConverter(xmlMapper));
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache
index c21894c74bc9..e1df6981f724 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache
@@ -18,7 +18,12 @@ import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
{{/useJackson3}}
{{#openApiNullable}}
+{{^useJackson3}}
import org.openapitools.jackson.nullable.JsonNullableModule;
+{{/useJackson3}}
+{{#useJackson3}}
+import org.openapitools.jackson.nullable.JsonNullableJackson3Module;
+{{/useJackson3}}
{{/openApiNullable}}
{{#generateClientAsBean}}
import org.springframework.beans.factory.annotation.Autowired;
@@ -174,6 +179,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
{{^failOnUnknownProperties}}
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
{{/failOnUnknownProperties}}
+ {{#openApiNullable}}
+ .addModule(new JsonNullableJackson3Module())
+ {{/openApiNullable}}
.build();
}
{{/useJackson3}}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java
index e55a540fbbd0..653469b211e5 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java
@@ -665,6 +665,85 @@ public void testJdkHttpClientWithJackson3() {
.contains("com.fasterxml.jackson.core ");
}
+ @Test
+ public void testJdkHttpClientWithJackson3AndOpenApiNullable() {
+ final Path output = newTempFolder();
+ final CodegenConfigurator configurator = new CodegenConfigurator()
+ .setGeneratorName(JAVA_GENERATOR)
+ .setLibrary(JavaClientCodegen.NATIVE)
+ .addAdditionalProperty(CodegenConstants.API_PACKAGE, "xyz.abcdef.api")
+ .addAdditionalProperty(CodegenConstants.INVOKER_PACKAGE, "xyz.abcdef.invoker")
+ .addAdditionalProperty(JavaClientCodegen.USE_JACKSON_3, true)
+ .addAdditionalProperty(JavaClientCodegen.OPENAPI_NULLABLE, true)
+ .setInputSpec("src/test/resources/3_0/ping.yaml")
+ .setOutputDir(output.toString().replace("\\", "/"));
+
+ List files = new DefaultGenerator().opts(configurator.toClientOptInput()).generate();
+
+ validateJavaSourceFiles(files);
+ assertThat(output.resolve("src/main/java/xyz/abcdef/invoker/ApiClient.java")).content()
+ .contains("import org.openapitools.jackson.nullable.JsonNullableJackson3Module;")
+ .contains("new JsonNullableJackson3Module()")
+ .doesNotContain("JsonNullableModule");
+ assertThat(output.resolve("src/main/java/xyz/abcdef/invoker/JSON.java")).content()
+ .contains("import org.openapitools.jackson.nullable.JsonNullableJackson3Module;")
+ .contains("new JsonNullableJackson3Module()")
+ .doesNotContain("JsonNullableModule");
+ assertThat(output.resolve("pom.xml")).content()
+ .contains("jackson-databind-nullable");
+ }
+
+ @Test
+ public void testApacheHttpClientWithJackson3() {
+ final Path output = newTempFolder();
+ final CodegenConfigurator configurator = new CodegenConfigurator()
+ .setGeneratorName(JAVA_GENERATOR)
+ .setLibrary(JavaClientCodegen.APACHE)
+ .addAdditionalProperty(CodegenConstants.API_PACKAGE, "xyz.abcdef.api")
+ .addAdditionalProperty(CodegenConstants.INVOKER_PACKAGE, "xyz.abcdef.invoker")
+ .addAdditionalProperty(JavaClientCodegen.USE_JACKSON_3, true)
+ .addAdditionalProperty(JavaClientCodegen.OPENAPI_NULLABLE, true)
+ .setInputSpec("src/test/resources/3_0/ping.yaml")
+ .setOutputDir(output.toString().replace("\\", "/"));
+
+ List files = new DefaultGenerator().opts(configurator.toClientOptInput()).generate();
+
+ validateJavaSourceFiles(files);
+ assertThat(output.resolve("src/main/java/xyz/abcdef/invoker/ApiClient.java")).content()
+ .contains("import tools.jackson.databind.*")
+ .contains("import tools.jackson.databind.json.JsonMapper;")
+ .contains("import org.openapitools.jackson.nullable.JsonNullableJackson3Module;")
+ .contains("new JsonNullableJackson3Module()")
+ .doesNotContain("import com.fasterxml.jackson.databind");
+ assertThat(output.resolve("src/main/java/xyz/abcdef/api/DefaultApi.java")).content()
+ .contains("import tools.jackson.core.type.TypeReference;")
+ .doesNotContain("import com.fasterxml.jackson.core.type.TypeReference");
+ assertThat(output.resolve("pom.xml")).content()
+ .contains("tools.jackson.core ")
+ .contains("com.fasterxml.jackson.core ")
+ .contains("jackson-databind-nullable");
+ }
+
+ @Test(dataProvider = "springBoot4Jackson3Libraries")
+ void supportsJackson3WithOpenApiNullableForSpringBoot4Libraries(String library) {
+ String outputDir = newTempFolder().toString();
+ final CodegenConfigurator configurator = new CodegenConfigurator()
+ .setGeneratorName(JAVA_GENERATOR)
+ .setLibrary(library)
+ .addAdditionalProperty(USE_JACKSON_3, true)
+ .addAdditionalProperty(USE_SPRING_BOOT4, true)
+ .addAdditionalProperty(OPENAPI_NULLABLE, true)
+ .setInputSpec("src/test/resources/3_0/java/autoset_constant.yaml")
+ .setOutputDir(outputDir);
+
+ List files = new DefaultGenerator().opts(configurator.toClientOptInput()).generate();
+
+ assertThat(files).isNotEmpty();
+ assertThat(new File(outputDir, "src/main/java/org/openapitools/client/ApiClient.java"))
+ .content()
+ .contains("JsonNullableJackson3Module");
+ }
+
@Test
public void testReferencedHeader() {
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue855.yaml");
diff --git a/samples/client/echo_api/java/apache-httpclient/build.gradle b/samples/client/echo_api/java/apache-httpclient/build.gradle
index 5985d995bad7..7e065aef6803 100644
--- a/samples/client/echo_api/java/apache-httpclient/build.gradle
+++ b/samples/client/echo_api/java/apache-httpclient/build.gradle
@@ -110,6 +110,10 @@ if(hasProperty('target') && target == 'android') {
archives sourcesJar
archives javadocJar
}
+
+ test {
+ useJUnitPlatform()
+ }
}
ext {
@@ -121,7 +125,7 @@ ext {
jakarta_annotation_version = "1.3.5"
httpclient_version = "5.1.3"
jodatime_version = "2.9.9"
- junit_version = "4.13.2"
+ junit_version = "5.10.2"
}
dependencies {
@@ -135,5 +139,6 @@ dependencies {
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
- testImplementation "junit:junit:$junit_version"
+ testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
+ testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
}
diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java
index 433dd37dac39..4e445f42afac 100644
--- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java
+++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java
@@ -18,7 +18,6 @@
import java.time.OffsetDateTime;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JavaType;
import org.openapitools.jackson.nullable.JsonNullableModule;
import org.apache.hc.client5.http.cookie.BasicCookieStore;
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/.github/workflows/maven.yml b/samples/client/petstore/java/apache-httpclient-jackson3/.github/workflows/maven.yml
new file mode 100644
index 000000000000..460f78bfd1b2
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/.github/workflows/maven.yml
@@ -0,0 +1,30 @@
+# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
+# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+#
+# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)
+
+name: Java CI with Maven
+
+on:
+ push:
+ branches: [ main, master ]
+ pull_request:
+ branches: [ main, master ]
+
+jobs:
+ build:
+ name: Build OpenAPI Petstore
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [ 17, 21 ]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ matrix.java }}
+ distribution: 'temurin'
+ cache: maven
+ - name: Build with Maven
+ run: mvn -B package --no-transfer-progress --file pom.xml
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/.gitignore b/samples/client/petstore/java/apache-httpclient-jackson3/.gitignore
new file mode 100644
index 000000000000..a530464afa1b
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/.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/apache-httpclient-jackson3/.openapi-generator-ignore b/samples/client/petstore/java/apache-httpclient-jackson3/.openapi-generator-ignore
new file mode 100644
index 000000000000..7484ee590a38
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/.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/apache-httpclient-jackson3/.openapi-generator/FILES b/samples/client/petstore/java/apache-httpclient-jackson3/.openapi-generator/FILES
new file mode 100644
index 000000000000..2e1470853b44
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/.openapi-generator/FILES
@@ -0,0 +1,148 @@
+.github/workflows/maven.yml
+.gitignore
+.travis.yml
+README.md
+api/openapi.yaml
+build.gradle
+build.sbt
+docs/AdditionalPropertiesClass.md
+docs/AllOfWithSingleRef.md
+docs/Animal.md
+docs/AnotherFakeApi.md
+docs/ArrayOfArrayOfNumberOnly.md
+docs/ArrayOfNumberOnly.md
+docs/ArrayTest.md
+docs/Capitalization.md
+docs/Cat.md
+docs/Category.md
+docs/ChildWithNullable.md
+docs/ClassModel.md
+docs/Client.md
+docs/DefaultApi.md
+docs/DeprecatedObject.md
+docs/Dog.md
+docs/EnumArrays.md
+docs/EnumClass.md
+docs/EnumTest.md
+docs/FakeApi.md
+docs/FakeBigDecimalMap200Response.md
+docs/FakeClassnameTags123Api.md
+docs/FileSchemaTestClass.md
+docs/Foo.md
+docs/FooGetDefaultResponse.md
+docs/FormatTest.md
+docs/HasOnlyReadOnly.md
+docs/HealthCheckResult.md
+docs/MapTest.md
+docs/MixedPropertiesAndAdditionalPropertiesClass.md
+docs/Model200Response.md
+docs/ModelApiResponse.md
+docs/ModelFile.md
+docs/ModelList.md
+docs/ModelReturn.md
+docs/Name.md
+docs/NullableClass.md
+docs/NumberOnly.md
+docs/ObjectWithDeprecatedFields.md
+docs/Order.md
+docs/OuterComposite.md
+docs/OuterEnum.md
+docs/OuterEnumDefaultValue.md
+docs/OuterEnumInteger.md
+docs/OuterEnumIntegerDefaultValue.md
+docs/OuterObjectWithEnumProperty.md
+docs/ParentWithNullable.md
+docs/Pet.md
+docs/PetApi.md
+docs/ReadOnlyFirst.md
+docs/SingleRefType.md
+docs/SpecialModelName.md
+docs/StoreApi.md
+docs/Tag.md
+docs/TestInlineFreeformAdditionalPropertiesRequest.md
+docs/User.md
+docs/UserApi.md
+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/ApiException.java
+src/main/java/org/openapitools/client/BaseApi.java
+src/main/java/org/openapitools/client/Configuration.java
+src/main/java/org/openapitools/client/JavaTimeFormatter.java
+src/main/java/org/openapitools/client/Pair.java
+src/main/java/org/openapitools/client/RFC3339DateFormat.java
+src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java
+src/main/java/org/openapitools/client/RFC3339JavaTimeModule.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/DefaultApi.java
+src/main/java/org/openapitools/client/api/FakeApi.java
+src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
+src/main/java/org/openapitools/client/api/PetApi.java
+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/Authentication.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/AdditionalPropertiesClass.java
+src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java
+src/main/java/org/openapitools/client/model/Animal.java
+src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
+src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
+src/main/java/org/openapitools/client/model/ArrayTest.java
+src/main/java/org/openapitools/client/model/Capitalization.java
+src/main/java/org/openapitools/client/model/Cat.java
+src/main/java/org/openapitools/client/model/Category.java
+src/main/java/org/openapitools/client/model/ChildWithNullable.java
+src/main/java/org/openapitools/client/model/ClassModel.java
+src/main/java/org/openapitools/client/model/Client.java
+src/main/java/org/openapitools/client/model/DeprecatedObject.java
+src/main/java/org/openapitools/client/model/Dog.java
+src/main/java/org/openapitools/client/model/EnumArrays.java
+src/main/java/org/openapitools/client/model/EnumClass.java
+src/main/java/org/openapitools/client/model/EnumTest.java
+src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java
+src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
+src/main/java/org/openapitools/client/model/Foo.java
+src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java
+src/main/java/org/openapitools/client/model/FormatTest.java
+src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
+src/main/java/org/openapitools/client/model/HealthCheckResult.java
+src/main/java/org/openapitools/client/model/MapTest.java
+src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
+src/main/java/org/openapitools/client/model/Model200Response.java
+src/main/java/org/openapitools/client/model/ModelApiResponse.java
+src/main/java/org/openapitools/client/model/ModelFile.java
+src/main/java/org/openapitools/client/model/ModelList.java
+src/main/java/org/openapitools/client/model/ModelReturn.java
+src/main/java/org/openapitools/client/model/Name.java
+src/main/java/org/openapitools/client/model/NullableClass.java
+src/main/java/org/openapitools/client/model/NumberOnly.java
+src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java
+src/main/java/org/openapitools/client/model/Order.java
+src/main/java/org/openapitools/client/model/OuterComposite.java
+src/main/java/org/openapitools/client/model/OuterEnum.java
+src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java
+src/main/java/org/openapitools/client/model/OuterEnumInteger.java
+src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java
+src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java
+src/main/java/org/openapitools/client/model/ParentWithNullable.java
+src/main/java/org/openapitools/client/model/Pet.java
+src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
+src/main/java/org/openapitools/client/model/SingleRefType.java
+src/main/java/org/openapitools/client/model/SpecialModelName.java
+src/main/java/org/openapitools/client/model/Tag.java
+src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java
+src/main/java/org/openapitools/client/model/User.java
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/.openapi-generator/VERSION b/samples/client/petstore/java/apache-httpclient-jackson3/.openapi-generator/VERSION
new file mode 100644
index 000000000000..f7962df3e243
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.22.0-SNAPSHOT
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/.travis.yml b/samples/client/petstore/java/apache-httpclient-jackson3/.travis.yml
new file mode 100644
index 000000000000..1b6741c083c7
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/.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/apache-httpclient-jackson3/README.md b/samples/client/petstore/java/apache-httpclient-jackson3/README.md
new file mode 100644
index 000000000000..092ebd5265f8
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/README.md
@@ -0,0 +1,271 @@
+# petstore-apache-httpclient-jackson3
+
+OpenAPI Petstore
+
+- API version: 1.0.0
+
+- Generator version: 7.22.0-SNAPSHOT
+
+This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+
+*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
+
+## Requirements
+
+Building the API client library requires:
+
+1. Java 1.8+
+2. Maven/Gradle
+
+## Installation
+
+To install the API client library to your local Maven repository, simply execute:
+
+```shell
+mvn clean install
+```
+
+To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
+
+```shell
+mvn clean deploy
+```
+
+Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
+
+### Maven users
+
+Add this dependency to your project's POM:
+
+```xml
+
+ org.openapitools
+ petstore-apache-httpclient-jackson3
+ 1.0.0
+ compile
+
+```
+
+### Gradle users
+
+Add this dependency to your project's build file:
+
+```groovy
+compile "org.openapitools:petstore-apache-httpclient-jackson3:1.0.0"
+```
+
+### Others
+
+At first generate the JAR by executing:
+
+```shell
+mvn clean package
+```
+
+Then manually install the following JARs:
+
+- `target/petstore-apache-httpclient-jackson3-1.0.0.jar`
+- `target/lib/*.jar`
+
+## Getting Started
+
+Please follow the [installation](#installation) instruction and execute the following Java code:
+
+```java
+
+import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.AnotherFakeApi;
+
+public class AnotherFakeApiExample {
+
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
+ Client client = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.call123testSpecialTags(client);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo |
+*FakeApi* | [**fakeBigDecimalMap**](docs/FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap |
+*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint
+*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication
+*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
+*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
+*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
+*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
+*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
+*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
+*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
+*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
+*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
+*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
+*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
+*FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+*FakeApi* | [**testInlineFreeformAdditionalProperties**](docs/FakeApi.md#testInlineFreeformAdditionalProperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties
+*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
+*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property
+*FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters |
+*FakeApi* | [**testStringMapReference**](docs/FakeApi.md#testStringMapReference) | **POST** /fake/stringMap-reference | test referenced string map
+*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
+*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
+*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
+*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
+*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
+*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
+*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
+*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
+*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
+*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
+*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
+*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
+*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
+*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
+*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
+*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
+*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
+*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
+*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
+
+
+## Documentation for Models
+
+ - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
+ - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md)
+ - [Animal](docs/Animal.md)
+ - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
+ - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
+ - [ArrayTest](docs/ArrayTest.md)
+ - [Capitalization](docs/Capitalization.md)
+ - [Cat](docs/Cat.md)
+ - [Category](docs/Category.md)
+ - [ChildWithNullable](docs/ChildWithNullable.md)
+ - [ClassModel](docs/ClassModel.md)
+ - [Client](docs/Client.md)
+ - [DeprecatedObject](docs/DeprecatedObject.md)
+ - [Dog](docs/Dog.md)
+ - [EnumArrays](docs/EnumArrays.md)
+ - [EnumClass](docs/EnumClass.md)
+ - [EnumTest](docs/EnumTest.md)
+ - [FakeBigDecimalMap200Response](docs/FakeBigDecimalMap200Response.md)
+ - [FileSchemaTestClass](docs/FileSchemaTestClass.md)
+ - [Foo](docs/Foo.md)
+ - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
+ - [FormatTest](docs/FormatTest.md)
+ - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
+ - [HealthCheckResult](docs/HealthCheckResult.md)
+ - [MapTest](docs/MapTest.md)
+ - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
+ - [Model200Response](docs/Model200Response.md)
+ - [ModelApiResponse](docs/ModelApiResponse.md)
+ - [ModelFile](docs/ModelFile.md)
+ - [ModelList](docs/ModelList.md)
+ - [ModelReturn](docs/ModelReturn.md)
+ - [Name](docs/Name.md)
+ - [NullableClass](docs/NullableClass.md)
+ - [NumberOnly](docs/NumberOnly.md)
+ - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md)
+ - [Order](docs/Order.md)
+ - [OuterComposite](docs/OuterComposite.md)
+ - [OuterEnum](docs/OuterEnum.md)
+ - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
+ - [OuterEnumInteger](docs/OuterEnumInteger.md)
+ - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
+ - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md)
+ - [ParentWithNullable](docs/ParentWithNullable.md)
+ - [Pet](docs/Pet.md)
+ - [ReadOnlyFirst](docs/ReadOnlyFirst.md)
+ - [SingleRefType](docs/SingleRefType.md)
+ - [SpecialModelName](docs/SpecialModelName.md)
+ - [Tag](docs/Tag.md)
+ - [TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md)
+ - [User](docs/User.md)
+
+
+
+## Documentation for Authorization
+
+
+Authentication schemes defined for the API:
+
+### petstore_auth
+
+
+- **Type**: OAuth
+- **Flow**: implicit
+- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
+- **Scopes**:
+ - write:pets: modify pets in your account
+ - read:pets: read your pets
+
+
+### api_key
+
+
+- **Type**: API key
+- **API key parameter name**: api_key
+- **Location**: HTTP header
+
+
+### api_key_query
+
+
+- **Type**: API key
+- **API key parameter name**: api_key_query
+- **Location**: URL query string
+
+
+### http_basic_test
+
+
+- **Type**: HTTP basic authentication
+
+
+### bearer_test
+
+
+- **Type**: HTTP Bearer Token authentication (JWT)
+
+
+### http_signature_test
+
+
+- **Type**: HTTP signature authentication
+
+
+## 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/apache-httpclient-jackson3/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient-jackson3/api/openapi.yaml
new file mode 100644
index 000000000000..7d3a48a0496b
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/api/openapi.yaml
@@ -0,0 +1,2363 @@
+openapi: 3.0.0
+info:
+ description: "This spec is mainly for testing Petstore server and contains fake\
+ \ endpoints, models. Please do not use this for any other purpose. Special characters:\
+ \ \" \\"
+ license:
+ name: Apache-2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+ title: OpenAPI Petstore
+ version: 1.0.0
+servers:
+- description: petstore server
+ url: "http://{server}.swagger.io:{port}/v2"
+ variables:
+ server:
+ default: petstore
+ enum:
+ - petstore
+ - qa-petstore
+ - dev-petstore
+ port:
+ default: "80"
+ enum:
+ - "80"
+ - "8080"
+- description: The local server
+ url: "https://localhost:8080/{version}"
+ variables:
+ version:
+ default: v2
+ enum:
+ - v1
+ - v2
+- description: The local server without variables
+ url: https://127.0.0.1/no_varaible
+tags:
+- description: Everything about your Pets
+ name: pet
+- description: Access to Petstore orders
+ name: store
+- description: Operations about user
+ name: user
+paths:
+ /foo:
+ get:
+ responses:
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/_foo_get_default_response"
+ description: response
+ x-accepts:
+ - application/json
+ /pet:
+ post:
+ description: ""
+ operationId: addPet
+ requestBody:
+ $ref: "#/components/requestBodies/Pet"
+ responses:
+ "200":
+ description: Successful operation
+ "405":
+ description: Invalid input
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Add a new pet to the store
+ tags:
+ - pet
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ put:
+ description: ""
+ operationId: updatePet
+ requestBody:
+ $ref: "#/components/requestBodies/Pet"
+ responses:
+ "200":
+ description: Successful operation
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Pet not found
+ "405":
+ description: Validation exception
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Update an existing pet
+ tags:
+ - pet
+ x-webclient-blocking: true
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ servers:
+ - url: http://petstore.swagger.io/v2
+ - url: http://path-server-test.petstore.local/v2
+ - description: test server with variables
+ url: "http://{server}.swagger.io:{port}/v2"
+ variables:
+ server:
+ default: petstore
+ description: target server
+ enum:
+ - petstore
+ - qa-petstore
+ - dev-petstore
+ port:
+ default: "80"
+ enum:
+ - "80"
+ - "8080"
+ /pet/findByStatus:
+ get:
+ description: Multiple status values can be provided with comma separated strings
+ operationId: findPetsByStatus
+ parameters:
+ - deprecated: true
+ 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":
+ description: Invalid status value
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Finds Pets by status
+ tags:
+ - pet
+ x-webclient-blocking: true
+ x-accepts:
+ - application/json
+ - application/xml
+ /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":
+ description: Invalid tag value
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Finds Pets by tags
+ tags:
+ - pet
+ x-webclient-blocking: true
+ x-accepts:
+ - application/json
+ - application/xml
+ /pet/{petId}:
+ delete:
+ description: ""
+ operationId: deletePet
+ parameters:
+ - explode: false
+ in: header
+ name: api_key
+ required: false
+ schema:
+ type: string
+ style: simple
+ - description: Pet id to delete
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ responses:
+ "200":
+ description: Successful operation
+ "400":
+ 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
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: "#/components/schemas/Pet"
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Pet"
+ description: successful operation
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Pet not found
+ security:
+ - api_key: []
+ summary: Find pet by ID
+ tags:
+ - pet
+ x-webclient-blocking: true
+ x-accepts:
+ - application/json
+ - application/xml
+ post:
+ description: ""
+ operationId: updatePetWithForm
+ parameters:
+ - description: ID of pet that needs to be updated
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: "#/components/schemas/updatePetWithForm_request"
+ responses:
+ "200":
+ description: Successful operation
+ "405":
+ description: Invalid input
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Updates a pet in the store with form data
+ tags:
+ - pet
+ x-content-type: application/x-www-form-urlencoded
+ x-accepts:
+ - application/json
+ /pet/{petId}/uploadImage:
+ post:
+ description: ""
+ operationId: uploadFile
+ parameters:
+ - description: ID of pet to update
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: "#/components/schemas/uploadFile_request"
+ 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-content-type: 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-webclient-blocking: false
+ x-accepts:
+ - application/json
+ /store/order:
+ post:
+ description: ""
+ operationId: placeOrder
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Order"
+ description: order placed for purchasing the pet
+ required: true
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: "#/components/schemas/Order"
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Order"
+ description: successful operation
+ "400":
+ description: Invalid Order
+ summary: Place an order for a pet
+ tags:
+ - store
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ - application/xml
+ /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
+ explode: false
+ in: path
+ name: order_id
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "400":
+ description: Invalid ID supplied
+ "404":
+ 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 generate exceptions
+ operationId: getOrderById
+ parameters:
+ - description: ID of pet that needs to be fetched
+ explode: false
+ in: path
+ name: order_id
+ required: true
+ schema:
+ format: int64
+ maximum: 5
+ minimum: 1
+ type: integer
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: "#/components/schemas/Order"
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Order"
+ description: successful operation
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Order not found
+ summary: Find purchase order by ID
+ tags:
+ - store
+ x-accepts:
+ - application/json
+ - application/xml
+ /user:
+ post:
+ description: This can only be done by the logged in user.
+ operationId: createUser
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/User"
+ description: Created user object
+ required: true
+ responses:
+ default:
+ description: successful operation
+ summary: Create user
+ tags:
+ - user
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /user/createWithArray:
+ post:
+ description: ""
+ operationId: createUsersWithArrayInput
+ requestBody:
+ $ref: "#/components/requestBodies/UserArray"
+ responses:
+ default:
+ description: successful operation
+ summary: Creates list of users with given input array
+ tags:
+ - user
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /user/createWithList:
+ post:
+ description: ""
+ operationId: createUsersWithListInput
+ requestBody:
+ $ref: "#/components/requestBodies/UserArray"
+ responses:
+ default:
+ description: successful operation
+ summary: Creates list of users with given input array
+ tags:
+ - user
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /user/login:
+ get:
+ description: ""
+ operationId: loginUser
+ parameters:
+ - description: The user name for login
+ explode: true
+ in: query
+ name: username
+ required: true
+ schema:
+ type: string
+ style: form
+ - description: The password for login in clear text
+ explode: true
+ in: query
+ name: password
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ 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
+ explode: false
+ schema:
+ format: int32
+ type: integer
+ style: simple
+ X-Expires-After:
+ description: date in UTC when token expires
+ explode: false
+ schema:
+ format: date-time
+ type: string
+ style: simple
+ "400":
+ description: Invalid username/password supplied
+ summary: Logs user into the system
+ tags:
+ - user
+ x-accepts:
+ - application/json
+ - application/xml
+ /user/logout:
+ get:
+ description: ""
+ operationId: logoutUser
+ responses:
+ default:
+ 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
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ summary: Delete user
+ tags:
+ - user
+ x-accepts:
+ - application/json
+ get:
+ description: ""
+ operationId: getUserByName
+ parameters:
+ - description: The name that needs to be fetched. Use user1 for testing.
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: "#/components/schemas/User"
+ application/json:
+ schema:
+ $ref: "#/components/schemas/User"
+ description: successful operation
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ summary: Get user by user name
+ tags:
+ - user
+ x-accepts:
+ - application/json
+ - application/xml
+ put:
+ description: This can only be done by the logged in user.
+ operationId: updateUser
+ parameters:
+ - description: name that need to be deleted
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/User"
+ description: Updated user object
+ required: true
+ responses:
+ "400":
+ description: Invalid user supplied
+ "404":
+ description: User not found
+ summary: Updated user
+ tags:
+ - user
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /fake_classname_test:
+ patch:
+ description: To test class name in snake case
+ operationId: testClassname
+ requestBody:
+ $ref: "#/components/requestBodies/Client"
+ 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-content-type: 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
+ explode: true
+ in: query
+ name: required_string_group
+ required: true
+ schema:
+ type: integer
+ style: form
+ - description: Required Boolean in group parameters
+ explode: false
+ in: header
+ name: required_boolean_group
+ required: true
+ schema:
+ type: boolean
+ style: simple
+ - description: Required Integer in group parameters
+ explode: true
+ in: query
+ name: required_int64_group
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: form
+ - description: String in group parameters
+ explode: true
+ in: query
+ name: string_group
+ required: false
+ schema:
+ type: integer
+ style: form
+ - description: Boolean in group parameters
+ explode: false
+ in: header
+ name: boolean_group
+ required: false
+ schema:
+ type: boolean
+ style: simple
+ - description: Integer in group parameters
+ explode: true
+ in: query
+ name: int64_group
+ required: false
+ schema:
+ format: int64
+ type: integer
+ style: form
+ responses:
+ "400":
+ description: Something wrong
+ security:
+ - bearer_test: []
+ 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
+ required: false
+ schema:
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ style: simple
+ - description: Header parameter enum test (string)
+ explode: false
+ in: header
+ name: enum_header_string
+ required: false
+ schema:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ style: simple
+ - description: Query parameter enum test (string array)
+ explode: true
+ in: query
+ name: enum_query_string_array
+ required: false
+ schema:
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ style: form
+ - description: Query parameter enum test (string)
+ explode: true
+ in: query
+ name: enum_query_string
+ required: false
+ schema:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ style: form
+ - description: Query parameter enum test (double)
+ explode: true
+ in: query
+ name: enum_query_integer
+ required: false
+ schema:
+ enum:
+ - 1
+ - -2
+ format: int32
+ type: integer
+ style: form
+ - description: Query parameter enum test (double)
+ explode: true
+ in: query
+ name: enum_query_double
+ required: false
+ schema:
+ enum:
+ - 1.1
+ - -1.2
+ format: double
+ type: number
+ style: form
+ - explode: true
+ in: query
+ name: enum_query_model_array
+ required: false
+ schema:
+ items:
+ $ref: "#/components/schemas/EnumClass"
+ type: array
+ style: form
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: "#/components/schemas/testEnumParameters_request"
+ responses:
+ "400":
+ description: Invalid request
+ "404":
+ description: Not found
+ summary: To test enum parameters
+ tags:
+ - fake
+ x-content-type: application/x-www-form-urlencoded
+ x-accepts:
+ - application/json
+ patch:
+ description: To test "client" model
+ operationId: testClientModel
+ requestBody:
+ $ref: "#/components/requestBodies/Client"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Client"
+ description: successful operation
+ summary: To test "client" model
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ post:
+ description: |
+ Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ operationId: testEndpointParameters
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: "#/components/schemas/testEndpointParameters_request"
+ responses:
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ security:
+ - http_basic_test: []
+ summary: |
+ Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ tags:
+ - fake
+ x-content-type: application/x-www-form-urlencoded
+ x-accepts:
+ - application/json
+ /fake/outer/number:
+ post:
+ description: Test serialization of outer number types
+ operationId: fakeOuterNumberSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OuterNumber"
+ description: Input number as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: "#/components/schemas/OuterNumber"
+ description: Output number
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - '*/*'
+ /fake/property/enum-int:
+ post:
+ description: Test serialization of enum (int) properties with examples
+ operationId: fakePropertyEnumIntegerSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OuterObjectWithEnumProperty"
+ description: Input enum (int) as post body
+ required: true
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: "#/components/schemas/OuterObjectWithEnumProperty"
+ description: Output enum (int)
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - '*/*'
+ /fake/outer/string:
+ post:
+ description: Test serialization of outer string types
+ operationId: fakeOuterStringSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OuterString"
+ description: Input string as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: "#/components/schemas/OuterString"
+ description: Output string
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - '*/*'
+ /fake/outer/boolean:
+ post:
+ description: Test serialization of outer boolean types
+ operationId: fakeOuterBooleanSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OuterBoolean"
+ description: Input boolean as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: "#/components/schemas/OuterBoolean"
+ description: Output boolean
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - '*/*'
+ /fake/outer/composite:
+ post:
+ description: Test serialization of object with outer number type
+ operationId: fakeOuterCompositeSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OuterComposite"
+ description: Input composite as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: "#/components/schemas/OuterComposite"
+ description: Output composite
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - '*/*'
+ /fake/BigDecimalMap:
+ get:
+ description: "for Java apache and Java native, test toUrlQueryString for maps\
+ \ with BegDecimal keys"
+ operationId: fakeBigDecimalMap
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: "#/components/schemas/fakeBigDecimalMap_200_response"
+ description: successful operation
+ tags:
+ - fake
+ x-accepts:
+ - '*/*'
+ /fake/jsonFormData:
+ get:
+ description: ""
+ operationId: testJsonFormData
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: "#/components/schemas/testJsonFormData_request"
+ responses:
+ "200":
+ description: successful operation
+ summary: test json serialization of form data
+ tags:
+ - fake
+ x-content-type: application/x-www-form-urlencoded
+ x-accepts:
+ - application/json
+ /fake/additionalProperties-reference:
+ post:
+ description: ""
+ operationId: testAdditionalPropertiesReference
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/FreeFormObject"
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test referenced additionalProperties
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /fake/stringMap-reference:
+ post:
+ description: ""
+ operationId: testStringMapReference
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/MapOfString"
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test referenced string map
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /fake/inline-additionalProperties:
+ post:
+ description: ""
+ operationId: testInlineAdditionalProperties
+ requestBody:
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ type: string
+ type: object
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test inline additionalProperties
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /fake/inline-freeform-additionalProperties:
+ post:
+ description: ""
+ operationId: testInlineFreeformAdditionalProperties
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/testInlineFreeformAdditionalProperties_request"
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test inline free-form additionalProperties
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /fake/nullable:
+ post:
+ description: ""
+ operationId: testNullable
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ChildWithNullable"
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test nullable parent property
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /fake/body-with-query-params:
+ put:
+ operationId: testBodyWithQueryParams
+ parameters:
+ - explode: true
+ in: query
+ name: query
+ required: true
+ schema:
+ type: string
+ style: form
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/User"
+ required: true
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ x-content-type: application/json
+ 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:
+ $ref: "#/components/requestBodies/Client"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Client"
+ description: successful operation
+ summary: To test special tags
+ tags:
+ - $another-fake?
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /fake/body-with-file-schema:
+ put:
+ description: "For this test, the body for this request must reference a schema\
+ \ named `File`."
+ operationId: testBodyWithFileSchema
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/FileSchemaTestClass"
+ required: true
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+ /fake/body-with-binary:
+ put:
+ description: "For this test, the body has to be a binary file."
+ operationId: testBodyWithBinary
+ requestBody:
+ content:
+ image/png:
+ schema:
+ format: binary
+ nullable: true
+ type: string
+ description: image to upload
+ required: true
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ x-content-type: image/png
+ x-accepts:
+ - application/json
+ /fake/test-query-parameters:
+ put:
+ description: To test the collection format in query parameters
+ operationId: testQueryParameterCollectionFormat
+ parameters:
+ - explode: false
+ in: query
+ name: pipe
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: pipeDelimited
+ - explode: false
+ in: query
+ name: ioutil
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: false
+ 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
+ - explode: true
+ in: query
+ name: language
+ required: false
+ schema:
+ additionalProperties:
+ format: string
+ type: string
+ type: object
+ style: form
+ - allowEmptyValue: true
+ explode: true
+ in: query
+ name: allowEmpty
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ x-accepts:
+ - application/json
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ description: ""
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: "#/components/schemas/uploadFileWithRequiredFile_request"
+ 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-content-type: multipart/form-data
+ x-accepts:
+ - application/json
+ /fake/health:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HealthCheckResult"
+ description: The instance started successfully
+ summary: Health check endpoint
+ tags:
+ - fake
+ x-accepts:
+ - application/json
+ /fake/http-signature-test:
+ get:
+ operationId: fake-http-signature-test
+ parameters:
+ - description: query parameter
+ explode: true
+ in: query
+ name: query_1
+ required: false
+ schema:
+ type: string
+ style: form
+ - description: header parameter
+ explode: false
+ in: header
+ name: header_1
+ required: false
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ $ref: "#/components/requestBodies/Pet"
+ responses:
+ "200":
+ description: The instance started successfully
+ security:
+ - http_signature_test: []
+ summary: test http signature authentication
+ tags:
+ - fake
+ x-content-type: application/json
+ x-accepts:
+ - application/json
+components:
+ requestBodies:
+ UserArray:
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: "#/components/schemas/User"
+ type: array
+ description: List of user object
+ required: true
+ Client:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Client"
+ description: client model
+ required: true
+ Pet:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Pet"
+ application/xml:
+ schema:
+ $ref: "#/components/schemas/Pet"
+ description: Pet object that needs to be added to the store
+ required: true
+ schemas:
+ Foo:
+ example:
+ bar: bar
+ properties:
+ bar:
+ default: bar
+ type: string
+ type: object
+ Bar:
+ default: bar
+ type: string
+ Order:
+ example:
+ petId: 6
+ 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
+ xml:
+ name: photoUrl
+ type: array
+ uniqueItems: true
+ xml:
+ 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
+ Return:
+ description: Model for testing reserved words
+ properties:
+ return:
+ format: int32
+ type: integer
+ 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
+ xml:
+ name: Name
+ "200_response":
+ description: Model for testing model name starting with number
+ properties:
+ name:
+ format: int32
+ type: integer
+ class:
+ type: string
+ xml:
+ name: Name
+ ClassModel:
+ description: Model for testing model with "_class" property
+ properties:
+ _class:
+ type: string
+ Dog:
+ allOf:
+ - $ref: "#/components/schemas/Animal"
+ - properties:
+ breed:
+ type: string
+ type: object
+ Cat:
+ allOf:
+ - $ref: "#/components/schemas/Animal"
+ - properties:
+ declawed:
+ type: boolean
+ type: object
+ Animal:
+ discriminator:
+ mapping:
+ DOG: "#/components/schemas/Dog"
+ CAT: "#/components/schemas/Cat"
+ 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: 100
+ minimum: 10
+ type: integer
+ int32:
+ format: int32
+ maximum: 200
+ minimum: 20
+ 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
+ decimal:
+ format: number
+ type: string
+ string:
+ pattern: "/[a-z]/i"
+ type: string
+ byte:
+ format: byte
+ 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
+ pattern_with_digits:
+ description: A string that is a 10 digit number. Can have leading zeros.
+ pattern: "^\\d{10}$"
+ type: string
+ pattern_with_digits_and_delimiter:
+ description: A string starting with 'image_' (case insensitive) and one
+ to three digits following i.e. Image_01.
+ pattern: "/^image_\\d{1,3}$/i"
+ type: string
+ required:
+ - byte
+ - 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"
+ outerEnumInteger:
+ $ref: "#/components/schemas/OuterEnumInteger"
+ outerEnumDefaultValue:
+ $ref: "#/components/schemas/OuterEnumDefaultValue"
+ outerEnumIntegerDefaultValue:
+ $ref: "#/components/schemas/OuterEnumIntegerDefaultValue"
+ required:
+ - enum_string_required
+ type: object
+ AdditionalPropertiesClass:
+ properties:
+ map_property:
+ additionalProperties:
+ type: string
+ type: object
+ map_of_map_property:
+ additionalProperties:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ 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
+ maxItems: 3
+ minItems: 0
+ 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
+ FreeFormObject:
+ additionalProperties: true
+ description: A schema consisting only of additional properties
+ type: object
+ MapOfString:
+ additionalProperties:
+ type: string
+ description: A schema consisting only of additional properties of type string
+ type: object
+ OuterEnum:
+ enum:
+ - placed
+ - approved
+ - delivered
+ nullable: true
+ type: string
+ OuterEnumInteger:
+ enum:
+ - 0
+ - 1
+ - 2
+ example: 2
+ type: integer
+ OuterEnumDefaultValue:
+ default: placed
+ enum:
+ - placed
+ - approved
+ - delivered
+ type: string
+ OuterEnumIntegerDefaultValue:
+ default: 0
+ enum:
+ - 0
+ - 1
+ - 2
+ type: integer
+ OuterComposite:
+ example:
+ my_string: my_string
+ 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
+ ParentWithNullable:
+ discriminator:
+ propertyName: type
+ properties:
+ type:
+ enum:
+ - ChildWithNullable
+ type: string
+ nullableProperty:
+ nullable: true
+ type: string
+ type: object
+ ChildWithNullable:
+ allOf:
+ - $ref: "#/components/schemas/ParentWithNullable"
+ - properties:
+ otherProperty:
+ type: string
+ type: object
+ example:
+ otherProperty: otherProperty
+ nullableProperty: nullableProperty
+ type: ChildWithNullable
+ 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
+ _special_model.name_:
+ properties:
+ $special[property.name]:
+ format: int64
+ type: integer
+ xml:
+ name: "$special[model.name]"
+ HealthCheckResult:
+ description: Just a string to inform instance is up and running. Make it nullable
+ in hope to get it as pointer in generated model.
+ example:
+ NullableMessage: NullableMessage
+ properties:
+ NullableMessage:
+ nullable: true
+ type: string
+ type: object
+ NullableClass:
+ additionalProperties:
+ nullable: true
+ type: object
+ properties:
+ integer_prop:
+ nullable: true
+ type: integer
+ number_prop:
+ nullable: true
+ type: number
+ boolean_prop:
+ nullable: true
+ type: boolean
+ string_prop:
+ nullable: true
+ type: string
+ date_prop:
+ format: date
+ nullable: true
+ type: string
+ datetime_prop:
+ format: date-time
+ nullable: true
+ type: string
+ array_nullable_prop:
+ items:
+ type: object
+ nullable: true
+ type: array
+ array_and_items_nullable_prop:
+ items:
+ nullable: true
+ type: object
+ nullable: true
+ type: array
+ array_items_nullable:
+ items:
+ nullable: true
+ type: object
+ type: array
+ object_nullable_prop:
+ additionalProperties:
+ type: object
+ nullable: true
+ type: object
+ object_and_items_nullable_prop:
+ additionalProperties:
+ nullable: true
+ type: object
+ nullable: true
+ type: object
+ object_items_nullable:
+ additionalProperties:
+ nullable: true
+ type: object
+ type: object
+ type: object
+ OuterObjectWithEnumProperty:
+ example:
+ value: 2
+ properties:
+ value:
+ $ref: "#/components/schemas/OuterEnumInteger"
+ required:
+ - value
+ type: object
+ DeprecatedObject:
+ deprecated: true
+ properties:
+ name:
+ type: string
+ type: object
+ ObjectWithDeprecatedFields:
+ properties:
+ uuid:
+ type: string
+ id:
+ deprecated: true
+ type: number
+ deprecatedRef:
+ $ref: "#/components/schemas/DeprecatedObject"
+ bars:
+ deprecated: true
+ items:
+ $ref: "#/components/schemas/Bar"
+ type: array
+ type: object
+ AllOfWithSingleRef:
+ properties:
+ username:
+ type: string
+ SingleRefType:
+ allOf:
+ - $ref: "#/components/schemas/SingleRefType"
+ type: object
+ SingleRefType:
+ enum:
+ - admin
+ - user
+ title: SingleRefType
+ type: string
+ _foo_get_default_response:
+ example:
+ string:
+ bar: bar
+ properties:
+ string:
+ $ref: "#/components/schemas/Foo"
+ type: object
+ updatePetWithForm_request:
+ properties:
+ name:
+ description: Updated name of the pet
+ type: string
+ status:
+ description: Updated status of the pet
+ type: string
+ type: object
+ uploadFile_request:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ type: object
+ testEnumParameters_request:
+ 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
+ type: object
+ testEndpointParameters_request:
+ properties:
+ integer:
+ description: None
+ 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
+ type: object
+ fakeBigDecimalMap_200_response:
+ example:
+ someId: 0.8008281904610115
+ someMap:
+ key: 6.027456183070403
+ properties:
+ someId:
+ type: number
+ someMap:
+ additionalProperties:
+ type: number
+ type: object
+ type: object
+ testJsonFormData_request:
+ properties:
+ param:
+ description: field1
+ type: string
+ param2:
+ description: field2
+ type: string
+ required:
+ - param
+ - param2
+ type: object
+ testInlineFreeformAdditionalProperties_request:
+ additionalProperties: true
+ properties:
+ someProperty:
+ type: string
+ type: object
+ uploadFileWithRequiredFile_request:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ requiredFile:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - requiredFile
+ type: object
+ 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
+ bearer_test:
+ bearerFormat: JWT
+ scheme: bearer
+ type: http
+ http_signature_test:
+ scheme: signature
+ type: http
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/build.gradle b/samples/client/petstore/java/apache-httpclient-jackson3/build.gradle
new file mode 100644
index 000000000000..85fcf1d22dc7
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/build.gradle
@@ -0,0 +1,142 @@
+apply plugin: 'idea'
+apply plugin: 'eclipse'
+
+group = 'org.openapitools'
+version = '1.0.0'
+
+buildscript {
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.3.+'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
+ }
+}
+
+repositories {
+ mavenCentral()
+}
+
+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_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ // 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 "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
+ }
+ }
+
+ 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.destinationDirectory
+ task.destinationDirectory = project.file("${project.buildDir}/outputs/jar")
+ task.archiveFileName = "${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-publish'
+
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+
+ publishing {
+ publications {
+ maven(MavenPublication) {
+ artifactId = 'petstore-apache-httpclient-jackson3'
+
+ from components.java
+ }
+ }
+ }
+
+ task execute(type:JavaExec) {
+ main = System.getProperty('mainClass')
+ classpath = sourceSets.main.runtimeClasspath
+ }
+
+ task sourcesJar(type: Jar, dependsOn: classes) {
+ archiveClassifier = 'sources'
+ from sourceSets.main.allSource
+ }
+
+ task javadocJar(type: Jar, dependsOn: javadoc) {
+ archiveClassifier = 'javadoc'
+ from javadoc.destinationDir
+ }
+
+ artifacts {
+ archives sourcesJar
+ archives javadocJar
+ }
+
+ test {
+ useJUnitPlatform()
+ }
+}
+
+ext {
+ swagger_annotations_version = "1.6.6"
+ jackson3_version = "3.1.0"
+ jackson_annotations_version = "2.21"
+ jackson_databind_nullable_version = "0.2.10"
+ jakarta_annotation_version = "1.3.5"
+ httpclient_version = "5.1.3"
+ jodatime_version = "2.9.9"
+ junit_version = "5.10.2"
+}
+
+dependencies {
+ implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
+ implementation "com.google.code.findbugs:jsr305:3.0.2"
+ implementation "org.apache.httpcomponents.client5:httpclient5:$httpclient_version"
+ implementation "tools.jackson.core:jackson-core:$jackson3_version"
+ implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_annotations_version"
+ implementation "tools.jackson.core:jackson-databind:$jackson3_version"
+ implementation "tools.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson3_version"
+ implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
+ implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
+ testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
+ testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/build.sbt b/samples/client/petstore/java/apache-httpclient-jackson3/build.sbt
new file mode 100644
index 000000000000..464090415c47
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/build.sbt
@@ -0,0 +1 @@
+# TODO
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/AdditionalPropertiesClass.md
new file mode 100644
index 000000000000..fe69a56eebf4
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/AdditionalPropertiesClass.md
@@ -0,0 +1,14 @@
+
+
+# AdditionalPropertiesClass
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**mapProperty** | **Map<String, String>** | | [optional] |
+|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/AllOfWithSingleRef.md
new file mode 100644
index 000000000000..4146d56a372b
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/AllOfWithSingleRef.md
@@ -0,0 +1,14 @@
+
+
+# AllOfWithSingleRef
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**username** | **String** | | [optional] |
+|**singleRefType** | **SingleRefType** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Animal.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Animal.md
new file mode 100644
index 000000000000..d9b32f14c88a
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Animal.md
@@ -0,0 +1,14 @@
+
+
+# Animal
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**className** | **String** | | |
+|**color** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/AnotherFakeApi.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/AnotherFakeApi.md
new file mode 100644
index 000000000000..73c966d2d549
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/AnotherFakeApi.md
@@ -0,0 +1,75 @@
+# AnotherFakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags |
+
+
+
+## call123testSpecialTags
+
+> Client call123testSpecialTags(client)
+
+To test special tags
+
+To test special tags and operation ID starting with number
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.AnotherFakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
+ Client client = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.call123testSpecialTags(client);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **client** | [**Client**](Client.md)| client model | |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayOfArrayOfNumberOnly.md
new file mode 100644
index 000000000000..0188db3eb131
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayOfArrayOfNumberOnly.md
@@ -0,0 +1,13 @@
+
+
+# ArrayOfArrayOfNumberOnly
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayOfNumberOnly.md
new file mode 100644
index 000000000000..a5753530aada
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayOfNumberOnly.md
@@ -0,0 +1,13 @@
+
+
+# ArrayOfNumberOnly
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**arrayNumber** | **List<BigDecimal>** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayTest.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayTest.md
new file mode 100644
index 000000000000..36077c9df300
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ArrayTest.md
@@ -0,0 +1,15 @@
+
+
+# ArrayTest
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**arrayOfString** | **List<String>** | | [optional] |
+|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] |
+|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Capitalization.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Capitalization.md
new file mode 100644
index 000000000000..82a812711de2
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Capitalization.md
@@ -0,0 +1,18 @@
+
+
+# Capitalization
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**smallCamel** | **String** | | [optional] |
+|**capitalCamel** | **String** | | [optional] |
+|**smallSnake** | **String** | | [optional] |
+|**capitalSnake** | **String** | | [optional] |
+|**scAETHFlowPoints** | **String** | | [optional] |
+|**ATT_NAME** | **String** | Name of the pet | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Cat.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Cat.md
new file mode 100644
index 000000000000..390dd519c8ce
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Cat.md
@@ -0,0 +1,13 @@
+
+
+# Cat
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**declawed** | **Boolean** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Category.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Category.md
new file mode 100644
index 000000000000..ab6d1ec334dc
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Category.md
@@ -0,0 +1,14 @@
+
+
+# Category
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | | [optional] |
+|**name** | **String** | | |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ChildWithNullable.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ChildWithNullable.md
new file mode 100644
index 000000000000..73c0dd6d4737
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ChildWithNullable.md
@@ -0,0 +1,13 @@
+
+
+# ChildWithNullable
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**otherProperty** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ClassModel.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ClassModel.md
new file mode 100644
index 000000000000..af46dea1f6c8
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ClassModel.md
@@ -0,0 +1,14 @@
+
+
+# ClassModel
+
+Model for testing model with \"_class\" property
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**propertyClass** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Client.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Client.md
new file mode 100644
index 000000000000..ef07b4ab8b9d
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Client.md
@@ -0,0 +1,13 @@
+
+
+# Client
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**client** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/DefaultApi.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/DefaultApi.md
new file mode 100644
index 000000000000..2c56e1f90e54
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/DefaultApi.md
@@ -0,0 +1,69 @@
+# DefaultApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | |
+
+
+
+## fooGet
+
+> FooGetDefaultResponse fooGet()
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.DefaultApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ DefaultApi apiInstance = new DefaultApi(defaultClient);
+ try {
+ FooGetDefaultResponse result = apiInstance.fooGet();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DefaultApi#fooGet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | response | - |
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/DeprecatedObject.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/DeprecatedObject.md
new file mode 100644
index 000000000000..48de1d624425
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/DeprecatedObject.md
@@ -0,0 +1,13 @@
+
+
+# DeprecatedObject
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**name** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Dog.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Dog.md
new file mode 100644
index 000000000000..972c981c0d05
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Dog.md
@@ -0,0 +1,13 @@
+
+
+# Dog
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**breed** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumArrays.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumArrays.md
new file mode 100644
index 000000000000..b2222d5beb25
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumArrays.md
@@ -0,0 +1,32 @@
+
+
+# EnumArrays
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] |
+|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] |
+
+
+
+## Enum: JustSymbolEnum
+
+| Name | Value |
+|---- | -----|
+| GREATER_THAN_OR_EQUAL_TO | ">=" |
+| DOLLAR | "$" |
+
+
+
+## Enum: List<ArrayEnumEnum>
+
+| Name | Value |
+|---- | -----|
+| FISH | "fish" |
+| CRAB | "crab" |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumClass.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumClass.md
new file mode 100644
index 000000000000..b314590a7591
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumClass.md
@@ -0,0 +1,15 @@
+
+
+# EnumClass
+
+## Enum
+
+
+* `_ABC` (value: `"_abc"`)
+
+* `_EFG` (value: `"-efg"`)
+
+* `_XYZ_` (value: `"(xyz)"`)
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumTest.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumTest.md
new file mode 100644
index 000000000000..380a2aef0bc3
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/EnumTest.md
@@ -0,0 +1,58 @@
+
+
+# EnumTest
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] |
+|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | |
+|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] |
+|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] |
+|**outerEnum** | **OuterEnum** | | [optional] |
+|**outerEnumInteger** | **OuterEnumInteger** | | [optional] |
+|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] |
+|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] |
+
+
+
+## Enum: EnumStringEnum
+
+| Name | Value |
+|---- | -----|
+| UPPER | "UPPER" |
+| LOWER | "lower" |
+| EMPTY | "" |
+
+
+
+## Enum: EnumStringRequiredEnum
+
+| Name | Value |
+|---- | -----|
+| UPPER | "UPPER" |
+| LOWER | "lower" |
+| EMPTY | "" |
+
+
+
+## Enum: EnumIntegerEnum
+
+| Name | Value |
+|---- | -----|
+| NUMBER_1 | 1 |
+| NUMBER_MINUS_1 | -1 |
+
+
+
+## Enum: EnumNumberEnum
+
+| Name | Value |
+|---- | -----|
+| NUMBER_1_DOT_1 | 1.1 |
+| NUMBER_MINUS_1_DOT_2 | -1.2 |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeApi.md
new file mode 100644
index 000000000000..37a949ea0508
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeApi.md
@@ -0,0 +1,1541 @@
+# FakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**fakeBigDecimalMap**](FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | |
+| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint |
+| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication |
+| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | |
+| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | |
+| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
+| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
+| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | |
+| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
+| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | |
+| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
+| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
+| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model |
+| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 |
+| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters |
+| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
+| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
+| [**testInlineFreeformAdditionalProperties**](FakeApi.md#testInlineFreeformAdditionalProperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
+| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data |
+| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property |
+| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | |
+| [**testStringMapReference**](FakeApi.md#testStringMapReference) | **POST** /fake/stringMap-reference | test referenced string map |
+
+
+
+## fakeBigDecimalMap
+
+> FakeBigDecimalMap200Response fakeBigDecimalMap()
+
+
+
+for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ try {
+ FakeBigDecimalMap200Response result = apiInstance.fakeBigDecimalMap();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeBigDecimalMap");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## fakeHealthGet
+
+> HealthCheckResult fakeHealthGet()
+
+Health check endpoint
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ try {
+ HealthCheckResult result = apiInstance.fakeHealthGet();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeHealthGet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**HealthCheckResult**](HealthCheckResult.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | The instance started successfully | - |
+
+
+## fakeHttpSignatureTest
+
+> fakeHttpSignatureTest(pet, query1, header1)
+
+test http signature authentication
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
+ String query1 = "query1_example"; // String | query parameter
+ String header1 = "header1_example"; // String | header parameter
+ try {
+ apiInstance.fakeHttpSignatureTest(pet, query1, header1);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
+| **query1** | **String**| query parameter | [optional] |
+| **header1** | **String**| header parameter | [optional] |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+- **Content-Type**: application/json, application/xml
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | The instance started successfully | - |
+
+
+## fakeOuterBooleanSerialize
+
+> Boolean fakeOuterBooleanSerialize(body)
+
+
+
+Test serialization of outer boolean types
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Boolean body = true; // Boolean | Input boolean as post body
+ try {
+ Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **body** | **Boolean**| Input boolean as post body | [optional] |
+
+### Return type
+
+**Boolean**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output boolean | - |
+
+
+## fakeOuterCompositeSerialize
+
+> OuterComposite fakeOuterCompositeSerialize(outerComposite)
+
+
+
+Test serialization of object with outer number type
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body
+ try {
+ OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] |
+
+### Return type
+
+[**OuterComposite**](OuterComposite.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output composite | - |
+
+
+## fakeOuterNumberSerialize
+
+> BigDecimal fakeOuterNumberSerialize(body)
+
+
+
+Test serialization of outer number types
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body
+ try {
+ BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **body** | **BigDecimal**| Input number as post body | [optional] |
+
+### Return type
+
+[**BigDecimal**](BigDecimal.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output number | - |
+
+
+## fakeOuterStringSerialize
+
+> String fakeOuterStringSerialize(body)
+
+
+
+Test serialization of outer string types
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String body = "body_example"; // String | Input string as post body
+ try {
+ String result = apiInstance.fakeOuterStringSerialize(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **body** | **String**| Input string as post body | [optional] |
+
+### Return type
+
+**String**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output string | - |
+
+
+## fakePropertyEnumIntegerSerialize
+
+> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty)
+
+
+
+Test serialization of enum (int) properties with examples
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body
+ try {
+ OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | |
+
+### Return type
+
+[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output enum (int) | - |
+
+
+## testAdditionalPropertiesReference
+
+> testAdditionalPropertiesReference(requestBody)
+
+test referenced additionalProperties
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Map requestBody = null; // Map | request body
+ try {
+ apiInstance.testAdditionalPropertiesReference(requestBody);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## testBodyWithBinary
+
+> testBodyWithBinary(body)
+
+
+
+For this test, the body has to be a binary file.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ File body = new File("/path/to/file"); // File | image to upload
+ try {
+ apiInstance.testBodyWithBinary(body);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithBinary");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **body** | **File**| image to upload | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: image/png
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+
+## testBodyWithFileSchema
+
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request must reference a schema named `File`.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass |
+ try {
+ apiInstance.testBodyWithFileSchema(fileSchemaTestClass);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+
+## testBodyWithQueryParams
+
+> testBodyWithQueryParams(query, user)
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String query = "query_example"; // String |
+ User user = new User(); // User |
+ try {
+ apiInstance.testBodyWithQueryParams(query, user);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **query** | **String**| | |
+| **user** | [**User**](User.md)| | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+
+## testClientModel
+
+> Client testClientModel(client)
+
+To test \"client\" model
+
+To test \"client\" model
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Client client = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.testClientModel(client);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testClientModel");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **client** | [**Client**](Client.md)| client model | |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## testEndpointParameters
+
+> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure HTTP basic authorization: http_basic_test
+ HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test");
+ http_basic_test.setUsername("YOUR USERNAME");
+ http_basic_test.setPassword("YOUR PASSWORD");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ BigDecimal number = new BigDecimal(78); // BigDecimal | None
+ Double _double = 3.4D; // Double | None
+ String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
+ byte[] _byte = null; // byte[] | None
+ Integer integer = 56; // Integer | None
+ Integer int32 = 56; // Integer | None
+ Long int64 = 56L; // Long | None
+ Float _float = 3.4F; // Float | None
+ String string = "string_example"; // String | None
+ File binary = new File("/path/to/file"); // File | None
+ LocalDate date = LocalDate.now(); // LocalDate | None
+ OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None
+ String password = "password_example"; // String | None
+ String paramCallback = "paramCallback_example"; // String | None
+ try {
+ apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testEndpointParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **number** | **BigDecimal**| None | |
+| **_double** | **Double**| None | |
+| **patternWithoutDelimiter** | **String**| None | |
+| **_byte** | **byte[]**| None | |
+| **integer** | **Integer**| None | [optional] |
+| **int32** | **Integer**| None | [optional] |
+| **int64** | **Long**| None | [optional] |
+| **_float** | **Float**| None | [optional] |
+| **string** | **String**| None | [optional] |
+| **binary** | **File**| None | [optional] |
+| **date** | **LocalDate**| None | [optional] |
+| **dateTime** | **OffsetDateTime**| None | [optional] |
+| **password** | **String**| None | [optional] |
+| **paramCallback** | **String**| None | [optional] |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[http_basic_test](../README.md#http_basic_test)
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+
+## testEnumParameters
+
+> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString)
+
+To test enum parameters
+
+To test enum parameters
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array)
+ String enumHeaderString = "_abc"; // String | Header parameter enum test (string)
+ List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array)
+ String enumQueryString = "_abc"; // String | Query parameter enum test (string)
+ Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
+ Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
+ List enumQueryModelArray = Arrays.asList(-efg); // List |
+ List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array)
+ String enumFormString = "_abc"; // String | Form parameter enum test (string)
+ try {
+ apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testEnumParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] |
+| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] |
+| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] |
+| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] |
+| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] |
+| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] |
+| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] |
+| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] |
+| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid request | - |
+| **404** | Not found | - |
+
+
+## testGroupParameters
+
+> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
+
+Fake endpoint to test group parameters (optional)
+
+Fake endpoint to test group parameters (optional)
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure HTTP bearer authorization: bearer_test
+ HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test");
+ bearer_test.setBearerToken("BEARER TOKEN");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Integer requiredStringGroup = 56; // Integer | Required String in group parameters
+ Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters
+ Long requiredInt64Group = 56L; // Long | Required Integer in group parameters
+ Integer stringGroup = 56; // Integer | String in group parameters
+ Boolean booleanGroup = true; // Boolean | Boolean in group parameters
+ Long int64Group = 56L; // Long | Integer in group parameters
+ try {
+ apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testGroupParameters");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **requiredStringGroup** | **Integer**| Required String in group parameters | |
+| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | |
+| **requiredInt64Group** | **Long**| Required Integer in group parameters | |
+| **stringGroup** | **Integer**| String in group parameters | [optional] |
+| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] |
+| **int64Group** | **Long**| Integer in group parameters | [optional] |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[bearer_test](../README.md#bearer_test)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Something wrong | - |
+
+
+## testInlineAdditionalProperties
+
+> testInlineAdditionalProperties(requestBody)
+
+test inline additionalProperties
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Map requestBody = new HashMap(); // Map | request body
+ try {
+ apiInstance.testInlineAdditionalProperties(requestBody);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **requestBody** | [**Map<String, String>**](String.md)| request body | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## testInlineFreeformAdditionalProperties
+
+> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest)
+
+test inline free-form additionalProperties
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body
+ try {
+ apiInstance.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testInlineFreeformAdditionalProperties");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## testJsonFormData
+
+> testJsonFormData(param, param2)
+
+test json serialization of form data
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ String param = "param_example"; // String | field1
+ String param2 = "param2_example"; // String | field2
+ try {
+ apiInstance.testJsonFormData(param, param2);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testJsonFormData");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **param** | **String**| field1 | |
+| **param2** | **String**| field2 | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## testNullable
+
+> testNullable(childWithNullable)
+
+test nullable parent property
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body
+ try {
+ apiInstance.testNullable(childWithNullable);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testNullable");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## testQueryParameterCollectionFormat
+
+> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language)
+
+
+
+To test the collection format in query parameters
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ List pipe = Arrays.asList(); // List |
+ List ioutil = Arrays.asList(); // List |
+ List http = Arrays.asList(); // List |
+ List url = Arrays.asList(); // List |
+ List context = Arrays.asList(); // List |
+ String allowEmpty = "allowEmpty_example"; // String |
+ Map language = new HashMap(); // Map |
+ try {
+ apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **pipe** | [**List<String>**](String.md)| | |
+| **ioutil** | [**List<String>**](String.md)| | |
+| **http** | [**List<String>**](String.md)| | |
+| **url** | [**List<String>**](String.md)| | |
+| **context** | [**List<String>**](String.md)| | |
+| **allowEmpty** | **String**| | |
+| **language** | [**Map<String, String>**](String.md)| | [optional] |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+
+## testStringMapReference
+
+> testStringMapReference(requestBody)
+
+test referenced string map
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ FakeApi apiInstance = new FakeApi(defaultClient);
+ Map requestBody = new HashMap(); // Map | request body
+ try {
+ apiInstance.testStringMapReference(requestBody);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testStringMapReference");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **requestBody** | [**Map<String, String>**](String.md)| request body | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeBigDecimalMap200Response.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeBigDecimalMap200Response.md
new file mode 100644
index 000000000000..475be1d2d738
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeBigDecimalMap200Response.md
@@ -0,0 +1,14 @@
+
+
+# FakeBigDecimalMap200Response
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**someId** | **BigDecimal** | | [optional] |
+|**someMap** | **Map<String, BigDecimal>** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeClassnameTags123Api.md
new file mode 100644
index 000000000000..e4ff70ed909b
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FakeClassnameTags123Api.md
@@ -0,0 +1,82 @@
+# FakeClassnameTags123Api
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case |
+
+
+
+## testClassname
+
+> Client testClassname(client)
+
+To test class name in snake case
+
+To test class name in snake case
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.FakeClassnameTags123Api;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key_query
+ ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
+ api_key_query.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key_query.setApiKeyPrefix("Token");
+
+ FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
+ Client client = new Client(); // Client | client model
+ try {
+ Client result = apiInstance.testClassname(client);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **client** | [**Client**](Client.md)| client model | |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+[api_key_query](../README.md#api_key_query)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/FileSchemaTestClass.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..85d1a0636694
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FileSchemaTestClass.md
@@ -0,0 +1,14 @@
+
+
+# FileSchemaTestClass
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**_file** | [**ModelFile**](ModelFile.md) | | [optional] |
+|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Foo.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Foo.md
new file mode 100644
index 000000000000..6b3f0556528a
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Foo.md
@@ -0,0 +1,13 @@
+
+
+# Foo
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**bar** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FooGetDefaultResponse.md
new file mode 100644
index 000000000000..ff3d7a3a56c3
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FooGetDefaultResponse.md
@@ -0,0 +1,13 @@
+
+
+# FooGetDefaultResponse
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**string** | [**Foo**](Foo.md) | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/FormatTest.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FormatTest.md
new file mode 100644
index 000000000000..01b8c777ae06
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/FormatTest.md
@@ -0,0 +1,28 @@
+
+
+# FormatTest
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**integer** | **Integer** | | [optional] |
+|**int32** | **Integer** | | [optional] |
+|**int64** | **Long** | | [optional] |
+|**number** | **BigDecimal** | | |
+|**_float** | **Float** | | [optional] |
+|**_double** | **Double** | | [optional] |
+|**decimal** | **BigDecimal** | | [optional] |
+|**string** | **String** | | [optional] |
+|**_byte** | **byte[]** | | |
+|**binary** | **File** | | [optional] |
+|**date** | **LocalDate** | | |
+|**dateTime** | **OffsetDateTime** | | [optional] |
+|**uuid** | **UUID** | | [optional] |
+|**password** | **String** | | |
+|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] |
+|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/HasOnlyReadOnly.md
new file mode 100644
index 000000000000..29da5205dbba
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/HasOnlyReadOnly.md
@@ -0,0 +1,14 @@
+
+
+# HasOnlyReadOnly
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**bar** | **String** | | [optional] [readonly] |
+|**foo** | **String** | | [optional] [readonly] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/HealthCheckResult.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/HealthCheckResult.md
new file mode 100644
index 000000000000..4885e6f1cada
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/HealthCheckResult.md
@@ -0,0 +1,14 @@
+
+
+# HealthCheckResult
+
+Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**nullableMessage** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/MapTest.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/MapTest.md
new file mode 100644
index 000000000000..54380188e1d6
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/MapTest.md
@@ -0,0 +1,25 @@
+
+
+# MapTest
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] |
+|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] |
+|**directMap** | **Map<String, Boolean>** | | [optional] |
+|**indirectMap** | **Map<String, Boolean>** | | [optional] |
+
+
+
+## Enum: Map<String, InnerEnum>
+
+| Name | Value |
+|---- | -----|
+| UPPER | "UPPER" |
+| LOWER | "lower" |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/MixedPropertiesAndAdditionalPropertiesClass.md
new file mode 100644
index 000000000000..a5ddf0faa6a9
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -0,0 +1,15 @@
+
+
+# MixedPropertiesAndAdditionalPropertiesClass
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**uuid** | **UUID** | | [optional] |
+|**dateTime** | **OffsetDateTime** | | [optional] |
+|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Model200Response.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Model200Response.md
new file mode 100644
index 000000000000..109411580c62
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Model200Response.md
@@ -0,0 +1,15 @@
+
+
+# Model200Response
+
+Model for testing model name starting with number
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**name** | **Integer** | | [optional] |
+|**propertyClass** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelApiResponse.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelApiResponse.md
new file mode 100644
index 000000000000..e374c2dd2dec
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelApiResponse.md
@@ -0,0 +1,15 @@
+
+
+# ModelApiResponse
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**code** | **Integer** | | [optional] |
+|**type** | **String** | | [optional] |
+|**message** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelFile.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelFile.md
new file mode 100644
index 000000000000..adcde984f527
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelFile.md
@@ -0,0 +1,14 @@
+
+
+# ModelFile
+
+Must be named `File` for test.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**sourceURI** | **String** | Test capitalization | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelList.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelList.md
new file mode 100644
index 000000000000..f93ab7dde8d4
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelList.md
@@ -0,0 +1,13 @@
+
+
+# ModelList
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**_123list** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelReturn.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelReturn.md
new file mode 100644
index 000000000000..0bd356861eb7
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ModelReturn.md
@@ -0,0 +1,14 @@
+
+
+# ModelReturn
+
+Model for testing reserved words
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**_return** | **Integer** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Name.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Name.md
new file mode 100644
index 000000000000..c901d9435309
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Name.md
@@ -0,0 +1,17 @@
+
+
+# Name
+
+Model for testing model name same as property name
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**name** | **Integer** | | |
+|**snakeCase** | **Integer** | | [optional] [readonly] |
+|**property** | **String** | | [optional] |
+|**_123number** | **Integer** | | [optional] [readonly] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/NullableClass.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/NullableClass.md
new file mode 100644
index 000000000000..fa98c5c6d984
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/NullableClass.md
@@ -0,0 +1,24 @@
+
+
+# NullableClass
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**integerProp** | **Integer** | | [optional] |
+|**numberProp** | **BigDecimal** | | [optional] |
+|**booleanProp** | **Boolean** | | [optional] |
+|**stringProp** | **String** | | [optional] |
+|**dateProp** | **LocalDate** | | [optional] |
+|**datetimeProp** | **OffsetDateTime** | | [optional] |
+|**arrayNullableProp** | **List<Object>** | | [optional] |
+|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] |
+|**arrayItemsNullable** | **List<Object>** | | [optional] |
+|**objectNullableProp** | **Map<String, Object>** | | [optional] |
+|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] |
+|**objectItemsNullable** | **Map<String, Object>** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/NumberOnly.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/NumberOnly.md
new file mode 100644
index 000000000000..b8ed1a4cfae1
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/NumberOnly.md
@@ -0,0 +1,13 @@
+
+
+# NumberOnly
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**justNumber** | **BigDecimal** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ObjectWithDeprecatedFields.md
new file mode 100644
index 000000000000..f1cf571f4c09
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ObjectWithDeprecatedFields.md
@@ -0,0 +1,16 @@
+
+
+# ObjectWithDeprecatedFields
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**uuid** | **String** | | [optional] |
+|**id** | **BigDecimal** | | [optional] |
+|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] |
+|**bars** | **List<String>** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Order.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Order.md
new file mode 100644
index 000000000000..27af32855c5c
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Order.md
@@ -0,0 +1,28 @@
+
+
+# Order
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | | [optional] |
+|**petId** | **Long** | | [optional] |
+|**quantity** | **Integer** | | [optional] |
+|**shipDate** | **OffsetDateTime** | | [optional] |
+|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] |
+|**complete** | **Boolean** | | [optional] |
+
+
+
+## Enum: StatusEnum
+
+| Name | Value |
+|---- | -----|
+| PLACED | "placed" |
+| APPROVED | "approved" |
+| DELIVERED | "delivered" |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterComposite.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterComposite.md
new file mode 100644
index 000000000000..98b56e0763ff
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterComposite.md
@@ -0,0 +1,15 @@
+
+
+# OuterComposite
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**myNumber** | **BigDecimal** | | [optional] |
+|**myString** | **String** | | [optional] |
+|**myBoolean** | **Boolean** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnum.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnum.md
new file mode 100644
index 000000000000..1f9b723eb8e7
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnum.md
@@ -0,0 +1,15 @@
+
+
+# OuterEnum
+
+## Enum
+
+
+* `PLACED` (value: `"placed"`)
+
+* `APPROVED` (value: `"approved"`)
+
+* `DELIVERED` (value: `"delivered"`)
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumDefaultValue.md
new file mode 100644
index 000000000000..cbc7f4ba54d2
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumDefaultValue.md
@@ -0,0 +1,15 @@
+
+
+# OuterEnumDefaultValue
+
+## Enum
+
+
+* `PLACED` (value: `"placed"`)
+
+* `APPROVED` (value: `"approved"`)
+
+* `DELIVERED` (value: `"delivered"`)
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumInteger.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumInteger.md
new file mode 100644
index 000000000000..f71dea30ad00
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumInteger.md
@@ -0,0 +1,15 @@
+
+
+# OuterEnumInteger
+
+## Enum
+
+
+* `NUMBER_0` (value: `0`)
+
+* `NUMBER_1` (value: `1`)
+
+* `NUMBER_2` (value: `2`)
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumIntegerDefaultValue.md
new file mode 100644
index 000000000000..99e6389f4278
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterEnumIntegerDefaultValue.md
@@ -0,0 +1,15 @@
+
+
+# OuterEnumIntegerDefaultValue
+
+## Enum
+
+
+* `NUMBER_0` (value: `0`)
+
+* `NUMBER_1` (value: `1`)
+
+* `NUMBER_2` (value: `2`)
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterObjectWithEnumProperty.md
new file mode 100644
index 000000000000..0fafaaa27154
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/OuterObjectWithEnumProperty.md
@@ -0,0 +1,13 @@
+
+
+# OuterObjectWithEnumProperty
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**value** | **OuterEnumInteger** | | |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ParentWithNullable.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ParentWithNullable.md
new file mode 100644
index 000000000000..e4d322985632
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ParentWithNullable.md
@@ -0,0 +1,22 @@
+
+
+# ParentWithNullable
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**type** | [**TypeEnum**](#TypeEnum) | | [optional] |
+|**nullableProperty** | **String** | | [optional] |
+
+
+
+## Enum: TypeEnum
+
+| Name | Value |
+|---- | -----|
+| CHILD_WITH_NULLABLE | "ChildWithNullable" |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Pet.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Pet.md
new file mode 100644
index 000000000000..54af77a9f5a7
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Pet.md
@@ -0,0 +1,28 @@
+
+
+# Pet
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | | [optional] |
+|**category** | [**Category**](Category.md) | | [optional] |
+|**name** | **String** | | |
+|**photoUrls** | **Set<String>** | | |
+|**tags** | [**List<Tag>**](Tag.md) | | [optional] |
+|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] |
+
+
+
+## Enum: StatusEnum
+
+| Name | Value |
+|---- | -----|
+| AVAILABLE | "available" |
+| PENDING | "pending" |
+| SOLD | "sold" |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/PetApi.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/PetApi.md
new file mode 100644
index 000000000000..e80912b7ea7d
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/PetApi.md
@@ -0,0 +1,678 @@
+# PetApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store |
+| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet |
+| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status |
+| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags |
+| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID |
+| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet |
+| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data |
+| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image |
+| [**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) |
+
+
+
+## addPet
+
+> addPet(pet)
+
+Add a new pet to the store
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.addPet(pet);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#addPet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json, application/xml
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Successful operation | - |
+| **405** | Invalid input | - |
+
+
+## deletePet
+
+> deletePet(petId, apiKey)
+
+Deletes a pet
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | Pet id to delete
+ String apiKey = "apiKey_example"; // String |
+ try {
+ apiInstance.deletePet(petId, apiKey);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#deletePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **petId** | **Long**| Pet id to delete | |
+| **apiKey** | **String**| | [optional] |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Successful operation | - |
+| **400** | Invalid pet value | - |
+
+
+## findPetsByStatus
+
+> List<Pet> findPetsByStatus(status)
+
+Finds Pets by status
+
+Multiple status values can be provided with comma separated strings
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ List status = Arrays.asList("available"); // List | Status values that need to be considered for filter
+ try {
+ List result = apiInstance.findPetsByStatus(status);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByStatus");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] |
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+
+
+## findPetsByTags
+
+> Set<Pet> findPetsByTags(tags)
+
+Finds Pets by tags
+
+Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Set tags = new LinkedHashSet<>(); // Set | Tags to filter by
+ try {
+ Set result = apiInstance.findPetsByTags(tags);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#findPetsByTags");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **tags** | [**Set<String>**](String.md)| Tags to filter by | |
+
+### Return type
+
+[**Set<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid tag value | - |
+
+
+## getPetById
+
+> Pet getPetById(petId)
+
+Find pet by ID
+
+Returns a single pet
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key
+ ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
+ api_key.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key.setApiKeyPrefix("Token");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to return
+ try {
+ Pet result = apiInstance.getPetById(petId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#getPetById");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **petId** | **Long**| ID of pet to return | |
+
+### Return type
+
+[**Pet**](Pet.md)
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+
+
+## updatePet
+
+> updatePet(pet)
+
+Update an existing pet
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
+ try {
+ apiInstance.updatePet(pet);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#updatePet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json, application/xml
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+| **405** | Validation exception | - |
+
+
+## updatePetWithForm
+
+> updatePetWithForm(petId, name, status)
+
+Updates a pet in the store with form data
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet that needs to be updated
+ String name = "name_example"; // String | Updated name of the pet
+ String status = "status_example"; // String | Updated status of the pet
+ try {
+ apiInstance.updatePetWithForm(petId, name, status);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#updatePetWithForm");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **petId** | **Long**| ID of pet that needs to be updated | |
+| **name** | **String**| Updated name of the pet | [optional] |
+| **status** | **String**| Updated status of the pet | [optional] |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: application/x-www-form-urlencoded
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Successful operation | - |
+| **405** | Invalid input | - |
+
+
+## uploadFile
+
+> ModelApiResponse uploadFile(petId, additionalMetadata, _file)
+
+uploads an image
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to update
+ String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
+ File _file = new File("/path/to/file"); // File | file to upload
+ try {
+ ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#uploadFile");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **petId** | **Long**| ID of pet to update | |
+| **additionalMetadata** | **String**| Additional data to pass to server | [optional] |
+| **_file** | **File**| file to upload | [optional] |
+
+### Return type
+
+[**ModelApiResponse**](ModelApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## uploadFileWithRequiredFile
+
+> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
+
+uploads an image (required)
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.PetApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure OAuth2 access token for authorization: petstore_auth
+ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
+ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+ PetApi apiInstance = new PetApi(defaultClient);
+ Long petId = 56L; // Long | ID of pet to update
+ File requiredFile = new File("/path/to/file"); // File | file to upload
+ String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
+ try {
+ ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **petId** | **Long**| ID of pet to update | |
+| **requiredFile** | **File**| file to upload | |
+| **additionalMetadata** | **String**| Additional data to pass to server | [optional] |
+
+### Return type
+
+[**ModelApiResponse**](ModelApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/ReadOnlyFirst.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ReadOnlyFirst.md
new file mode 100644
index 000000000000..ad6af7ee155f
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/ReadOnlyFirst.md
@@ -0,0 +1,14 @@
+
+
+# ReadOnlyFirst
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**bar** | **String** | | [optional] [readonly] |
+|**baz** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/SingleRefType.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/SingleRefType.md
new file mode 100644
index 000000000000..cc269bb871fd
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/SingleRefType.md
@@ -0,0 +1,13 @@
+
+
+# SingleRefType
+
+## Enum
+
+
+* `ADMIN` (value: `"admin"`)
+
+* `USER` (value: `"user"`)
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/SpecialModelName.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/SpecialModelName.md
new file mode 100644
index 000000000000..4b6a06e36224
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/SpecialModelName.md
@@ -0,0 +1,13 @@
+
+
+# SpecialModelName
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**$specialPropertyName** | **Long** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/StoreApi.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/StoreApi.md
new file mode 100644
index 000000000000..ce91137cc6f4
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/StoreApi.md
@@ -0,0 +1,282 @@
+# StoreApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID |
+| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status |
+| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID |
+| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet |
+
+
+
+## deleteOrder
+
+> deleteOrder(orderId)
+
+Delete purchase order by ID
+
+For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
+ try {
+ apiInstance.deleteOrder(orderId);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#deleteOrder");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **orderId** | **String**| ID of the order that needs to be deleted | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+
+## getInventory
+
+> Map<String, Integer> getInventory()
+
+Returns pet inventories by status
+
+Returns a map of status codes to quantities
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ // Configure API key authorization: api_key
+ ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
+ api_key.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //api_key.setApiKeyPrefix("Token");
+
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ try {
+ Map result = apiInstance.getInventory();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#getInventory");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+**Map<String, Integer>**
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+
+## getOrderById
+
+> Order getOrderById(orderId)
+
+Find purchase order by ID
+
+For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Long orderId = 56L; // Long | ID of pet that needs to be fetched
+ try {
+ Order result = apiInstance.getOrderById(orderId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#getOrderById");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **orderId** | **Long**| ID of pet that needs to be fetched | |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+
+## placeOrder
+
+> Order placeOrder(order)
+
+Place an order for a pet
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.StoreApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ StoreApi apiInstance = new StoreApi(defaultClient);
+ Order order = new Order(); // Order | order placed for purchasing the pet
+ try {
+ Order result = apiInstance.placeOrder(order);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling StoreApi#placeOrder");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **order** | [**Order**](Order.md)| order placed for purchasing the pet | |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid Order | - |
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/Tag.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Tag.md
new file mode 100644
index 000000000000..5088b2dd1c31
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/Tag.md
@@ -0,0 +1,14 @@
+
+
+# Tag
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | | [optional] |
+|**name** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/TestInlineFreeformAdditionalPropertiesRequest.md
new file mode 100644
index 000000000000..dc066e6c7dac
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/TestInlineFreeformAdditionalPropertiesRequest.md
@@ -0,0 +1,13 @@
+
+
+# TestInlineFreeformAdditionalPropertiesRequest
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**someProperty** | **String** | | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/User.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/User.md
new file mode 100644
index 000000000000..08813e4b10b4
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/User.md
@@ -0,0 +1,20 @@
+
+
+# User
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **Long** | | [optional] |
+|**username** | **String** | | [optional] |
+|**firstName** | **String** | | [optional] |
+|**lastName** | **String** | | [optional] |
+|**email** | **String** | | [optional] |
+|**password** | **String** | | [optional] |
+|**phone** | **String** | | [optional] |
+|**userStatus** | **Integer** | User Status | [optional] |
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/docs/UserApi.md b/samples/client/petstore/java/apache-httpclient-jackson3/docs/UserApi.md
new file mode 100644
index 000000000000..305fd6e66dfb
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/docs/UserApi.md
@@ -0,0 +1,543 @@
+# UserApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user |
+| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array |
+| [**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array |
+| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user |
+| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name |
+| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system |
+| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session |
+| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user |
+
+
+
+## createUser
+
+> createUser(user)
+
+Create user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ User user = new User(); // User | Created user object
+ try {
+ apiInstance.createUser(user);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **user** | [**User**](User.md)| Created user object | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## createUsersWithArrayInput
+
+> createUsersWithArrayInput(user)
+
+Creates list of users with given input array
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ List user = Arrays.asList(); // List | List of user object
+ try {
+ apiInstance.createUsersWithArrayInput(user);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **user** | [**List<User>**](User.md)| List of user object | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## createUsersWithListInput
+
+> createUsersWithListInput(user)
+
+Creates list of users with given input array
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ List user = Arrays.asList(); // List | List of user object
+ try {
+ apiInstance.createUsersWithListInput(user);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#createUsersWithListInput");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **user** | [**List<User>**](User.md)| List of user object | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## deleteUser
+
+> deleteUser(username)
+
+Delete user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The name that needs to be deleted
+ try {
+ apiInstance.deleteUser(username);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#deleteUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **username** | **String**| The name that needs to be deleted | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+
+## getUserByName
+
+> User getUserByName(username)
+
+Get user by user name
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
+ try {
+ User result = apiInstance.getUserByName(username);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#getUserByName");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | |
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+
+## loginUser
+
+> String loginUser(username, password)
+
+Logs user into the system
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | The user name for login
+ String password = "password_example"; // String | The password for login in clear text
+ try {
+ String result = apiInstance.loginUser(username, password);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#loginUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **username** | **String**| The user name for login | |
+| **password** | **String**| The password for login in clear text | |
+
+### Return type
+
+**String**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user * X-Expires-After - date in UTC when token expires |
+| **400** | Invalid username/password supplied | - |
+
+
+## logoutUser
+
+> logoutUser()
+
+Logs out current logged in user session
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ try {
+ apiInstance.logoutUser();
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#logoutUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+
+## updateUser
+
+> updateUser(username, user)
+
+Updated user
+
+This can only be done by the logged in user.
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.UserApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
+
+ UserApi apiInstance = new UserApi(defaultClient);
+ String username = "username_example"; // String | name that need to be deleted
+ User user = new User(); // User | Updated user object
+ try {
+ apiInstance.updateUser(username, user);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling UserApi#updateUser");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **username** | **String**| name that need to be deleted | |
+| **user** | [**User**](User.md)| Updated user object | |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid user supplied | - |
+| **404** | User not found | - |
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh b/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh
new file mode 100755
index 000000000000..f53a75d4fabe
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh
@@ -0,0 +1,57 @@
+#!/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-petstore-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/apache-httpclient-jackson3/gradle.properties b/samples/client/petstore/java/apache-httpclient-jackson3/gradle.properties
new file mode 100644
index 000000000000..a3408578278a
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/gradle.properties
@@ -0,0 +1,6 @@
+# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator).
+# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option.
+#
+# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
+# For example, uncomment below to build for Android
+#target = android
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/apache-httpclient-jackson3/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 000000000000..e6441136f3d4
Binary files /dev/null and b/samples/client/petstore/java/apache-httpclient-jackson3/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/apache-httpclient-jackson3/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 000000000000..b82aa23a4f05
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/gradlew b/samples/client/petstore/java/apache-httpclient-jackson3/gradlew
new file mode 100755
index 000000000000..9d0ce634cb11
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/gradlew
@@ -0,0 +1,249 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original 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 POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+[ -h "$app_path" ]
+do
+ls=$( ls -ld "$app_path" )
+link=${ls#*' -> '}
+case $link in #(
+/*) app_path=$link ;; #(
+*) app_path=$APP_HOME$link ;;
+esac
+done
+
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+echo "$*"
+} >&2
+
+die () {
+echo
+echo "$*"
+echo
+exit 1
+} >&2
+
+# 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 ;; #(
+MSYS* | 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
+if ! command -v java >/dev/null 2>&1
+then
+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
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+case $MAX_FD in #(
+max*)
+# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+# shellcheck disable=SC2039,SC3045
+MAX_FD=$( ulimit -H -n ) ||
+warn "Could not query maximum file descriptor limit"
+esac
+case $MAX_FD in #(
+'' | soft) :;; #(
+*)
+# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+# shellcheck disable=SC2039,SC3045
+ulimit -n "$MAX_FD" ||
+warn "Could not set maximum file descriptor limit to $MAX_FD"
+esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+# Now convert the arguments - kludge to limit ourselves to /bin/sh
+for arg do
+if
+case $arg in #(
+-*) false ;; # don't mess with options #(
+/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+[ -e "$t" ] ;; #(
+*) false ;;
+esac
+then
+arg=$( cygpath --path --ignore --mixed "$arg" )
+fi
+# Roll the args list around exactly as many times as the number of
+# args, so each arg winds up back in the position where it started, but
+# possibly modified.
+#
+# NB: a `for` loop captures its iteration list before it begins, so
+# changing the positional parameters here affects neither the number of
+# iterations, nor the values presented in `arg`.
+shift # remove old arg
+set -- "$@" "$arg" # push replacement arg
+done
+fi
+
+
+# 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"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
+
+set -- \
+"-Dorg.gradle.appname=$APP_BASE_NAME" \
+-classpath "$CLASSPATH" \
+org.gradle.wrapper.GradleWrapperMain \
+"$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+xargs -n1 |
+sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+tr '\n' ' '
+)" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/gradlew.bat b/samples/client/petstore/java/apache-httpclient-jackson3/gradlew.bat
new file mode 100644
index 000000000000..25da30dbdeee
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/gradlew.bat
@@ -0,0 +1,92 @@
+@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=.
+@rem This is normally unused
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@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% equ 0 goto execute
+
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
+
+goto fail
+
+: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 %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if %ERRORLEVEL% equ 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!
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/pom.xml b/samples/client/petstore/java/apache-httpclient-jackson3/pom.xml
new file mode 100644
index 000000000000..68a0e25fd285
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/pom.xml
@@ -0,0 +1,276 @@
+
+ 4.0.0
+ org.openapitools
+ petstore-apache-httpclient-jackson3
+ jar
+ petstore-apache-httpclient-jackson3
+ 1.0.0
+ https://github.com/openapitools/openapi-generator
+ OpenAPI Java
+
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ https://github.com/openapitools/openapi-generator
+
+
+
+
+ Unlicense
+ https://www.apache.org/licenses/LICENSE-2.0.html
+ repo
+
+
+
+
+
+ OpenAPI-Generator Contributors
+ team@openapitools.org
+ OpenAPITools.org
+ http://openapitools.org
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.10.1
+
+ 1.8
+ 1.8
+ true
+ 128m
+ 512m
+
+ -Xlint:all
+ -J-Xss4m
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 3.1.0
+
+
+ enforce-maven
+
+ enforce
+
+
+
+
+ 2.2.0
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.2.5
+
+
+
+ loggerPath
+ conf/log4j.properties
+
+
+ -Xms512m -Xmx1500m
+ methods
+ 10
+
+
+
+ maven-dependency-plugin
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/lib
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.3.0
+
+
+
+ test-jar
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 3.3.0
+
+
+ add_sources
+ generate-sources
+
+ add-source
+
+
+
+ src/main/java
+
+
+
+
+ add_test_sources
+ generate-test-sources
+
+ add-test-source
+
+
+
+ src/test/java
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.4.1
+
+ none
+ 1.8
+
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.0.1
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+
+
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+
+
+
+ org.apache.httpcomponents.client5
+ httpclient5
+ ${httpclient-version}
+
+
+
+
+ tools.jackson.core
+ jackson-core
+ ${jackson3-version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson-annotations-version}
+
+
+ tools.jackson.core
+ jackson-databind
+ ${jackson3-version}
+
+
+ tools.jackson.jakarta.rs
+ jackson-jakarta-rs-json-provider
+ ${jackson3-version}
+
+
+
+ org.openapitools
+ jackson-databind-nullable
+ ${jackson-databind-nullable-version}
+
+
+ jakarta.annotation
+ jakarta.annotation-api
+ ${jakarta-annotation-version}
+ provided
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ ${junit-version}
+ test
+
+
+
+ UTF-8
+ 5.2.1
+ 3.1.0
+ 2.21
+ 0.2.10
+ 1.3.5
+ 2.0.2
+ 5.10.2
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/settings.gradle b/samples/client/petstore/java/apache-httpclient-jackson3/settings.gradle
new file mode 100644
index 000000000000..b0e65815d35b
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = "petstore-apache-httpclient-jackson3"
\ No newline at end of file
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/AndroidManifest.xml b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/AndroidManifest.xml
new file mode 100644
index 000000000000..54fbcb3da1e8
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/AndroidManifest.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ApiClient.java
new file mode 100644
index 000000000000..e3bfa7d46349
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ApiClient.java
@@ -0,0 +1,1153 @@
+/*
+ * 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.annotation.*;
+import tools.jackson.databind.*;
+import tools.jackson.databind.cfg.DateTimeFeature;
+import tools.jackson.databind.cfg.EnumFeature;
+import tools.jackson.databind.json.JsonMapper;
+import java.time.OffsetDateTime;
+import tools.jackson.core.type.TypeReference;
+import tools.jackson.core.JacksonException;
+import org.openapitools.jackson.nullable.JsonNullableJackson3Module;
+
+import org.apache.hc.client5.http.cookie.BasicCookieStore;
+import org.apache.hc.client5.http.cookie.Cookie;
+import org.apache.hc.client5.http.entity.UrlEncodedFormEntity;
+import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
+import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.client5.http.impl.cookie.BasicClientCookie;
+import org.apache.hc.client5.http.protocol.HttpClientContext;
+import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.NameValuePair;
+import org.apache.hc.core5.http.ParseException;
+import org.apache.hc.core5.http.io.entity.ByteArrayEntity;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
+import org.apache.hc.core5.http.io.entity.FileEntity;
+import org.apache.hc.core5.http.io.entity.StringEntity;
+import org.apache.hc.core5.http.io.support.ClassicRequestBuilder;
+import org.apache.hc.core5.http.message.BasicNameValuePair;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.function.Supplier;
+import java.util.TimeZone;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import java.net.URLEncoder;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.nio.charset.UnsupportedCharsetException;
+import java.nio.file.Files;
+import java.nio.file.StandardCopyOption;
+import java.nio.file.Paths;
+import java.lang.reflect.Type;
+import java.net.URI;
+
+import java.text.DateFormat;
+
+import org.openapitools.client.auth.Authentication;
+import org.openapitools.client.auth.HttpBasicAuth;
+import org.openapitools.client.auth.HttpBearerAuth;
+import org.openapitools.client.auth.ApiKeyAuth;
+import org.openapitools.client.auth.OAuth;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class ApiClient extends JavaTimeFormatter {
+ protected Map defaultHeaderMap = new HashMap();
+ protected Map defaultCookieMap = new HashMap();
+ protected String basePath = "http://petstore.swagger.io:80/v2";
+ protected List servers = new ArrayList(Arrays.asList(
+ new ServerConfiguration(
+ "http://{server}.swagger.io:{port}/v2",
+ "petstore server",
+ new HashMap() {{
+ put("server", new ServerVariable(
+ "No description provided",
+ "petstore",
+ new HashSet(
+ Arrays.asList(
+ "petstore",
+ "qa-petstore",
+ "dev-petstore"
+ )
+ )
+ ));
+ put("port", new ServerVariable(
+ "No description provided",
+ "80",
+ new HashSet(
+ Arrays.asList(
+ "80",
+ "8080"
+ )
+ )
+ ));
+ }}
+ ),
+ new ServerConfiguration(
+ "https://localhost:8080/{version}",
+ "The local server",
+ new HashMap() {{
+ put("version", new ServerVariable(
+ "No description provided",
+ "v2",
+ new HashSet(
+ Arrays.asList(
+ "v1",
+ "v2"
+ )
+ )
+ ));
+ }}
+ ),
+ new ServerConfiguration(
+ "https://127.0.0.1/no_varaible",
+ "The local server without variables",
+ new HashMap()
+ )
+ ));
+ protected Integer serverIndex = 0;
+ protected Map serverVariables = null;
+ protected boolean debugging = false;
+ protected int connectionTimeout = 0;
+
+ protected CloseableHttpClient httpClient;
+ protected ObjectMapper objectMapper;
+ protected String tempFolderPath = null;
+
+ protected Map authentications;
+
+ protected ThreadLocal lastStatusCode = new ThreadLocal<>();
+ protected ThreadLocal>> lastResponseHeaders = new ThreadLocal<>();
+
+ protected DateFormat dateFormat;
+
+ // Methods that can have a request body
+ protected static List bodyMethods = Arrays.asList("POST", "PUT", "DELETE", "PATCH");
+
+ public ApiClient(CloseableHttpClient httpClient) {
+ objectMapper = JsonMapper.builder()
+ .changeDefaultPropertyInclusion(v -> v.withValueInclusion(JsonInclude.Include.NON_NULL))
+ .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ .disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE)
+ .disable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS)
+ .enable(EnumFeature.WRITE_ENUMS_USING_TO_STRING)
+ .enable(EnumFeature.READ_ENUMS_USING_TO_STRING)
+ .addModule(new JsonNullableJackson3Module())
+ .addModule(new RFC3339JavaTimeModule())
+ .defaultDateFormat(ApiClient.buildDefaultDateFormat())
+ .build();
+
+ dateFormat = ApiClient.buildDefaultDateFormat();
+
+ // Set default User-Agent.
+ setUserAgent("OpenAPI-Generator/1.0.0/java");
+
+ // Setup authentications (key: authentication name, value: authentication).
+ authentications = new HashMap();
+ authentications.put("petstore_auth", new OAuth());
+ authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
+ authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
+ authentications.put("http_basic_test", new HttpBasicAuth());
+ authentications.put("bearer_test", new HttpBearerAuth("bearer"));
+ // Prevent the authentications from being modified.
+ authentications = Collections.unmodifiableMap(authentications);
+
+ this.httpClient = httpClient;
+ }
+
+ public ApiClient() {
+ this(HttpClients.createDefault());
+ }
+
+ public static DateFormat buildDefaultDateFormat() {
+ return new RFC3339DateFormat();
+ }
+
+ /**
+ * Returns the current object mapper used for JSON serialization/deserialization.
+ *
+ * Note: If you make changes to the object mapper, remember to set it back via
+ * setObjectMapper in order to trigger HTTP client rebuilding.
+ *
+ * @return Object mapper
+ */
+ public ObjectMapper getObjectMapper() {
+ return objectMapper;
+ }
+
+ /**
+ * Sets the object mapper.
+ *
+ * @param objectMapper object mapper
+ * @return API client
+ */
+ public ApiClient setObjectMapper(ObjectMapper objectMapper) {
+ this.objectMapper = objectMapper;
+ return this;
+ }
+
+ public CloseableHttpClient getHttpClient() {
+ return httpClient;
+ }
+
+ /**
+ * Sets the HTTP client.
+ *
+ * @param httpClient HTTP client
+ * @return API client
+ */
+ public ApiClient setHttpClient(CloseableHttpClient httpClient) {
+ this.httpClient = httpClient;
+ return this;
+ }
+
+ public String getBasePath() {
+ return basePath;
+ }
+
+ /**
+ * Sets the base path.
+ *
+ * @param basePath base path
+ * @return API client
+ */
+ public ApiClient setBasePath(String basePath) {
+ this.basePath = basePath;
+ this.serverIndex = null;
+ return this;
+ }
+
+ public List getServers() {
+ return servers;
+ }
+
+ /**
+ * Sets the server.
+ *
+ * @param servers a list of server configuration
+ * @return API client
+ */
+ public ApiClient setServers(List servers) {
+ this.servers = servers;
+ return this;
+ }
+
+ public Integer getServerIndex() {
+ return serverIndex;
+ }
+
+ /**
+ * Sets the server index.
+ *
+ * @param serverIndex server index
+ * @return API client
+ */
+ public ApiClient setServerIndex(Integer serverIndex) {
+ this.serverIndex = serverIndex;
+ return this;
+ }
+
+ public Map getServerVariables() {
+ return serverVariables;
+ }
+
+ /**
+ * Sets the server variables.
+ *
+ * @param serverVariables server variables
+ * @return API client
+ */
+ public ApiClient setServerVariables(Map serverVariables) {
+ this.serverVariables = serverVariables;
+ return this;
+ }
+
+ /**
+ * Gets the status code of the previous request
+ *
+ * @return Status code
+ */
+ @Deprecated
+ public int getStatusCode() {
+ return lastStatusCode.get();
+ }
+
+ /**
+ * Gets the response headers of the previous request
+ * @return Response headers
+ */
+ @Deprecated
+ public Map> getResponseHeaders() {
+ return lastResponseHeaders.get();
+ }
+
+ /**
+ * Get authentications (key: authentication name, value: authentication).
+ * @return Map of authentication
+ */
+ public Map getAuthentications() {
+ return authentications;
+ }
+
+ /**
+ * Get authentication for the given name.
+ *
+ * @param authName The authentication name
+ * @return The authentication, null if not found
+ */
+ public Authentication getAuthentication(String authName) {
+ return authentications.get(authName);
+ }
+
+ /**
+ * The path of temporary folder used to store downloaded files from endpoints
+ * with file response. The default value is null, i.e. using
+ * the system's default temporary folder.
+ *
+ * @return Temp folder path
+ */
+ public String getTempFolderPath() {
+ return tempFolderPath;
+ }
+
+ /**
+ * Helper method to set access token for the first Bearer authentication.
+ * @param bearerToken Bearer token
+ * @return API client
+ */
+ public ApiClient setBearerToken(String bearerToken) {
+ for (Authentication auth : authentications.values()) {
+ if (auth instanceof HttpBearerAuth) {
+ ((HttpBearerAuth) auth).setBearerToken(bearerToken);
+ return this;
+ }
+ }
+ throw new RuntimeException("No Bearer authentication configured!");
+ }
+
+ /**
+ * Helper method to set the supplier of access tokens for Bearer authentication.
+ *
+ * @param tokenSupplier the token supplier function
+ */
+ public void setBearerToken(Supplier tokenSupplier) {
+ for (Authentication auth : authentications.values()) {
+ if (auth instanceof HttpBearerAuth) {
+ ((HttpBearerAuth) auth).setBearerToken(tokenSupplier);
+ return;
+ }
+ }
+ throw new RuntimeException("No Bearer authentication configured!");
+ }
+
+ /**
+ * Helper method to set username for the first HTTP basic authentication.
+ * @param username Username
+ * @return API client
+ */
+ public ApiClient setUsername(String username) {
+ for (Authentication auth : authentications.values()) {
+ if (auth instanceof HttpBasicAuth) {
+ ((HttpBasicAuth) auth).setUsername(username);
+ return this;
+ }
+ }
+ throw new RuntimeException("No HTTP basic authentication configured!");
+ }
+
+ /**
+ * Helper method to set password for the first HTTP basic authentication.
+ * @param password Password
+ * @return API client
+ */
+ public ApiClient setPassword(String password) {
+ for (Authentication auth : authentications.values()) {
+ if (auth instanceof HttpBasicAuth) {
+ ((HttpBasicAuth) auth).setPassword(password);
+ return this;
+ }
+ }
+ throw new RuntimeException("No HTTP basic authentication configured!");
+ }
+
+
+ /**
+ * Helper method to set API key value for the first API key authentication.
+ * @param apiKey the API key
+ * @return API client
+ */
+ public ApiClient setApiKey(String apiKey) {
+ for (Authentication auth : authentications.values()) {
+ if (auth instanceof ApiKeyAuth) {
+ ((ApiKeyAuth) auth).setApiKey(apiKey);
+ return this;
+ }
+ }
+ throw new RuntimeException("No API key authentication configured!");
+ }
+
+ /**
+ * Helper method to set API key prefix for the first API key authentication.
+ * @param apiKeyPrefix API key prefix
+ * @return API client
+ */
+ public ApiClient setApiKeyPrefix(String apiKeyPrefix) {
+ for (Authentication auth : authentications.values()) {
+ if (auth instanceof ApiKeyAuth) {
+ ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
+ return this;
+ }
+ }
+ throw new RuntimeException("No API key authentication configured!");
+ }
+
+
+ /**
+ * Helper method to set access token for the first OAuth2 authentication.
+ * @param accessToken Access token
+ * @return API client
+ */
+ public ApiClient setAccessToken(String accessToken) {
+ for (Authentication auth : authentications.values()) {
+ if (auth instanceof OAuth) {
+ ((OAuth) auth).setAccessToken(accessToken);
+ return this;
+ }
+ }
+ throw new RuntimeException("No OAuth2 authentication configured!");
+ }
+
+
+ /**
+ * Set the User-Agent header's value (by adding to the default header map).
+ * @param userAgent User agent
+ * @return API client
+ */
+ public final ApiClient setUserAgent(String userAgent) {
+ addDefaultHeader("User-Agent", userAgent);
+ return this;
+ }
+
+ /**
+ * Set temp folder path
+ * @param tempFolderPath Temp folder path
+ * @return API client
+ */
+ public ApiClient setTempFolderPath(String tempFolderPath) {
+ this.tempFolderPath = tempFolderPath;
+ return this;
+ }
+
+ /**
+ * Add a default header.
+ *
+ * @param key The header's key
+ * @param value The header's value
+ * @return API client
+ */
+ public final ApiClient addDefaultHeader(String key, String value) {
+ defaultHeaderMap.put(key, value);
+ return this;
+ }
+
+ /**
+ * Add a default cookie.
+ *
+ * @param key The cookie's key
+ * @param value The cookie's value
+ * @return API client
+ */
+ public ApiClient addDefaultCookie(String key, String value) {
+ defaultCookieMap.put(key, value);
+ return this;
+ }
+
+ /**
+ * Check that whether debugging is enabled for this API client.
+ * @return True if debugging is on
+ */
+ public boolean isDebugging() {
+ return debugging;
+ }
+
+ /**
+ * Enable/disable debugging for this API client.
+ *
+ * @param debugging To enable (true) or disable (false) debugging
+ * @return API client
+ */
+ public ApiClient setDebugging(boolean debugging) {
+ // TODO: implement debugging mode
+ this.debugging = debugging;
+ return this;
+ }
+
+ /**
+ * Connect timeout (in milliseconds).
+ * @return Connection timeout
+ */
+ public int getConnectTimeout() {
+ return connectionTimeout;
+ }
+
+ /**
+ * Set the connect timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link Integer#MAX_VALUE}.
+ * @param connectionTimeout Connection timeout in milliseconds
+ * @return API client
+ */
+ public ApiClient setConnectTimeout(int connectionTimeout) {
+ this.connectionTimeout = connectionTimeout;
+ return this;
+ }
+
+ /**
+ * Get the date format used to parse/format date parameters.
+ * @return Date format
+ */
+ public DateFormat getDateFormat() {
+ return dateFormat;
+ }
+
+ /**
+ * Set the date format used to parse/format date parameters.
+ * @param dateFormat Date format
+ * @return API client
+ */
+ public ApiClient setDateFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ // Also set the date format for model (de)serialization with Date properties.
+ if (this.objectMapper instanceof JsonMapper) {
+ this.objectMapper = ((JsonMapper) this.objectMapper).rebuild().defaultDateFormat((DateFormat) dateFormat.clone()).build();
+ } else {
+ throw new UnsupportedOperationException("setDateFormat is only supported when objectMapper is a JsonMapper instance");
+ }
+ return this;
+ }
+
+ /**
+ * Parse the given string into Date object.
+ * @param str String
+ * @return Date
+ */
+ public Date parseDate(String str) {
+ try {
+ return dateFormat.parse(str);
+ } catch (java.text.ParseException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Format the given Date object into string.
+ * @param date Date
+ * @return Date in string format
+ */
+ public String formatDate(Date date) {
+ return dateFormat.format(date);
+ }
+
+ /**
+ * Format the given parameter object into string.
+ * @param param Object
+ * @return Object in string format
+ */
+ public String parameterToString(Object param) {
+ if (param == null) {
+ return "";
+ } else if (param instanceof Date) {
+ return formatDate((Date) param);
+ } else if (param instanceof OffsetDateTime) {
+ return formatOffsetDateTime((OffsetDateTime) param);
+ } else if (param instanceof Collection) {
+ StringBuilder b = new StringBuilder();
+ for(Object o : (Collection>)param) {
+ if(b.length() > 0) {
+ b.append(',');
+ }
+ b.append(String.valueOf(o));
+ }
+ return b.toString();
+ } else {
+ return String.valueOf(param);
+ }
+ }
+
+ /**
+ * Formats the specified query parameter to a list containing a single {@code Pair} object.
+ *
+ * Note that {@code value} must not be a collection.
+ *
+ * @param name The name of the parameter.
+ * @param value The value of the parameter.
+ * @return A list containing a single {@code Pair} object.
+ */
+ public List parameterToPair(String name, Object value) {
+ List params = new ArrayList();
+
+ // preconditions
+ if (name == null || name.isEmpty() || value == null || value instanceof Collection) {
+ return params;
+ }
+
+ params.add(new Pair(name, escapeString(parameterToString(value))));
+ return params;
+ }
+
+ /**
+ * Formats the specified collection query parameters to a list of {@code Pair} objects.
+ *
+ * Note that the values of each of the returned Pair objects are percent-encoded.
+ *
+ * @param collectionFormat The collection format of the parameter.
+ * @param name The name of the parameter.
+ * @param value The value of the parameter.
+ * @return A list of {@code Pair} objects.
+ */
+ public List parameterToPairs(String collectionFormat, String name, Collection> value) {
+ List params = new ArrayList();
+
+ // preconditions
+ if (name == null || name.isEmpty() || value == null || value.isEmpty()) {
+ return params;
+ }
+
+ // create the params based on the collection format
+ if ("multi".equals(collectionFormat)) {
+ for (Object item : value) {
+ params.add(new Pair(name, escapeString(parameterToString(item))));
+ }
+ return params;
+ }
+
+ // collectionFormat is assumed to be "csv" by default
+ String delimiter = ",";
+
+ // escape all delimiters except commas, which are URI reserved
+ // characters
+ if ("ssv".equals(collectionFormat)) {
+ delimiter = escapeString(" ");
+ } else if ("tsv".equals(collectionFormat)) {
+ delimiter = escapeString("\t");
+ } else if ("pipes".equals(collectionFormat)) {
+ delimiter = escapeString("|");
+ }
+
+ StringBuilder sb = new StringBuilder() ;
+ for (Object item : value) {
+ sb.append(delimiter);
+ sb.append(escapeString(parameterToString(item)));
+ }
+
+ params.add(new Pair(name, sb.substring(delimiter.length())));
+
+ return params;
+ }
+
+ /**
+ * Check if the given MIME is a JSON MIME.
+ * JSON MIME examples:
+ * application/json
+ * application/json; charset=UTF8
+ * APPLICATION/JSON
+ * application/vnd.company+json
+ * @param mime MIME
+ * @return True if MIME type is boolean
+ */
+ public boolean isJsonMime(String mime) {
+ String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
+ return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
+ }
+
+ /**
+ * 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;
+ }
+ for (String accept : accepts) {
+ if (isJsonMime(accept)) {
+ return accept;
+ }
+ }
+ 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,
+ * or matches "any", JSON will be used.
+ */
+ public String selectHeaderContentType(String[] contentTypes) {
+ if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) {
+ return "application/json";
+ }
+ for (String contentType : contentTypes) {
+ if (isJsonMime(contentType)) {
+ return contentType;
+ }
+ }
+ return contentTypes[0];
+ }
+
+ /**
+ * Escape the given string to be used as URL query value.
+ * @param str String
+ * @return Escaped string
+ */
+ public String escapeString(String str) {
+ try {
+ return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20");
+ } catch (UnsupportedEncodingException e) {
+ return str;
+ }
+ }
+
+ /**
+ * Transforms response headers into map.
+ *
+ * @param headers HTTP headers
+ * @return a map of string array
+ */
+ protected Map> transformResponseHeaders(Header[] headers) {
+ Map> headersMap = new HashMap<>();
+ for (Header header : headers) {
+ List valuesList = headersMap.get(header.getName());
+ if (valuesList != null) {
+ valuesList.add(header.getValue());
+ } else {
+ valuesList = new ArrayList<>();
+ valuesList.add(header.getValue());
+ headersMap.put(header.getName(), valuesList);
+ }
+ }
+ return headersMap;
+ }
+
+ /**
+ * Parse content type object from header value
+ */
+ protected ContentType getContentType(String headerValue) throws ApiException {
+ try {
+ return ContentType.parse(headerValue);
+ } catch (UnsupportedCharsetException e) {
+ throw new ApiException("Could not parse content type " + headerValue);
+ }
+ }
+
+ /**
+ * Get content type of a response or null if one was not provided
+ */
+ protected String getResponseMimeType(HttpResponse response) throws ApiException {
+ Header contentTypeHeader = response.getFirstHeader("Content-Type");
+ if (contentTypeHeader != null) {
+ return getContentType(contentTypeHeader.getValue()).getMimeType();
+ }
+ return null;
+ }
+
+ /**
+ * Serialize the given Java object into string according the given
+ * Content-Type (only JSON is supported for now).
+ * @param obj Object
+ * @param contentType Content type
+ * @param formParams Form parameters
+ * @return Object
+ * @throws ApiException API exception
+ */
+ public HttpEntity serialize(Object obj, Map formParams, ContentType contentType) throws ApiException {
+ String mimeType = contentType.getMimeType();
+ if (isJsonMime(mimeType)) {
+ try {
+ return new StringEntity(objectMapper.writeValueAsString(obj), contentType.withCharset(StandardCharsets.UTF_8));
+ } catch (JacksonException e) {
+ throw new ApiException(e);
+ }
+ } else if (mimeType.equals(ContentType.MULTIPART_FORM_DATA.getMimeType())) {
+ MultipartEntityBuilder multiPartBuilder = MultipartEntityBuilder.create();
+ for (Entry paramEntry : formParams.entrySet()) {
+ Object value = paramEntry.getValue();
+ if (value instanceof File) {
+ multiPartBuilder.addBinaryBody(paramEntry.getKey(), (File) value);
+ } else if (value instanceof byte[]) {
+ multiPartBuilder.addBinaryBody(paramEntry.getKey(), (byte[]) value);
+ } else {
+ Charset charset = contentType.getCharset();
+ if (charset != null) {
+ ContentType customContentType = ContentType.create(ContentType.TEXT_PLAIN.getMimeType(), charset);
+ multiPartBuilder.addTextBody(paramEntry.getKey(), parameterToString(paramEntry.getValue()),
+ customContentType);
+ } else {
+ multiPartBuilder.addTextBody(paramEntry.getKey(), parameterToString(paramEntry.getValue()));
+ }
+ }
+ }
+ return multiPartBuilder.build();
+ } else if (mimeType.equals(ContentType.APPLICATION_FORM_URLENCODED.getMimeType())) {
+ List formValues = new ArrayList<>();
+ for (Entry paramEntry : formParams.entrySet()) {
+ formValues.add(new BasicNameValuePair(paramEntry.getKey(), parameterToString(paramEntry.getValue())));
+ }
+ return new UrlEncodedFormEntity(formValues, contentType.getCharset());
+ } else {
+ // Handle files with unknown content type
+ if (obj instanceof File) {
+ return new FileEntity((File) obj, contentType);
+ } else if (obj instanceof byte[]) {
+ return new ByteArrayEntity((byte[]) obj, contentType);
+ }
+ throw new ApiException("Serialization for content type '" + contentType + "' not supported");
+ }
+ }
+
+ /**
+ * Deserialize response body to Java object according to the Content-Type.
+ *
+ * @param Type
+ * @param response Response
+ * @param valueType Return type
+ * @return Deserialized object
+ * @throws ApiException API exception
+ * @throws IOException IO exception
+ */
+ @SuppressWarnings("unchecked")
+ public T deserialize(CloseableHttpResponse response, TypeReference valueType) throws ApiException, IOException, ParseException {
+ if (valueType == null) {
+ return null;
+ }
+ HttpEntity entity = response.getEntity();
+ Type valueRawType = valueType.getType();
+ if (valueRawType.equals(byte[].class)) {
+ return (T) EntityUtils.toByteArray(entity);
+ } else if (valueRawType.equals(File.class)) {
+ return (T) downloadFileFromResponse(response);
+ }
+ String mimeType = getResponseMimeType(response);
+ if (mimeType == null || isJsonMime(mimeType)) {
+ // Assume json if no mime type
+ // convert input stream to string
+ String content = EntityUtils.toString(entity);
+
+ if ("".equals(content)) { // returns null for empty body
+ return null;
+ }
+
+ return objectMapper.readValue(content, valueType);
+ } else if (mimeType.toLowerCase().startsWith("text/")) {
+ // convert input stream to string
+ return (T) EntityUtils.toString(entity);
+ } else {
+ Map> responseHeaders = transformResponseHeaders(response.getHeaders());
+ throw new ApiException(
+ "Deserialization for content type '" + mimeType + "' not supported for type '" + valueType + "'",
+ response.getCode(),
+ responseHeaders,
+ EntityUtils.toString(entity)
+ );
+ }
+ }
+
+ protected File downloadFileFromResponse(CloseableHttpResponse response) throws IOException {
+ Header contentDispositionHeader = response.getFirstHeader("Content-Disposition");
+ String contentDisposition = contentDispositionHeader == null ? null : contentDispositionHeader.getValue();
+ File file = prepareDownloadFile(contentDisposition);
+ Files.copy(response.getEntity().getContent(), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
+ return file;
+ }
+
+ protected File prepareDownloadFile(String contentDisposition) throws IOException {
+ String filename = null;
+ if (contentDisposition != null && !"".equals(contentDisposition)) {
+ // Get filename from the Content-Disposition header.
+ Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
+ Matcher matcher = pattern.matcher(contentDisposition);
+ if (matcher.find())
+ filename = matcher.group(1);
+ }
+
+ String prefix;
+ String suffix = null;
+ if (filename == null) {
+ prefix = "download-";
+ suffix = "";
+ } else {
+ int pos = filename.lastIndexOf('.');
+ if (pos == -1) {
+ prefix = filename + "-";
+ } else {
+ prefix = filename.substring(0, pos) + "-";
+ suffix = filename.substring(pos);
+ }
+ // Files.createTempFile requires the prefix to be at least three characters long
+ if (prefix.length() < 3)
+ prefix = "download-";
+ }
+
+ if (tempFolderPath == null)
+ return Files.createTempFile(prefix, suffix).toFile();
+ else
+ return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile();
+ }
+
+ /**
+ * Returns the URL of the client as defined by the server (if exists) or the base path.
+ *
+ * @return The URL for the client.
+ */
+ public String getBaseURL() {
+ String baseURL;
+ if (serverIndex != null) {
+ if (serverIndex < 0 || serverIndex >= servers.size()) {
+ throw new ArrayIndexOutOfBoundsException(String.format(
+ java.util.Locale.ROOT,
+ "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size()
+ ));
+ }
+ baseURL = servers.get(serverIndex).URL(serverVariables);
+ } else {
+ baseURL = basePath;
+ }
+ return baseURL;
+ }
+
+ /**
+ * Build full URL by concatenating base URL, the given sub path and query parameters.
+ *
+ * @param path The sub path
+ * @param queryParams The query parameters
+ * @param collectionQueryParams The collection query parameters
+ * @param urlQueryDeepObject URL query string of the deep object parameters
+ * @return The full URL
+ */
+ protected String buildUrl(String path, List queryParams, List collectionQueryParams, String urlQueryDeepObject) {
+ String baseURL = getBaseURL();
+
+ final StringBuilder url = new StringBuilder();
+ url.append(baseURL).append(path);
+
+ if (queryParams != null && !queryParams.isEmpty()) {
+ // support (constant) query string in `path`, e.g. "/posts?draft=1"
+ String prefix = path.contains("?") ? "&" : "?";
+ for (Pair param : queryParams) {
+ if (param.getValue() != null) {
+ if (prefix != null) {
+ url.append(prefix);
+ prefix = null;
+ } else {
+ url.append("&");
+ }
+ String value = parameterToString(param.getValue());
+ // query parameter value already escaped as part of parameterToPair
+ url.append(escapeString(param.getName())).append("=").append(value);
+ }
+ }
+ }
+
+ if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) {
+ String prefix = url.toString().contains("?") ? "&" : "?";
+ for (Pair param : collectionQueryParams) {
+ if (param.getValue() != null) {
+ if (prefix != null) {
+ url.append(prefix);
+ prefix = null;
+ } else {
+ url.append("&");
+ }
+ String value = parameterToString(param.getValue());
+ // collection query parameter value already escaped as part of parameterToPairs
+ url.append(escapeString(param.getName())).append("=").append(value);
+ }
+ }
+ }
+
+ if (urlQueryDeepObject != null && urlQueryDeepObject.length() > 0) {
+ url.append(url.toString().contains("?") ? "&" : "?");
+ url.append(urlQueryDeepObject);
+ }
+
+ return url.toString();
+ }
+
+ protected boolean isSuccessfulStatus(int statusCode) {
+ return statusCode >= 200 && statusCode < 300;
+ }
+
+ protected boolean isBodyAllowed(String method) {
+ return bodyMethods.contains(method);
+ }
+
+ protected Cookie buildCookie(String key, String value, URI uri) {
+ BasicClientCookie cookie = new BasicClientCookie(key, value);
+ cookie.setDomain(uri.getHost());
+ cookie.setPath("/");
+ return cookie;
+ }
+
+ protected T processResponse(CloseableHttpResponse response, TypeReference returnType) throws ApiException, IOException, ParseException {
+ int statusCode = response.getCode();
+ lastStatusCode.set(statusCode);
+ if (statusCode == HttpStatus.SC_NO_CONTENT) {
+ return null;
+ }
+
+ Map> responseHeaders = transformResponseHeaders(response.getHeaders());
+ lastResponseHeaders.set(responseHeaders);
+
+ if (isSuccessfulStatus(statusCode)) {
+ return this.deserialize(response, returnType);
+ } else {
+ String message = EntityUtils.toString(response.getEntity());
+ throw new ApiException(message, statusCode, responseHeaders, message);
+ }
+ }
+
+ /**
+ * Invoke API by sending HTTP request with the given options.
+ *
+ * @param Type
+ * @param path The sub-path of the HTTP URL
+ * @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
+ * @param queryParams The query parameters
+ * @param collectionQueryParams The collection query parameters
+ * @param urlQueryDeepObject A URL query string for deep object parameters
+ * @param body The request body object - if it is not binary, otherwise null
+ * @param headerParams The header parameters
+ * @param cookieParams The cookie parameters
+ * @param formParams The form parameters
+ * @param accept The request's Accept header
+ * @param contentType The request's Content-Type header
+ * @param authNames The authentications to apply
+ * @param returnType Return type
+ * @return The response body in type of string
+ * @throws ApiException API exception
+ */
+ public T invokeAPI(
+ String path,
+ String method,
+ List queryParams,
+ List collectionQueryParams,
+ String urlQueryDeepObject,
+ Object body,
+ Map headerParams,
+ Map cookieParams,
+ Map formParams,
+ String accept,
+ String contentType,
+ String[] authNames,
+ TypeReference returnType) throws ApiException {
+ if (body != null && !formParams.isEmpty()) {
+ throw new ApiException("Cannot have body and form params");
+ }
+
+ updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
+ final String url = buildUrl(path, queryParams, collectionQueryParams, urlQueryDeepObject);
+
+ ClassicRequestBuilder builder = ClassicRequestBuilder.create(method);
+ builder.setUri(url);
+
+ if (accept != null) {
+ builder.addHeader("Accept", accept);
+ }
+ for (Entry keyValue : headerParams.entrySet()) {
+ builder.addHeader(keyValue.getKey(), keyValue.getValue());
+ }
+ for (Map.Entry keyValue : defaultHeaderMap.entrySet()) {
+ if (!headerParams.containsKey(keyValue.getKey())) {
+ builder.addHeader(keyValue.getKey(), keyValue.getValue());
+ }
+ }
+
+ BasicCookieStore store = new BasicCookieStore();
+ for (Entry keyValue : cookieParams.entrySet()) {
+ store.addCookie(buildCookie(keyValue.getKey(), keyValue.getValue(), builder.getUri()));
+ }
+ for (Entry keyValue : defaultCookieMap.entrySet()) {
+ if (!cookieParams.containsKey(keyValue.getKey())) {
+ store.addCookie(buildCookie(keyValue.getKey(), keyValue.getValue(), builder.getUri()));
+ }
+ }
+
+ HttpClientContext context = HttpClientContext.create();
+ context.setCookieStore(store);
+
+ ContentType contentTypeObj = getContentType(contentType);
+ if (body != null || !formParams.isEmpty()) {
+ if (isBodyAllowed(method)) {
+ // Add entity if we have content and a valid method
+ builder.setEntity(serialize(body, formParams, contentTypeObj));
+ } else {
+ throw new ApiException("method " + method + " does not support a request body");
+ }
+ } else {
+ // for empty body
+ builder.setEntity(new StringEntity("", contentTypeObj));
+ }
+
+ try (CloseableHttpResponse response = httpClient.execute(builder.build(), context)) {
+ return processResponse(response, returnType);
+ } catch (IOException | ParseException e) {
+ throw new ApiException(e);
+ }
+ }
+
+ /**
+ * Update query and header parameters based on authentication settings.
+ *
+ * @param authNames The authentications to apply
+ * @param queryParams Query parameters
+ * @param headerParams Header parameters
+ * @param cookieParams Cookie parameters
+ */
+ protected void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) {
+ for (String authName : authNames) {
+ Authentication auth = authentications.get(authName);
+ if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
+ auth.applyToParams(queryParams, headerParams, cookieParams);
+ }
+ }
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ApiException.java
new file mode 100644
index 000000000000..086224d5c330
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ApiException.java
@@ -0,0 +1,102 @@
+/*
+ * 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.Map;
+import java.util.List;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class ApiException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ private int code = 0;
+ private Map> responseHeaders = null;
+ private String responseBody = null;
+
+ public ApiException() {}
+
+ public ApiException(Throwable throwable) {
+ super(throwable);
+ }
+
+ public ApiException(String message) {
+ super(message);
+ }
+
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) {
+ super(message, throwable);
+ this.code = code;
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ public ApiException(String message, int code, Map> responseHeaders, String responseBody) {
+ this(message, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) {
+ this(message, throwable, code, responseHeaders, null);
+ }
+
+ public ApiException(int code, Map> responseHeaders, String responseBody) {
+ this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ public ApiException(int code, String message) {
+ super(message);
+ this.code = code;
+ }
+
+ public ApiException(int code, String message, Map> responseHeaders, String responseBody) {
+ this(code, message);
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Get the HTTP status code.
+ *
+ * @return HTTP status code
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Get the HTTP response headers.
+ *
+ * @return A map of list of string
+ */
+ public Map> getResponseHeaders() {
+ return responseHeaders;
+ }
+
+ /**
+ * Get the HTTP response body.
+ *
+ * @return Response body in the form of string
+ */
+ public String getResponseBody() {
+ return responseBody;
+ }
+
+ @Override
+ public String toString() {
+ return "ApiException{" +
+ "code=" + code +
+ ", responseHeaders=" + responseHeaders +
+ ", responseBody='" + responseBody + '\'' +
+ '}';
+ }
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/BaseApi.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/BaseApi.java
new file mode 100644
index 000000000000..5d05cd92d423
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/BaseApi.java
@@ -0,0 +1,121 @@
+/*
+ * 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 tools.jackson.core.type.TypeReference;
+
+import java.util.Collections;
+import java.util.Map;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public abstract class BaseApi {
+
+ protected ApiClient apiClient;
+
+ public BaseApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public BaseApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
+ * @param url The URL for the request, either full URL or only the path.
+ * @param method The HTTP method for the request.
+ * @throws ApiException if fails to make API call.
+ */
+ public void invokeAPI(String url, String method) throws ApiException {
+ invokeAPI(url, method, null, null, Collections.emptyMap());
+ }
+
+ /**
+ * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
+ * @param url The URL for the request, either full URL or only the path.
+ * @param method The HTTP method for the request.
+ * @param additionalHeaders Additional headers for the request.
+ * @throws ApiException if fails to make API call.
+ */
+ public void invokeAPI(String url, String method, Map additionalHeaders) throws ApiException {
+ invokeAPI(url, method, null, null, additionalHeaders);
+ }
+
+ /**
+ * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
+ * @param url The URL for the request, either full URL or only the path.
+ * @param method The HTTP method for the request.
+ * @param request The request object.
+ * @throws ApiException if fails to make API call.
+ */
+ public void invokeAPI(String url, String method, Object request) throws ApiException {
+ invokeAPI(url, method, request, null, Collections.emptyMap());
+ }
+
+ /**
+ * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
+ * @param url The URL for the request, either full URL or only the path.
+ * @param method The HTTP method for the request.
+ * @param request The request object.
+ * @param additionalHeaders Additional headers for the request.
+ * @throws ApiException if fails to make API call.
+ */
+ public void invokeAPI(String url, String method, Object request, Map additionalHeaders) throws ApiException {
+ invokeAPI(url, method, request, null, additionalHeaders);
+ }
+
+ /**
+ * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
+ * @param url The URL for the request, either full URL or only the path.
+ * @param method The HTTP method for the request.
+ * @param returnType The return type.
+ * @return The API response in the specified type.
+ * @throws ApiException if fails to make API call.
+ */
+ public T invokeAPI(String url, String method, TypeReference returnType) throws ApiException {
+ return invokeAPI(url, method, null, returnType, Collections.emptyMap());
+ }
+
+ /**
+ * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
+ * @param url The URL for the request, either full URL or only the path.
+ * @param method The HTTP method for the request.
+ * @param request The request object.
+ * @param returnType The return type.
+ * @return The API response in the specified type.
+ * @throws ApiException if fails to make API call.
+ */
+ public T invokeAPI(String url, String method, Object request, TypeReference returnType) throws ApiException {
+ return invokeAPI(url, method, request, returnType, Collections.emptyMap());
+ }
+
+ /**
+ * Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
+ * @param url The URL for the request, either full URL or only the path.
+ * @param method The HTTP method for the request.
+ * @param request The request object.
+ * @param returnType The return type.
+ * @param additionalHeaders Additional headers for the request.
+ * @return The API response in the specified type.
+ * @throws ApiException if fails to make API call.
+ */
+ public abstract T invokeAPI(String url, String method, Object request, TypeReference returnType, Map additionalHeaders) throws ApiException;
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/Configuration.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/Configuration.java
new file mode 100644
index 000000000000..640b93bead70
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/Configuration.java
@@ -0,0 +1,63 @@
+/*
+ * 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.Objects;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Supplier;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class Configuration {
+ public static final String VERSION = "1.0.0";
+
+ private static final AtomicReference defaultApiClient = new AtomicReference<>();
+ private static volatile Supplier apiClientFactory = ApiClient::new;
+
+ /**
+ * Get the default API client, which would be used when creating API instances without providing an API client.
+ *
+ * @return Default API client
+ */
+ public static ApiClient getDefaultApiClient() {
+ ApiClient client = defaultApiClient.get();
+ if (client == null) {
+ client = defaultApiClient.updateAndGet(val -> {
+ if (val != null) { // changed by another thread
+ return val;
+ }
+ return apiClientFactory.get();
+ });
+ }
+ return client;
+ }
+
+ /**
+ * Set the default API client, which would be used when creating API instances without providing an API client.
+ *
+ * @param apiClient API client
+ */
+ public static void setDefaultApiClient(ApiClient apiClient) {
+ defaultApiClient.set(apiClient);
+ }
+
+ /**
+ * set the callback used to create new ApiClient objects
+ */
+ public static void setApiClientFactory(Supplier factory) {
+ apiClientFactory = Objects.requireNonNull(factory);
+ }
+
+ private Configuration() {
+ }
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/JavaTimeFormatter.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/JavaTimeFormatter.java
new file mode 100644
index 000000000000..de9a00ab199e
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/JavaTimeFormatter.java
@@ -0,0 +1,68 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client;
+
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
+
+/**
+ * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class.
+ * It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class JavaTimeFormatter {
+ private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
+
+ /**
+ * Get the date format used to parse/format {@code OffsetDateTime} parameters.
+ *
+ * @return DateTimeFormatter
+ */
+ public DateTimeFormatter getOffsetDateTimeFormatter() {
+ return offsetDateTimeFormatter;
+ }
+
+ /**
+ * Set the date format used to parse/format {@code OffsetDateTime} parameters.
+ *
+ * @param offsetDateTimeFormatter {@code DateTimeFormatter}
+ */
+ public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
+ this.offsetDateTimeFormatter = offsetDateTimeFormatter;
+ }
+
+ /**
+ * Parse the given string into {@code OffsetDateTime} object.
+ *
+ * @param str String
+ * @return {@code OffsetDateTime}
+ */
+ public OffsetDateTime parseOffsetDateTime(String str) {
+ try {
+ return OffsetDateTime.parse(str, offsetDateTimeFormatter);
+ } catch (DateTimeParseException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Format the given {@code OffsetDateTime} object into string.
+ *
+ * @param offsetDateTime {@code OffsetDateTime}
+ * @return {@code OffsetDateTime} in string format
+ */
+ public String formatOffsetDateTime(OffsetDateTime offsetDateTime) {
+ return offsetDateTimeFormatter.format(offsetDateTime);
+ }
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/Pair.java
new file mode 100644
index 000000000000..b24a12182d12
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/Pair.java
@@ -0,0 +1,37 @@
+/*
+ * 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;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class Pair {
+ private final String name;
+ private final String value;
+
+ public Pair(String name, String value) {
+ this.name = isValidString(name) ? name : "";
+ this.value = isValidString(value) ? value : "";
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ private static boolean isValidString(String arg) {
+ return arg != null;
+ }
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339DateFormat.java
new file mode 100644
index 000000000000..f4a0f4f1081b
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339DateFormat.java
@@ -0,0 +1,57 @@
+/*
+ * 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.text.DateFormat;
+import java.text.FieldPosition;
+import java.text.ParsePosition;
+import java.util.Date;
+import java.text.DecimalFormat;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+import tools.jackson.databind.util.StdDateFormat;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class RFC3339DateFormat extends DateFormat {
+ private static final long serialVersionUID = 1L;
+ private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC");
+
+ private final StdDateFormat fmt = new StdDateFormat()
+ .withTimeZone(TIMEZONE_Z)
+ .withColonInTimeZone(true);
+
+ public RFC3339DateFormat() {
+ this.calendar = new GregorianCalendar();
+ this.numberFormat = new DecimalFormat();
+ }
+
+ @Override
+ public Date parse(String source) {
+ return parse(source, new ParsePosition(0));
+ }
+
+ @Override
+ public Date parse(String source, ParsePosition pos) {
+ return fmt.parse(source, pos);
+ }
+
+ @Override
+ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
+ return fmt.format(date, toAppendTo, fieldPosition);
+ }
+
+ @Override
+ public Object clone() {
+ return super.clone();
+ }
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java
new file mode 100644
index 000000000000..07373b2dd896
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339InstantDeserializer.java
@@ -0,0 +1,100 @@
+/*
+ * 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.time.Instant;
+import java.time.OffsetDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.Temporal;
+import java.time.temporal.TemporalAccessor;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
+import tools.jackson.core.JacksonException;
+import tools.jackson.core.JsonParser;
+import tools.jackson.databind.DeserializationContext;
+import tools.jackson.databind.cfg.DateTimeFeature;
+import tools.jackson.databind.ext.javatime.deser.InstantDeserializer;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class RFC3339InstantDeserializer extends InstantDeserializer {
+ private static final long serialVersionUID = 1L;
+ private final static boolean DEFAULT_NORMALIZE_ZONE_ID = DateTimeFeature.NORMALIZE_DESERIALIZED_ZONE_ID.enabledByDefault();
+ private final static boolean DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
+ = DateTimeFeature.ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS.enabledByDefault();
+
+ public static final RFC3339InstantDeserializer INSTANT = new RFC3339InstantDeserializer<>(
+ Instant.class, DateTimeFormatter.ISO_INSTANT,
+ Instant::from,
+ a -> Instant.ofEpochMilli( a.value ),
+ a -> Instant.ofEpochSecond( a.integer, a.fraction ),
+ null,
+ true, // yes, replace zero offset with Z
+ DEFAULT_NORMALIZE_ZONE_ID,
+ DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
+ );
+
+ public static final RFC3339InstantDeserializer OFFSET_DATE_TIME = new RFC3339InstantDeserializer<>(
+ OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME,
+ OffsetDateTime::from,
+ a -> OffsetDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ),
+ a -> OffsetDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ),
+ (d, z) -> ( d.isEqual( OffsetDateTime.MIN ) || d.isEqual( OffsetDateTime.MAX ) ?
+ d :
+ d.withOffsetSameInstant( z.getRules().getOffset( d.toLocalDateTime() ) ) ),
+ true, // yes, replace zero offset with Z
+ DEFAULT_NORMALIZE_ZONE_ID,
+ DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
+ );
+
+ public static final RFC3339InstantDeserializer ZONED_DATE_TIME = new RFC3339InstantDeserializer<>(
+ ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME,
+ ZonedDateTime::from,
+ a -> ZonedDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ),
+ a -> ZonedDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ),
+ ZonedDateTime::withZoneSameInstant,
+ false, // keep zero offset and Z separate since zones explicitly supported
+ DEFAULT_NORMALIZE_ZONE_ID,
+ DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
+ );
+
+ protected RFC3339InstantDeserializer(
+ Class supportedType,
+ DateTimeFormatter formatter,
+ Function parsedToValue,
+ Function fromMilliseconds,
+ Function fromNanoseconds,
+ BiFunction adjust,
+ boolean replaceZeroOffsetAsZ,
+ boolean normalizeZoneId,
+ boolean readNumericStringsAsTimestamp) {
+ super(
+ supportedType,
+ formatter,
+ parsedToValue,
+ fromMilliseconds,
+ fromNanoseconds,
+ adjust,
+ replaceZeroOffsetAsZ,
+ normalizeZoneId,
+ readNumericStringsAsTimestamp
+ );
+ }
+
+ @Override
+ protected T _fromString(JsonParser p, DeserializationContext ctxt, String string0) throws JacksonException {
+ return super._fromString(p, ctxt, string0.replace( ' ', 'T' ));
+ }
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java
new file mode 100644
index 000000000000..8561da4c7ad6
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/RFC3339JavaTimeModule.java
@@ -0,0 +1,33 @@
+/*
+ * 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.time.Instant;
+import java.time.OffsetDateTime;
+import java.time.ZonedDateTime;
+
+import tools.jackson.databind.module.SimpleModule;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class RFC3339JavaTimeModule extends SimpleModule {
+ private static final long serialVersionUID = 1L;
+
+ public RFC3339JavaTimeModule() {
+ super("RFC3339JavaTimeModule");
+ addDeserializer(Instant.class, RFC3339InstantDeserializer.INSTANT);
+ addDeserializer(OffsetDateTime.class, RFC3339InstantDeserializer.OFFSET_DATE_TIME);
+ addDeserializer(ZonedDateTime.class, RFC3339InstantDeserializer.ZONED_DATE_TIME);
+ }
+
+
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ServerConfiguration.java
new file mode 100644
index 000000000000..987d4d56ba19
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ServerConfiguration.java
@@ -0,0 +1,72 @@
+/*
+ * 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.Map;
+
+/**
+ * Representing a Server configuration.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class ServerConfiguration {
+ public String URL;
+ public String description;
+ public Map variables;
+
+ /**
+ * @param URL A URL to the target host.
+ * @param description A description 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 IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
+ }
+ }
+ url = url.replace("{" + 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/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ServerVariable.java
new file mode 100644
index 000000000000..7a10959c0f70
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/ServerVariable.java
@@ -0,0 +1,37 @@
+/*
+ * 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.HashSet;
+
+/**
+ * Representing a Server Variable for server URL template substitution.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+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/apache-httpclient-jackson3/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/StringUtil.java
new file mode 100644
index 000000000000..8f8a2b5828ca
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/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", comments = "Generator version: 7.22.0-SNAPSHOT")
+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/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
new file mode 100644
index 000000000000..d09e558fee4b
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
@@ -0,0 +1,158 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import tools.jackson.core.type.TypeReference;
+
+import org.openapitools.client.ApiException;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.BaseApi;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.Pair;
+
+import org.openapitools.client.model.Client;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringJoiner;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class AnotherFakeApi extends BaseApi {
+
+ public AnotherFakeApi() {
+ super(Configuration.getDefaultApiClient());
+ }
+
+ public AnotherFakeApi(ApiClient apiClient) {
+ super(apiClient);
+ }
+
+ /**
+ * To test special tags
+ * To test special tags and operation ID starting with number
+ * @param client client model (required)
+ * @return Client
+ * @throws ApiException if fails to make API call
+ */
+ public Client call123testSpecialTags(@javax.annotation.Nonnull Client client) throws ApiException {
+ return this.call123testSpecialTags(client, Collections.emptyMap());
+ }
+
+
+ /**
+ * To test special tags
+ * To test special tags and operation ID starting with number
+ * @param client client model (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return Client
+ * @throws ApiException if fails to make API call
+ */
+ public Client call123testSpecialTags(@javax.annotation.Nonnull Client client, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = client;
+
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags");
+ }
+
+ // create path and map variables
+ String localVarPath = "/another-fake/dummy";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "PATCH",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ @Override
+ public T invokeAPI(String url, String method, Object request, TypeReference returnType, Map additionalHeaders) throws ApiException {
+ String localVarPath = url.replace(apiClient.getBaseURL(), "");
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ return apiClient.invokeAPI(
+ localVarPath,
+ method,
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ request,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ returnType
+ );
+ }
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/DefaultApi.java
new file mode 100644
index 000000000000..81e43ac3ab09
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/DefaultApi.java
@@ -0,0 +1,151 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import tools.jackson.core.type.TypeReference;
+
+import org.openapitools.client.ApiException;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.BaseApi;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.Pair;
+
+import org.openapitools.client.model.FooGetDefaultResponse;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringJoiner;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class DefaultApi extends BaseApi {
+
+ public DefaultApi() {
+ super(Configuration.getDefaultApiClient());
+ }
+
+ public DefaultApi(ApiClient apiClient) {
+ super(apiClient);
+ }
+
+ /**
+ *
+ *
+ * @return FooGetDefaultResponse
+ * @throws ApiException if fails to make API call
+ */
+ public FooGetDefaultResponse fooGet() throws ApiException {
+ return this.fooGet(Collections.emptyMap());
+ }
+
+
+ /**
+ *
+ *
+ * @param additionalHeaders additionalHeaders for this call
+ * @return FooGetDefaultResponse
+ * @throws ApiException if fails to make API call
+ */
+ public FooGetDefaultResponse fooGet(Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/foo";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ @Override
+ public T invokeAPI(String url, String method, Object request, TypeReference returnType, Map additionalHeaders) throws ApiException {
+ String localVarPath = url.replace(apiClient.getBaseURL(), "");
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ return apiClient.invokeAPI(
+ localVarPath,
+ method,
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ request,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ returnType
+ );
+ }
+}
diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/FakeApi.java
new file mode 100644
index 000000000000..7910920cce86
--- /dev/null
+++ b/samples/client/petstore/java/apache-httpclient-jackson3/src/main/java/org/openapitools/client/api/FakeApi.java
@@ -0,0 +1,1841 @@
+/*
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package org.openapitools.client.api;
+
+import tools.jackson.core.type.TypeReference;
+
+import org.openapitools.client.ApiException;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.BaseApi;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.Pair;
+
+import java.math.BigDecimal;
+import org.openapitools.client.model.ChildWithNullable;
+import org.openapitools.client.model.Client;
+import org.openapitools.client.model.EnumClass;
+import org.openapitools.client.model.FakeBigDecimalMap200Response;
+import java.io.File;
+import org.openapitools.client.model.FileSchemaTestClass;
+import org.openapitools.client.model.HealthCheckResult;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import org.openapitools.client.model.OuterComposite;
+import org.openapitools.client.model.OuterObjectWithEnumProperty;
+import org.openapitools.client.model.Pet;
+import org.openapitools.client.model.TestInlineFreeformAdditionalPropertiesRequest;
+import org.openapitools.client.model.User;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringJoiner;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0-SNAPSHOT")
+public class FakeApi extends BaseApi {
+
+ public FakeApi() {
+ super(Configuration.getDefaultApiClient());
+ }
+
+ public FakeApi(ApiClient apiClient) {
+ super(apiClient);
+ }
+
+ /**
+ *
+ * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
+ * @return FakeBigDecimalMap200Response
+ * @throws ApiException if fails to make API call
+ */
+ public FakeBigDecimalMap200Response fakeBigDecimalMap() throws ApiException {
+ return this.fakeBigDecimalMap(Collections.emptyMap());
+ }
+
+
+ /**
+ *
+ * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
+ * @param additionalHeaders additionalHeaders for this call
+ * @return FakeBigDecimalMap200Response
+ * @throws ApiException if fails to make API call
+ */
+ public FakeBigDecimalMap200Response fakeBigDecimalMap(Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fake/BigDecimalMap";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "*/*"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * Health check endpoint
+ *
+ * @return HealthCheckResult
+ * @throws ApiException if fails to make API call
+ */
+ public HealthCheckResult fakeHealthGet() throws ApiException {
+ return this.fakeHealthGet(Collections.emptyMap());
+ }
+
+
+ /**
+ * Health check endpoint
+ *
+ * @param additionalHeaders additionalHeaders for this call
+ * @return HealthCheckResult
+ * @throws ApiException if fails to make API call
+ */
+ public HealthCheckResult fakeHealthGet(Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/fake/health";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ * test http signature authentication
+ *
+ * @param pet Pet object that needs to be added to the store (required)
+ * @param query1 query parameter (optional)
+ * @param header1 header parameter (optional)
+ * @throws ApiException if fails to make API call
+ */
+ public void fakeHttpSignatureTest(@javax.annotation.Nonnull Pet pet, @javax.annotation.Nullable String query1, @javax.annotation.Nullable String header1) throws ApiException {
+ this.fakeHttpSignatureTest(pet, query1, header1, Collections.emptyMap());
+ }
+
+
+ /**
+ * test http signature authentication
+ *
+ * @param pet Pet object that needs to be added to the store (required)
+ * @param query1 query parameter (optional)
+ * @param header1 header parameter (optional)
+ * @param additionalHeaders additionalHeaders for this call
+ * @throws ApiException if fails to make API call
+ */
+ public void fakeHttpSignatureTest(@javax.annotation.Nonnull Pet pet, @javax.annotation.Nullable String query1, @javax.annotation.Nullable String header1, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = pet;
+
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new ApiException(400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest");
+ }
+
+ // create path and map variables
+ String localVarPath = "/fake/http-signature-test";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPair("query_1", query1));
+ if (header1 != null)
+ localVarHeaderParams.put("header_1", apiClient.parameterToString(header1));
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json", "application/xml"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { "http_signature_test" };
+
+ apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ null
+ );
+ }
+
+ /**
+ *
+ * Test serialization of outer boolean types
+ * @param body Input boolean as post body (optional)
+ * @return Boolean
+ * @throws ApiException if fails to make API call
+ */
+ public Boolean fakeOuterBooleanSerialize(@javax.annotation.Nullable Boolean body) throws ApiException {
+ return this.fakeOuterBooleanSerialize(body, Collections.emptyMap());
+ }
+
+
+ /**
+ *
+ * Test serialization of outer boolean types
+ * @param body Input boolean as post body (optional)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return Boolean
+ * @throws ApiException if fails to make API call
+ */
+ public Boolean fakeOuterBooleanSerialize(@javax.annotation.Nullable Boolean body, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = body;
+
+ // create path and map variables
+ String localVarPath = "/fake/outer/boolean";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "*/*"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ TypeReference localVarReturnType = new TypeReference() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "POST",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
+ /**
+ *
+ * Test serialization of object with outer number type
+ * @param outerComposite Input composite as post body (optional)
+ * @return OuterComposite
+ * @throws ApiException if fails to make API call
+ */
+ public OuterComposite fakeOuterCompositeSerialize(@javax.annotation.Nullable OuterComposite outerComposite) throws ApiException {
+ return this.fakeOuterCompositeSerialize(outerComposite, Collections.emptyMap());
+ }
+
+
+ /**
+ *
+ * Test serialization of object with outer number type
+ * @param outerComposite Input composite as post body (optional)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return OuterComposite
+ * @throws ApiException if fails to make API call
+ */
+ public OuterComposite fakeOuterCompositeSerialize(@javax.annotation.Nullable OuterComposite outerComposite, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = outerComposite;
+
+ // create path and map variables
+ String localVarPath = "/fake/outer/composite";
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "*/*"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ TypeReference