enumValues) {
+ this.description = description;
+ this.defaultValue = defaultValue;
+ this.enumValues = enumValues;
+ }
+}
diff --git a/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/api/UserApi.java
new file mode 100644
index 000000000000..6adecc783152
--- /dev/null
+++ b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/api/UserApi.java
@@ -0,0 +1,109 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.BaseApi;
+
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
+public class UserApi extends BaseApi {
+
+ public UserApi() {
+ super(new ApiClient());
+ }
+
+ public UserApi(ApiClient apiClient) {
+ super(apiClient);
+ }
+
+ /**
+ *
+ *
+ * 200 - OK
+ * @param username The name of the user (required)
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public void userGet(List<@Pattern(regexp = "^[a-zA-Z0-9]$")String> username) throws RestClientException {
+ userGetWithHttpInfo(username);
+ }
+
+ /**
+ *
+ *
+ *
200 - OK
+ * @param username The name of the user (required)
+ * @return ResponseEntity<Void>
+ * @throws RestClientException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity userGetWithHttpInfo(List<@Pattern(regexp = "^[a-zA-Z0-9]$")String> username) throws RestClientException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'username' is set
+ if (username == null) {
+ throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'username' when calling userGet");
+ }
+
+ // create path and map variables
+ final Map uriVariables = new HashMap();
+ uriVariables.put("username", apiClient.collectionPathParameterToString(ApiClient.CollectionFormat.valueOf("csv".toUpperCase()), username));
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarCookieParams = new LinkedMultiValueMap();
+ final MultiValueMap localVarFormParams = new LinkedMultiValueMap();
+
+ final String[] localVarAccepts = { };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = { };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI("/user", HttpMethod.GET, uriVariables, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
+ }
+
+ @Override
+ public ResponseEntity invokeAPI(String url, HttpMethod method, Object request, ParameterizedTypeReference returnType) throws RestClientException {
+ String localVarPath = url.replace(apiClient.getBasePath(), "");
+ Object localVarPostBody = request;
+
+ final Map uriVariables = new HashMap();
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarCookieParams = new LinkedMultiValueMap();
+ final MultiValueMap localVarFormParams = new LinkedMultiValueMap();
+
+ final String[] localVarAccepts = { };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = { };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ return apiClient.invokeAPI(localVarPath, method, uriVariables, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, returnType);
+ }
+}
diff --git a/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
new file mode 100644
index 000000000000..a73e2ba740c0
--- /dev/null
+++ b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
@@ -0,0 +1,62 @@
+package org.openapitools.client.auth;
+
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.MultiValueMap;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
+public class ApiKeyAuth implements Authentication {
+ private final String location;
+ private final String paramName;
+
+ private String apiKey;
+ private String apiKeyPrefix;
+
+ public ApiKeyAuth(String location, String paramName) {
+ this.location = location;
+ this.paramName = paramName;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getParamName() {
+ return paramName;
+ }
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
+
+ public String getApiKeyPrefix() {
+ return apiKeyPrefix;
+ }
+
+ public void setApiKeyPrefix(String apiKeyPrefix) {
+ this.apiKeyPrefix = apiKeyPrefix;
+ }
+
+ @Override
+ public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) {
+ if (apiKey == null) {
+ return;
+ }
+ String value;
+ if (apiKeyPrefix != null) {
+ value = apiKeyPrefix + " " + apiKey;
+ } else {
+ value = apiKey;
+ }
+ if (location.equals("query")) {
+ queryParams.add(paramName, value);
+ } else if (location.equals("header")) {
+ headerParams.add(paramName, value);
+ } else if (location.equals("cookie")) {
+ cookieParams.add(paramName, value);
+ }
+ }
+}
diff --git a/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/Authentication.java
new file mode 100644
index 000000000000..4f9a14ebd7c3
--- /dev/null
+++ b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/Authentication.java
@@ -0,0 +1,14 @@
+package org.openapitools.client.auth;
+
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.MultiValueMap;
+
+public interface Authentication {
+ /**
+ * Apply authentication settings to header and / or query parameters.
+ * @param queryParams The query parameters for the request
+ * @param headerParams The header parameters for the request
+ * @param cookieParams The cookie parameters for the request
+ */
+ public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams);
+}
diff --git a/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
new file mode 100644
index 000000000000..1619a9e0268b
--- /dev/null
+++ b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
@@ -0,0 +1,38 @@
+package org.openapitools.client.auth;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.MultiValueMap;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
+public class HttpBasicAuth implements Authentication {
+ private String username;
+ private String password;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ @Override
+ public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) {
+ if (username == null && password == null) {
+ return;
+ }
+ String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
+ headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8)));
+ }
+}
diff --git a/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
new file mode 100644
index 000000000000..f884d1a403f7
--- /dev/null
+++ b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
@@ -0,0 +1,56 @@
+package org.openapitools.client.auth;
+
+import java.util.Optional;
+import java.util.function.Supplier;
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.MultiValueMap;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
+public class HttpBearerAuth implements Authentication {
+ private final String scheme;
+ private Supplier tokenSupplier;
+
+ public HttpBearerAuth(String scheme) {
+ this.scheme = scheme;
+ }
+
+ /**
+ * Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @return The bearer token
+ */
+ public String getBearerToken() {
+ return tokenSupplier.get();
+ }
+
+ /**
+ * Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @param bearerToken The bearer token to send in the Authorization header
+ */
+ public void setBearerToken(String bearerToken) {
+ this.tokenSupplier = () -> bearerToken;
+ }
+
+ /**
+ * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header
+ */
+ public void setBearerToken(Supplier tokenSupplier) {
+ this.tokenSupplier = tokenSupplier;
+ }
+
+ @Override
+ public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) {
+ String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
+ if (bearerToken == null) {
+ return;
+ }
+ headerParams.add(HttpHeaders.AUTHORIZATION, (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
+ }
+
+ private static String upperCaseBearer(String scheme) {
+ return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
+ }
+}
diff --git a/samples/client/others/java/resttemplate-list-schema-validation/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/others/java/resttemplate-list-schema-validation/src/test/java/org/openapitools/client/api/UserApiTest.java
new file mode 100644
index 000000000000..3087a229dfa6
--- /dev/null
+++ b/samples/client/others/java/resttemplate-list-schema-validation/src/test/java/org/openapitools/client/api/UserApiTest.java
@@ -0,0 +1,56 @@
+/*
+ * issue-17485
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.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.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.springframework.web.client.RestClientException;
+
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import jakarta.validation.constraints.*;
+import jakarta.validation.Valid;
+
+/**
+ * API tests for UserApi
+ */
+@Disabled
+class UserApiTest {
+
+ private final UserApi api = new UserApi();
+
+
+ /**
+ *
+ *
+ *
+ *
+ * @throws RestClientException
+ * if the Api call fails
+ */
+ @Test
+ void userGetTest() {
+ List<@Pattern(regexp = "^[a-zA-Z0-9]$")String> username = null;
+
+ api.userGet(username);
+
+ // TODO: test validations
+ }
+
+}
diff --git a/samples/client/petstore/java/apache-httpclient/pom.xml b/samples/client/petstore/java/apache-httpclient/pom.xml
index c522d5af58c2..487bc0bba133 100644
--- a/samples/client/petstore/java/apache-httpclient/pom.xml
+++ b/samples/client/petstore/java/apache-httpclient/pom.xml
@@ -243,11 +243,11 @@
jackson-jaxrs-json-provider
${jackson-version}