- 4.0.0
- org.openapitools
- petstore-openapi3-native
- jar
- petstore-openapi3-native
- 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
-
-
-
+
+
+ 4.0.0
+ org.openapitools.dummy
+ dummy-pom
+ 1.0
- maven-enforcer-plugin
- 3.0.0-M1
-
-
- enforce-maven
-
- enforce
-
-
-
-
- 3
-
-
- 11
-
-
-
-
-
-
-
- maven-surefire-plugin
- 3.0.0-M3
-
-
- conf/log4j.properties
-
- -Xms512m -Xmx1500m
- methods
- 10
-
-
-
+ org.apache.maven.plugins
maven-dependency-plugin
- 3.1.1
-
-
- package
-
- copy-dependencies
-
-
- ${project.build.directory}/lib
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 3.1.2
-
-
-
- test-jar
-
-
-
-
-
-
-
- maven-compiler-plugin
- 3.8.1
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 3.1.0
-
-
- attach-javadocs
-
- jar
-
-
-
-
-
- maven-source-plugin
- 3.1.0
-
-
- attach-sources
-
- jar-no-fork
-
-
-
+ 2.8
-
-
-
- sign-artifacts
-
-
-
- maven-gpg-plugin
- 1.6
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
-
-
-
-
-
-
- io.swagger
- swagger-annotations
- ${swagger-annotations-version}
-
-
-
-
- com.fasterxml.jackson.core
- jackson-core
- ${jackson-version}
-
-
- com.fasterxml.jackson.core
- jackson-annotations
- ${jackson-version}
-
-
- com.fasterxml.jackson.core
- jackson-databind
- ${jackson-version}
-
-
- com.fasterxml.jackson.datatype
- jackson-datatype-jsr310
- ${jackson-version}
-
-
- org.openapitools
- jackson-databind-nullable
- ${jackson-databind-nullable-version}
-
-
-
-
- com.google.code.findbugs
- jsr305
- 3.0.2
-
-
- jakarta.annotation
- jakarta.annotation-api
- ${jakarta-annotation-version}
- provided
-
-
-
-
- junit
- junit
- ${junit-version}
- test
-
-
-
-
- UTF-8
- 1.5.22
- 11
- 11
- 2.10.4
- 0.2.1
- 1.3.5
- 4.13.2
-
diff --git a/samples/openapi3/client/petstore/java/native/settings.gradle b/samples/openapi3/client/petstore/java/native/settings.gradle
deleted file mode 100644
index 80c85ec48329..000000000000
--- a/samples/openapi3/client/petstore/java/native/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = "petstore-openapi3-native"
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/java/native/src/main/AndroidManifest.xml b/samples/openapi3/client/petstore/java/native/src/main/AndroidManifest.xml
deleted file mode 100644
index 54fbcb3da1e8..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java
deleted file mode 100644
index 4b5a1fb4bd34..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package org.openapitools.client;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
-import org.openapitools.jackson.nullable.JsonNullableModule;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URLEncoder;
-import java.net.http.HttpClient;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-import java.time.Duration;
-import java.time.OffsetDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.StringJoiner;
-import java.util.function.Consumer;
-import java.util.stream.Collectors;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-
-/**
- * Configuration and utility class for API clients.
- *
- * This class can be constructed and modified, then used to instantiate the
- * various API classes. The API classes use the settings in this class to
- * configure themselves, but otherwise do not store a link to this class.
- *
- * This class is mutable and not synchronized, so it is not thread-safe.
- * The API classes generated from this are immutable and thread-safe.
- *
- * The setter methods of this class return the current object to facilitate
- * a fluent style of configuration.
- */
-@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class ApiClient {
-
- private HttpClient.Builder builder;
- private ObjectMapper mapper;
- private String scheme;
- private String host;
- private int port;
- private String basePath;
- private Consumer interceptor;
- private Consumer> responseInterceptor;
- private Duration readTimeout;
-
- private static String valueToString(Object value) {
- if (value == null) {
- return "";
- }
- if (value instanceof OffsetDateTime) {
- return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
- }
- return value.toString();
- }
-
- /**
- * URL encode a string in the UTF-8 encoding.
- *
- * @param s String to encode.
- * @return URL-encoded representation of the input string.
- */
- public static String urlEncode(String s) {
- return URLEncoder.encode(s, UTF_8);
- }
-
- /**
- * Convert a URL query name/value parameter to a list of encoded {@link Pair}
- * objects.
- *
- * The value can be null, in which case an empty list is returned.
- *
- * @param name The query name parameter.
- * @param value The query value, which may not be a collection but may be
- * null.
- * @return A singleton list of the {@link Pair} objects representing the input
- * parameters, which is encoded for use in a URL. If the value is null, an
- * empty list is returned.
- */
- public static List parameterToPairs(String name, Object value) {
- if (name == null || name.isEmpty() || value == null) {
- return Collections.emptyList();
- }
- return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value))));
- }
-
- /**
- * Convert a URL query name/collection parameter to a list of encoded
- * {@link Pair} objects.
- *
- * @param collectionFormat The swagger collectionFormat string (csv, tsv, etc).
- * @param name The query name parameter.
- * @param values A collection of values for the given query name, which may be
- * null.
- * @return A list of {@link Pair} objects representing the input parameters,
- * which is encoded for use in a URL. If the values collection is null, an
- * empty list is returned.
- */
- public static List parameterToPairs(
- String collectionFormat, String name, Collection> values) {
- if (name == null || name.isEmpty() || values == null || values.isEmpty()) {
- return Collections.emptyList();
- }
-
- // get the collection format (default: csv)
- String format = collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat;
-
- // create the params based on the collection format
- if ("multi".equals(format)) {
- return values.stream()
- .map(value -> new Pair(urlEncode(name), urlEncode(valueToString(value))))
- .collect(Collectors.toList());
- }
-
- String delimiter;
- switch(format) {
- case "csv":
- delimiter = urlEncode(",");
- break;
- case "ssv":
- delimiter = urlEncode(" ");
- break;
- case "tsv":
- delimiter = urlEncode("\t");
- break;
- case "pipes":
- delimiter = urlEncode("|");
- break;
- default:
- throw new IllegalArgumentException("Illegal collection format: " + collectionFormat);
- }
-
- StringJoiner joiner = new StringJoiner(delimiter);
- for (Object value : values) {
- joiner.add(urlEncode(valueToString(value)));
- }
-
- return Collections.singletonList(new Pair(urlEncode(name), joiner.toString()));
- }
-
- /**
- * Ctor.
- */
- public ApiClient() {
- this.builder = createDefaultHttpClientBuilder();
- this.mapper = createDefaultObjectMapper();
- updateBaseUri(getDefaultBaseUri());
- interceptor = null;
- readTimeout = null;
- responseInterceptor = null;
- }
-
- /**
- * Ctor.
- */
- public ApiClient(HttpClient.Builder builder, ObjectMapper mapper, String baseUri) {
- this.builder = builder;
- this.mapper = mapper;
- updateBaseUri(baseUri != null ? baseUri : getDefaultBaseUri());
- interceptor = null;
- readTimeout = null;
- responseInterceptor = null;
- }
-
- protected ObjectMapper createDefaultObjectMapper() {
- ObjectMapper mapper = new ObjectMapper();
- mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
- mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
- mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
- mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
- mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
- mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
- mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE);
- mapper.registerModule(new JavaTimeModule());
- mapper.registerModule(new JsonNullableModule());
- return mapper;
- }
-
- protected String getDefaultBaseUri() {
- return "http://petstore.swagger.io:80/v2";
- }
-
- protected HttpClient.Builder createDefaultHttpClientBuilder() {
- return HttpClient.newBuilder();
- }
-
- public void updateBaseUri(String baseUri) {
- URI uri = URI.create(baseUri);
- scheme = uri.getScheme();
- host = uri.getHost();
- port = uri.getPort();
- basePath = uri.getRawPath();
- }
-
- /**
- * Set a custom {@link HttpClient.Builder} object to use when creating the
- * {@link HttpClient} that is used by the API client.
- *
- * @param builder Custom client builder.
- * @return This object.
- */
- public ApiClient setHttpClientBuilder(HttpClient.Builder builder) {
- this.builder = builder;
- return this;
- }
-
- /**
- * Get an {@link HttpClient} based on the current {@link HttpClient.Builder}.
- *
- * The returned object is immutable and thread-safe.
- *
- * @return The HTTP client.
- */
- public HttpClient getHttpClient() {
- return builder.build();
- }
-
- /**
- * Set a custom {@link ObjectMapper} to serialize and deserialize the request
- * and response bodies.
- *
- * @param mapper Custom object mapper.
- * @return This object.
- */
- public ApiClient setObjectMapper(ObjectMapper mapper) {
- this.mapper = mapper;
- return this;
- }
-
- /**
- * Get a copy of the current {@link ObjectMapper}.
- *
- * @return A copy of the current object mapper.
- */
- public ObjectMapper getObjectMapper() {
- return mapper.copy();
- }
-
- /**
- * Set a custom host name for the target service.
- *
- * @param host The host name of the target service.
- * @return This object.
- */
- public ApiClient setHost(String host) {
- this.host = host;
- return this;
- }
-
- /**
- * Set a custom port number for the target service.
- *
- * @param port The port of the target service. Set this to -1 to reset the
- * value to the default for the scheme.
- * @return This object.
- */
- public ApiClient setPort(int port) {
- this.port = port;
- return this;
- }
-
- /**
- * Set a custom base path for the target service, for example '/v2'.
- *
- * @param basePath The base path against which the rest of the path is
- * resolved.
- * @return This object.
- */
- public ApiClient setBasePath(String basePath) {
- this.basePath = basePath;
- return this;
- }
-
- /**
- * Get the base URI to resolve the endpoint paths against.
- *
- * @return The complete base URI that the rest of the API parameters are
- * resolved against.
- */
- public String getBaseUri() {
- return scheme + "://" + host + (port == -1 ? "" : ":" + port) + basePath;
- }
-
- /**
- * Set a custom scheme for the target service, for example 'https'.
- *
- * @param scheme The scheme of the target service
- * @return This object.
- */
- public ApiClient setScheme(String scheme){
- this.scheme = scheme;
- return this;
- }
-
- /**
- * Set a custom request interceptor.
- *
- * A request interceptor is a mechanism for altering each request before it
- * is sent. After the request has been fully configured but not yet built, the
- * request builder is passed into this function for further modification,
- * after which it is sent out.
- *
- * This is useful for altering the requests in a custom manner, such as
- * adding headers. It could also be used for logging and monitoring.
- *
- * @param interceptor A function invoked before creating each request. A value
- * of null resets the interceptor to a no-op.
- * @return This object.
- */
- public ApiClient setRequestInterceptor(Consumer interceptor) {
- this.interceptor = interceptor;
- return this;
- }
-
- /**
- * Get the custom interceptor.
- *
- * @return The custom interceptor that was set, or null if there isn't any.
- */
- public Consumer getRequestInterceptor() {
- return interceptor;
- }
-
- /**
- * Set a custom response interceptor.
- *
- * This is useful for logging, monitoring or extraction of header variables
- *
- * @param interceptor A function invoked before creating each request. A value
- * of null resets the interceptor to a no-op.
- * @return This object.
- */
- public ApiClient setResponseInterceptor(Consumer> interceptor) {
- this.responseInterceptor = interceptor;
- return this;
- }
-
- /**
- * Get the custom response interceptor.
- *
- * @return The custom interceptor that was set, or null if there isn't any.
- */
- public Consumer> getResponseInterceptor() {
- return responseInterceptor;
- }
-
- /**
- * Set the read timeout for the http client.
- *
- * This is the value used by default for each request, though it can be
- * overridden on a per-request basis with a request interceptor.
- *
- * @param readTimeout The read timeout used by default by the http client.
- * Setting this value to null resets the timeout to an
- * effectively infinite value.
- * @return This object.
- */
- public ApiClient setReadTimeout(Duration readTimeout) {
- this.readTimeout = readTimeout;
- return this;
- }
-
- /**
- * Get the read timeout that was set.
- *
- * @return The read timeout, or null if no timeout was set. Null represents
- * an infinite wait time.
- */
- public Duration getReadTimeout() {
- return readTimeout;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiException.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiException.java
deleted file mode 100644
index 9b6bbf0dc38e..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiException.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client;
-
-import java.net.http.HttpHeaders;
-
-@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class ApiException extends Exception {
- private int code = 0;
- private HttpHeaders 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, HttpHeaders responseHeaders, String responseBody) {
- super(message, throwable);
- this.code = code;
- this.responseHeaders = responseHeaders;
- this.responseBody = responseBody;
- }
-
- public ApiException(String message, int code, HttpHeaders responseHeaders, String responseBody) {
- this(message, (Throwable) null, code, responseHeaders, responseBody);
- }
-
- public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders) {
- this(message, throwable, code, responseHeaders, null);
- }
-
- public ApiException(int code, HttpHeaders responseHeaders, String responseBody) {
- this((String) null, (Throwable) null, code, responseHeaders, responseBody);
- }
-
- public ApiException(int code, String message) {
- super(message);
- this.code = code;
- }
-
- public ApiException(int code, String message, HttpHeaders 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 Headers as an HttpHeaders object
- */
- public HttpHeaders getResponseHeaders() {
- return responseHeaders;
- }
-
- /**
- * Get the HTTP response body.
- *
- * @return Response body in the form of string
- */
- public String getResponseBody() {
- return responseBody;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiResponse.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiResponse.java
deleted file mode 100644
index 9bb5cac17b41..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ApiResponse.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * API response returned by API call.
- *
- * @param The type of data that is deserialized from response body
- */
-public class ApiResponse {
- final private int statusCode;
- final private Map> headers;
- final private T data;
-
- /**
- * @param statusCode The status code of HTTP response
- * @param headers The headers of HTTP response
- */
- public ApiResponse(int statusCode, Map> headers) {
- this(statusCode, headers, null);
- }
-
- /**
- * @param statusCode The status code of HTTP response
- * @param headers The headers of HTTP response
- * @param data The object deserialized from response bod
- */
- public ApiResponse(int statusCode, Map> headers, T data) {
- this.statusCode = statusCode;
- this.headers = headers;
- this.data = data;
- }
-
- public int getStatusCode() {
- return statusCode;
- }
-
- public Map> getHeaders() {
- return headers;
- }
-
- public T getData() {
- return data;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/Configuration.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/Configuration.java
deleted file mode 100644
index 29538391ae05..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/Configuration.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client;
-
-@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class Configuration {
- private static ApiClient defaultApiClient = new ApiClient();
-
- /**
- * 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() {
- return defaultApiClient;
- }
-
- /**
- * 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 = apiClient;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/JSON.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/JSON.java
deleted file mode 100644
index 04d3f7c17996..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/JSON.java
+++ /dev/null
@@ -1,240 +0,0 @@
-package org.openapitools.client;
-
-import com.fasterxml.jackson.annotation.*;
-import com.fasterxml.jackson.databind.*;
-import org.openapitools.jackson.nullable.JsonNullableModule;
-import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
-import org.openapitools.client.model.*;
-
-import java.text.DateFormat;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class JSON {
- private ObjectMapper mapper;
-
- public JSON() {
- mapper = new ObjectMapper();
- mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
- mapper.configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false);
- mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
- mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true);
- mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
- mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
- mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
- mapper.setDateFormat(new RFC3339DateFormat());
- mapper.registerModule(new JavaTimeModule());
- JsonNullableModule jnm = new JsonNullableModule();
- mapper.registerModule(jnm);
- }
-
- /**
- * Set the date format for JSON (de)serialization with Date properties.
- * @param dateFormat Date format
- */
- public void setDateFormat(DateFormat dateFormat) {
- mapper.setDateFormat(dateFormat);
- }
-
- /**
- * Get the object mapper
- *
- * @return object mapper
- */
- public ObjectMapper getMapper() { return mapper; }
-
- /**
- * Returns the target model class that should be used to deserialize the input data.
- * The discriminator mappings are used to determine the target model class.
- *
- * @param node The input data.
- * @param modelClass The class that contains the discriminator mappings.
- */
- public static Class> getClassForElement(JsonNode node, Class> modelClass) {
- ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
- if (cdm != null) {
- return cdm.getClassForElement(node, new HashSet>());
- }
- return null;
- }
-
- /**
- * Helper class to register the discriminator mappings.
- */
- private static class ClassDiscriminatorMapping {
- // The model class name.
- Class> modelClass;
- // The name of the discriminator property.
- String discriminatorName;
- // The discriminator mappings for a model class.
- Map> discriminatorMappings;
-
- // Constructs a new class discriminator.
- ClassDiscriminatorMapping(Class> cls, String propertyName, Map> mappings) {
- modelClass = cls;
- discriminatorName = propertyName;
- discriminatorMappings = new HashMap>();
- if (mappings != null) {
- discriminatorMappings.putAll(mappings);
- }
- }
-
- // Return the name of the discriminator property for this model class.
- String getDiscriminatorPropertyName() {
- return discriminatorName;
- }
-
- // Return the discriminator value or null if the discriminator is not
- // present in the payload.
- String getDiscriminatorValue(JsonNode node) {
- // Determine the value of the discriminator property in the input data.
- if (discriminatorName != null) {
- // Get the value of the discriminator property, if present in the input payload.
- node = node.get(discriminatorName);
- if (node != null && node.isValueNode()) {
- String discrValue = node.asText();
- if (discrValue != null) {
- return discrValue;
- }
- }
- }
- return null;
- }
-
- /**
- * Returns the target model class that should be used to deserialize the input data.
- * This function can be invoked for anyOf/oneOf composed models with discriminator mappings.
- * The discriminator mappings are used to determine the target model class.
- *
- * @param node The input data.
- * @param visitedClasses The set of classes that have already been visited.
- */
- Class> getClassForElement(JsonNode node, Set> visitedClasses) {
- if (visitedClasses.contains(modelClass)) {
- // Class has already been visited.
- return null;
- }
- // Determine the value of the discriminator property in the input data.
- String discrValue = getDiscriminatorValue(node);
- if (discrValue == null) {
- return null;
- }
- Class> cls = discriminatorMappings.get(discrValue);
- // It may not be sufficient to return this cls directly because that target class
- // may itself be a composed schema, possibly with its own discriminator.
- visitedClasses.add(modelClass);
- for (Class> childClass : discriminatorMappings.values()) {
- ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass);
- if (childCdm == null) {
- continue;
- }
- if (!discriminatorName.equals(childCdm.discriminatorName)) {
- discrValue = getDiscriminatorValue(node);
- if (discrValue == null) {
- continue;
- }
- }
- if (childCdm != null) {
- // Recursively traverse the discriminator mappings.
- Class> childDiscr = childCdm.getClassForElement(node, visitedClasses);
- if (childDiscr != null) {
- return childDiscr;
- }
- }
- }
- return cls;
- }
- }
-
- /**
- * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy.
- *
- * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy,
- * so it's not possible to use the instanceof keyword.
- *
- * @param modelClass A OpenAPI model class.
- * @param inst The instance object.
- */
- public static boolean isInstanceOf(Class> modelClass, Object inst, Set> visitedClasses) {
- if (modelClass.isInstance(inst)) {
- // This handles the 'allOf' use case with single parent inheritance.
- return true;
- }
- if (visitedClasses.contains(modelClass)) {
- // This is to prevent infinite recursion when the composed schemas have
- // a circular dependency.
- return false;
- }
- visitedClasses.add(modelClass);
-
- // Traverse the oneOf/anyOf composed schemas.
- Map> descendants = modelDescendants.get(modelClass);
- if (descendants != null) {
- for (Class> childType : descendants.values()) {
- if (isInstanceOf(childType, inst, visitedClasses)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * A map of discriminators for all model classes.
- */
- private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
-
- /**
- * A map of oneOf/anyOf descendants for each model class.
- */
- private static Map, Map>> modelDescendants = new HashMap<>();
-
- /**
- * Register a model class discriminator.
- *
- * @param modelClass the model class
- * @param discriminatorPropertyName the name of the discriminator property
- * @param mappings a map with the discriminator mappings.
- */
- public static void registerDiscriminator(Class> modelClass, String discriminatorPropertyName, Map> mappings) {
- ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings);
- modelDiscriminators.put(modelClass, m);
- }
-
- /**
- * Register the oneOf/anyOf descendants of the modelClass.
- *
- * @param modelClass the model class
- * @param descendants a map of oneOf/anyOf descendants.
- */
- public static void registerDescendants(Class> modelClass, Map> descendants) {
- modelDescendants.put(modelClass, descendants);
- }
-
- private static JSON json;
-
- static {
- json = new JSON();
- }
-
- /**
- * Get the default JSON instance.
- *
- * @return the default JSON instance
- */
- public static JSON getDefault() {
- return json;
- }
-
- /**
- * Set the default JSON instance.
- *
- * @param json JSON instance to be used
- */
- public static void setDefault(JSON json) {
- JSON.json = json;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java
deleted file mode 100644
index e1afb8c039f6..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/Pair.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package org.openapitools.client;
-
-@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class Pair {
- private String name = "";
- private String value = "";
-
- public Pair (String name, String value) {
- setName(name);
- setValue(value);
- }
-
- private void setName(String name) {
- if (!isValidString(name)) {
- return;
- }
-
- this.name = name;
- }
-
- private void setValue(String value) {
- if (!isValidString(value)) {
- return;
- }
-
- this.value = value;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getValue() {
- return this.value;
- }
-
- private boolean isValidString(String arg) {
- if (arg == null) {
- return false;
- }
-
- if (arg.trim().isEmpty()) {
- return false;
- }
-
- return true;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java
deleted file mode 100644
index 07d7e782b0da..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package org.openapitools.client;
-
-import com.fasterxml.jackson.databind.util.StdDateFormat;
-
-import java.text.DateFormat;
-import java.text.FieldPosition;
-import java.text.ParsePosition;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-
-public class RFC3339DateFormat extends DateFormat {
- private static final long serialVersionUID = 1L;
- private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC");
-
- private final StdDateFormat fmt = new StdDateFormat()
- .withTimeZone(TIMEZONE_Z)
- .withColonInTimeZone(true);
-
- public RFC3339DateFormat() {
- this.calendar = new GregorianCalendar();
- }
-
- @Override
- public Date parse(String source) {
- return parse(source, new ParsePosition(0));
- }
-
- @Override
- public Date parse(String source, ParsePosition pos) {
- return fmt.parse(source, pos);
- }
-
- @Override
- public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
- return fmt.format(date, toAppendTo, fieldPosition);
- }
-
- @Override
- public Object clone() {
- return this;
- }
-}
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java
deleted file mode 100644
index a1107a8690e4..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.openapitools.client;
-
-import java.util.Map;
-
-/**
- * Representing a Server configuration.
- */
-public class ServerConfiguration {
- public String URL;
- public String description;
- public Map variables;
-
- /**
- * @param URL A URL to the target host.
- * @param description A describtion of the host designated by the URL.
- * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
- */
- public ServerConfiguration(String URL, String description, Map variables) {
- this.URL = URL;
- this.description = description;
- this.variables = variables;
- }
-
- /**
- * Format URL template using given variables.
- *
- * @param variables A map between a variable name and its value.
- * @return Formatted URL.
- */
- public String URL(Map variables) {
- String url = this.URL;
-
- // go through variables and replace placeholders
- for (Map.Entry variable: this.variables.entrySet()) {
- String name = variable.getKey();
- ServerVariable serverVariable = variable.getValue();
- String value = serverVariable.defaultValue;
-
- if (variables != null && variables.containsKey(name)) {
- value = variables.get(name);
- if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
- throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
- }
- }
- url = url.replaceAll("\\{" + name + "\\}", value);
- }
- return url;
- }
-
- /**
- * Format URL template using default server variables.
- *
- * @return Formatted URL.
- */
- public String URL() {
- return URL(null);
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ServerVariable.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ServerVariable.java
deleted file mode 100644
index c2f13e216662..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/ServerVariable.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.openapitools.client;
-
-import java.util.HashSet;
-
-/**
- * Representing a Server Variable for server URL template substitution.
- */
-public class ServerVariable {
- public String description;
- public String defaultValue;
- public HashSet enumValues = null;
-
- /**
- * @param description A description for the server variable.
- * @param defaultValue The default value to use for substitution.
- * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
- */
- public ServerVariable(String description, String defaultValue, HashSet enumValues) {
- this.description = description;
- this.defaultValue = defaultValue;
- this.enumValues = enumValues;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
deleted file mode 100644
index 9e3aae365055..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.ApiException;
-import org.openapitools.client.ApiResponse;
-import org.openapitools.client.Pair;
-
-import org.openapitools.client.model.Client;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.http.HttpClient;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-import java.time.Duration;
-import java.util.function.Consumer;
-
-import java.util.ArrayList;
-import java.util.StringJoiner;
-import java.util.List;
-import java.util.Map;
-
-@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class AnotherFakeApi {
- private final HttpClient memberVarHttpClient;
- private final ObjectMapper memberVarObjectMapper;
- private final String memberVarBaseUri;
- private final Consumer memberVarInterceptor;
- private final Duration memberVarReadTimeout;
- private final Consumer> memberVarResponseInterceptor;
-
- public AnotherFakeApi() {
- this(new ApiClient());
- }
-
- public AnotherFakeApi(ApiClient apiClient) {
- memberVarHttpClient = apiClient.getHttpClient();
- memberVarObjectMapper = apiClient.getObjectMapper();
- memberVarBaseUri = apiClient.getBaseUri();
- memberVarInterceptor = apiClient.getRequestInterceptor();
- memberVarReadTimeout = apiClient.getReadTimeout();
- memberVarResponseInterceptor = apiClient.getResponseInterceptor();
- }
-
- protected ApiException getApiException(String operationId, HttpResponse response) throws IOException {
- String body = response.body() == null ? null : new String(response.body().readAllBytes());
- String message = formatExceptionMessage(operationId, response.statusCode(), body);
- return new ApiException(response.statusCode(), message, response.headers(), body);
- }
-
- private String formatExceptionMessage(String operationId, int statusCode, String body) {
- if (body == null || body.isEmpty()) {
- body = "[no body]";
- }
- return operationId + " call failed with: " + statusCode + " - " + body;
- }
-
- /**
- * 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(Client client) throws ApiException {
- ApiResponse localVarResponse = call123testSpecialTagsWithHttpInfo(client);
- return localVarResponse.getData();
- }
-
- /**
- * To test special tags
- * To test special tags and operation ID starting with number
- * @param client client model (required)
- * @return ApiResponse<Client>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse call123testSpecialTagsWithHttpInfo(Client client) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = call123testSpecialTagsRequestBuilder(client);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("call123testSpecialTags", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder call123testSpecialTagsRequestBuilder(Client client) throws ApiException {
- // verify the required parameter 'client' is set
- if (client == null) {
- throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags");
- }
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/another-fake/dummy";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Content-Type", "application/json");
- localVarRequestBuilder.header("Accept", "application/json");
-
- try {
- byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(client);
- localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
- } catch (IOException e) {
- throw new ApiException(e);
- }
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java
deleted file mode 100644
index 5dc086e5edb2..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.ApiException;
-import org.openapitools.client.ApiResponse;
-import org.openapitools.client.Pair;
-
-import org.openapitools.client.model.InlineResponseDefault;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.http.HttpClient;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-import java.time.Duration;
-import java.util.function.Consumer;
-
-import java.util.ArrayList;
-import java.util.StringJoiner;
-import java.util.List;
-import java.util.Map;
-
-@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class DefaultApi {
- private final HttpClient memberVarHttpClient;
- private final ObjectMapper memberVarObjectMapper;
- private final String memberVarBaseUri;
- private final Consumer memberVarInterceptor;
- private final Duration memberVarReadTimeout;
- private final Consumer> memberVarResponseInterceptor;
-
- public DefaultApi() {
- this(new ApiClient());
- }
-
- public DefaultApi(ApiClient apiClient) {
- memberVarHttpClient = apiClient.getHttpClient();
- memberVarObjectMapper = apiClient.getObjectMapper();
- memberVarBaseUri = apiClient.getBaseUri();
- memberVarInterceptor = apiClient.getRequestInterceptor();
- memberVarReadTimeout = apiClient.getReadTimeout();
- memberVarResponseInterceptor = apiClient.getResponseInterceptor();
- }
-
- protected ApiException getApiException(String operationId, HttpResponse response) throws IOException {
- String body = response.body() == null ? null : new String(response.body().readAllBytes());
- String message = formatExceptionMessage(operationId, response.statusCode(), body);
- return new ApiException(response.statusCode(), message, response.headers(), body);
- }
-
- private String formatExceptionMessage(String operationId, int statusCode, String body) {
- if (body == null || body.isEmpty()) {
- body = "[no body]";
- }
- return operationId + " call failed with: " + statusCode + " - " + body;
- }
-
- /**
- *
- *
- * @return InlineResponseDefault
- * @throws ApiException if fails to make API call
- */
- public InlineResponseDefault fooGet() throws ApiException {
- ApiResponse localVarResponse = fooGetWithHttpInfo();
- return localVarResponse.getData();
- }
-
- /**
- *
- *
- * @return ApiResponse<InlineResponseDefault>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse fooGetWithHttpInfo() throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = fooGetRequestBuilder();
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("fooGet", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder fooGetRequestBuilder() throws ApiException {
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/foo";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Accept", "application/json");
-
- localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
-}
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java
deleted file mode 100644
index 71f3084b35b2..000000000000
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java
+++ /dev/null
@@ -1,1377 +0,0 @@
-/*
- * OpenAPI Petstore
- * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
- *
- * The version of the OpenAPI document: 1.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package org.openapitools.client.api;
-
-import org.openapitools.client.ApiClient;
-import org.openapitools.client.ApiException;
-import org.openapitools.client.ApiResponse;
-import org.openapitools.client.Pair;
-
-import java.math.BigDecimal;
-import org.openapitools.client.model.Client;
-import java.io.File;
-import org.openapitools.client.model.FileSchemaTestClass;
-import org.openapitools.client.model.HealthCheckResult;
-import java.time.LocalDate;
-import java.time.OffsetDateTime;
-import org.openapitools.client.model.OuterComposite;
-import org.openapitools.client.model.OuterEnum;
-import org.openapitools.client.model.User;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.http.HttpClient;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-import java.time.Duration;
-import java.util.function.Consumer;
-
-import java.util.ArrayList;
-import java.util.StringJoiner;
-import java.util.List;
-import java.util.Map;
-
-@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
-public class FakeApi {
- private final HttpClient memberVarHttpClient;
- private final ObjectMapper memberVarObjectMapper;
- private final String memberVarBaseUri;
- private final Consumer memberVarInterceptor;
- private final Duration memberVarReadTimeout;
- private final Consumer> memberVarResponseInterceptor;
-
- public FakeApi() {
- this(new ApiClient());
- }
-
- public FakeApi(ApiClient apiClient) {
- memberVarHttpClient = apiClient.getHttpClient();
- memberVarObjectMapper = apiClient.getObjectMapper();
- memberVarBaseUri = apiClient.getBaseUri();
- memberVarInterceptor = apiClient.getRequestInterceptor();
- memberVarReadTimeout = apiClient.getReadTimeout();
- memberVarResponseInterceptor = apiClient.getResponseInterceptor();
- }
-
- protected ApiException getApiException(String operationId, HttpResponse response) throws IOException {
- String body = response.body() == null ? null : new String(response.body().readAllBytes());
- String message = formatExceptionMessage(operationId, response.statusCode(), body);
- return new ApiException(response.statusCode(), message, response.headers(), body);
- }
-
- private String formatExceptionMessage(String operationId, int statusCode, String body) {
- if (body == null || body.isEmpty()) {
- body = "[no body]";
- }
- return operationId + " call failed with: " + statusCode + " - " + body;
- }
-
- /**
- * Health check endpoint
- *
- * @return HealthCheckResult
- * @throws ApiException if fails to make API call
- */
- public HealthCheckResult fakeHealthGet() throws ApiException {
- ApiResponse localVarResponse = fakeHealthGetWithHttpInfo();
- return localVarResponse.getData();
- }
-
- /**
- * Health check endpoint
- *
- * @return ApiResponse<HealthCheckResult>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse fakeHealthGetWithHttpInfo() throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = fakeHealthGetRequestBuilder();
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("fakeHealthGet", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder fakeHealthGetRequestBuilder() throws ApiException {
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake/health";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Accept", "application/json");
-
- localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- *
- * 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(Boolean body) throws ApiException {
- ApiResponse localVarResponse = fakeOuterBooleanSerializeWithHttpInfo(body);
- return localVarResponse.getData();
- }
-
- /**
- *
- * Test serialization of outer boolean types
- * @param body Input boolean as post body (optional)
- * @return ApiResponse<Boolean>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = fakeOuterBooleanSerializeRequestBuilder(body);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("fakeOuterBooleanSerialize", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder fakeOuterBooleanSerializeRequestBuilder(Boolean body) throws ApiException {
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake/outer/boolean";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Content-Type", "application/json");
- localVarRequestBuilder.header("Accept", "application/json");
-
- try {
- byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
- localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
- } catch (IOException e) {
- throw new ApiException(e);
- }
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- *
- * 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(OuterComposite outerComposite) throws ApiException {
- ApiResponse localVarResponse = fakeOuterCompositeSerializeWithHttpInfo(outerComposite);
- return localVarResponse.getData();
- }
-
- /**
- *
- * Test serialization of object with outer number type
- * @param outerComposite Input composite as post body (optional)
- * @return ApiResponse<OuterComposite>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = fakeOuterCompositeSerializeRequestBuilder(outerComposite);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("fakeOuterCompositeSerialize", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterComposite outerComposite) throws ApiException {
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake/outer/composite";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Content-Type", "application/json");
- localVarRequestBuilder.header("Accept", "application/json");
-
- try {
- byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(outerComposite);
- localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
- } catch (IOException e) {
- throw new ApiException(e);
- }
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- *
- * Test serialization of outer number types
- * @param body Input number as post body (optional)
- * @return BigDecimal
- * @throws ApiException if fails to make API call
- */
- public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
- ApiResponse localVarResponse = fakeOuterNumberSerializeWithHttpInfo(body);
- return localVarResponse.getData();
- }
-
- /**
- *
- * Test serialization of outer number types
- * @param body Input number as post body (optional)
- * @return ApiResponse<BigDecimal>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = fakeOuterNumberSerializeRequestBuilder(body);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("fakeOuterNumberSerialize", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder fakeOuterNumberSerializeRequestBuilder(BigDecimal body) throws ApiException {
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake/outer/number";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Content-Type", "application/json");
- localVarRequestBuilder.header("Accept", "application/json");
-
- try {
- byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
- localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
- } catch (IOException e) {
- throw new ApiException(e);
- }
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- *
- * Test serialization of outer string types
- * @param body Input string as post body (optional)
- * @return String
- * @throws ApiException if fails to make API call
- */
- public String fakeOuterStringSerialize(String body) throws ApiException {
- ApiResponse localVarResponse = fakeOuterStringSerializeWithHttpInfo(body);
- return localVarResponse.getData();
- }
-
- /**
- *
- * Test serialization of outer string types
- * @param body Input string as post body (optional)
- * @return ApiResponse<String>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = fakeOuterStringSerializeRequestBuilder(body);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("fakeOuterStringSerialize", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder fakeOuterStringSerializeRequestBuilder(String body) throws ApiException {
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake/outer/string";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Content-Type", "application/json");
- localVarRequestBuilder.header("Accept", "application/json");
-
- try {
- byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body);
- localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
- } catch (IOException e) {
- throw new ApiException(e);
- }
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- * Array of Enums
- *
- * @return List<OuterEnum>
- * @throws ApiException if fails to make API call
- */
- public List getArrayOfEnums() throws ApiException {
- ApiResponse> localVarResponse = getArrayOfEnumsWithHttpInfo();
- return localVarResponse.getData();
- }
-
- /**
- * Array of Enums
- *
- * @return ApiResponse<List<OuterEnum>>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse> getArrayOfEnumsWithHttpInfo() throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = getArrayOfEnumsRequestBuilder();
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("getArrayOfEnums", localVarResponse);
- }
- return new ApiResponse>(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder getArrayOfEnumsRequestBuilder() throws ApiException {
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake/array-of-enums";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Accept", "application/json");
-
- localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- *
- * For this test, the body for this request much reference a schema named `File`.
- * @param fileSchemaTestClass (required)
- * @throws ApiException if fails to make API call
- */
- public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException {
- testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass);
- }
-
- /**
- *
- * For this test, the body for this request much reference a schema named `File`.
- * @param fileSchemaTestClass (required)
- * @return ApiResponse<Void>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = testBodyWithFileSchemaRequestBuilder(fileSchemaTestClass);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("testBodyWithFileSchema", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- null
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestClass fileSchemaTestClass) throws ApiException {
- // verify the required parameter 'fileSchemaTestClass' is set
- if (fileSchemaTestClass == null) {
- throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
- }
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake/body-with-file-schema";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Content-Type", "application/json");
- localVarRequestBuilder.header("Accept", "application/json");
-
- try {
- byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(fileSchemaTestClass);
- localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
- } catch (IOException e) {
- throw new ApiException(e);
- }
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- *
- *
- * @param query (required)
- * @param user (required)
- * @throws ApiException if fails to make API call
- */
- public void testBodyWithQueryParams(String query, User user) throws ApiException {
- testBodyWithQueryParamsWithHttpInfo(query, user);
- }
-
- /**
- *
- *
- * @param query (required)
- * @param user (required)
- * @return ApiResponse<Void>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User user) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = testBodyWithQueryParamsRequestBuilder(query, user);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("testBodyWithQueryParams", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- null
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder testBodyWithQueryParamsRequestBuilder(String query, User user) throws ApiException {
- // verify the required parameter 'query' is set
- if (query == null) {
- throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
- }
- // verify the required parameter 'user' is set
- if (user == null) {
- throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams");
- }
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake/body-with-query-params";
-
- List localVarQueryParams = new ArrayList<>();
- localVarQueryParams.addAll(ApiClient.parameterToPairs("query", query));
-
- if (!localVarQueryParams.isEmpty()) {
- StringJoiner queryJoiner = new StringJoiner("&");
- localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
- } else {
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
- }
-
- localVarRequestBuilder.header("Content-Type", "application/json");
- localVarRequestBuilder.header("Accept", "application/json");
-
- try {
- byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user);
- localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
- } catch (IOException e) {
- throw new ApiException(e);
- }
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- * To test \"client\" model
- * To test \"client\" model
- * @param client client model (required)
- * @return Client
- * @throws ApiException if fails to make API call
- */
- public Client testClientModel(Client client) throws ApiException {
- ApiResponse localVarResponse = testClientModelWithHttpInfo(client);
- return localVarResponse.getData();
- }
-
- /**
- * To test \"client\" model
- * To test \"client\" model
- * @param client client model (required)
- * @return ApiResponse<Client>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse testClientModelWithHttpInfo(Client client) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = testClientModelRequestBuilder(client);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("testClientModel", localVarResponse);
- }
- return new ApiResponse(
- localVarResponse.statusCode(),
- localVarResponse.headers().map(),
- memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})
- );
- } catch (IOException e) {
- throw new ApiException(e);
- }
- catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new ApiException(e);
- }
- }
-
- private HttpRequest.Builder testClientModelRequestBuilder(Client client) throws ApiException {
- // verify the required parameter 'client' is set
- if (client == null) {
- throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel");
- }
-
- HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
-
- String localVarPath = "/fake";
-
- localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
-
- localVarRequestBuilder.header("Content-Type", "application/json");
- localVarRequestBuilder.header("Accept", "application/json");
-
- try {
- byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(client);
- localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
- } catch (IOException e) {
- throw new ApiException(e);
- }
- if (memberVarReadTimeout != null) {
- localVarRequestBuilder.timeout(memberVarReadTimeout);
- }
- if (memberVarInterceptor != null) {
- memberVarInterceptor.accept(localVarRequestBuilder);
- }
- return localVarRequestBuilder;
- }
- /**
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- * @param number None (required)
- * @param _double None (required)
- * @param patternWithoutDelimiter None (required)
- * @param _byte None (required)
- * @param integer None (optional)
- * @param int32 None (optional)
- * @param int64 None (optional)
- * @param _float None (optional)
- * @param string None (optional)
- * @param binary None (optional)
- * @param date None (optional)
- * @param dateTime None (optional, default to OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault())))
- * @param password None (optional)
- * @param paramCallback None (optional)
- * @throws ApiException if fails to make API call
- */
- public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
- testEndpointParametersWithHttpInfo(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 假端點 偽のエンドポイント 가짜 엔드 포인트
- * @param number None (required)
- * @param _double None (required)
- * @param patternWithoutDelimiter None (required)
- * @param _byte None (required)
- * @param integer None (optional)
- * @param int32 None (optional)
- * @param int64 None (optional)
- * @param _float None (optional)
- * @param string None (optional)
- * @param binary None (optional)
- * @param date None (optional)
- * @param dateTime None (optional, default to OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault())))
- * @param password None (optional)
- * @param paramCallback None (optional)
- * @return ApiResponse<Void>
- * @throws ApiException if fails to make API call
- */
- public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
- HttpRequest.Builder localVarRequestBuilder = testEndpointParametersRequestBuilder(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
- try {
- HttpResponse localVarResponse = memberVarHttpClient.send(
- localVarRequestBuilder.build(),
- HttpResponse.BodyHandlers.ofInputStream());
- if (memberVarResponseInterceptor != null) {
- memberVarResponseInterceptor.accept(localVarResponse);
- }
- if (localVarResponse.statusCode()/ 100 != 2) {
- throw getApiException("testEndpointParameters", localVarResponse);
- }
- return new ApiResponse