diff --git a/.tool-versions b/.tool-versions
new file mode 100644
index 000000000000..0dc059dd6157
--- /dev/null
+++ b/.tool-versions
@@ -0,0 +1 @@
+ivm-java openjdk-21.0.8
diff --git a/bin/configs/java-restclient-springBoot4-jackson3-jspecify-optional-getters.yaml b/bin/configs/java-restclient-springBoot4-jackson3-jspecify-optional-getters.yaml
new file mode 100644
index 000000000000..04a04d3a71a7
--- /dev/null
+++ b/bin/configs/java-restclient-springBoot4-jackson3-jspecify-optional-getters.yaml
@@ -0,0 +1,18 @@
+generatorName: java
+outputDir: samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters
+library: restclient
+inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
+templateDir: modules/openapi-generator/src/main/resources/Java
+validateSpec: false
+additionalProperties:
+ artifactId: petstore-restclient-optional-getters
+ hideGenerationTimestamp: "true"
+ containerDefaultToNull: "true"
+ useSpringBoot4: true
+ useJackson3: true
+ openApiNullable: false
+ useJspecify: true
+ optionalGettersForNullableFieldsOnly: "true"
+typeMappings:
+ OffsetDateTime: java.time.Instant
+ BigDecimal: java.math.BigDecimal
diff --git a/bin/configs/java-resttemplate-springBoot4-jackson3-jspecify-optional-getters.yaml b/bin/configs/java-resttemplate-springBoot4-jackson3-jspecify-optional-getters.yaml
new file mode 100644
index 000000000000..cb50837c3b7e
--- /dev/null
+++ b/bin/configs/java-resttemplate-springBoot4-jackson3-jspecify-optional-getters.yaml
@@ -0,0 +1,19 @@
+generatorName: java
+outputDir: samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify-optional-getters
+library: resttemplate
+inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
+templateDir: modules/openapi-generator/src/main/resources/Java
+validateSpec: false
+additionalProperties:
+ artifactId: petstore-resttemplate-optional-getters
+ hideGenerationTimestamp: "true"
+ containerDefaultToNull: "true"
+ useJakartaEe: true
+ useSpringBoot4: true
+ useJackson3: true
+ openApiNullable: false
+ useJspecify: true
+ optionalGettersForNullableFieldsOnly: "true"
+typeMappings:
+ OffsetDateTime: java.time.Instant
+ BigDecimal: java.math.BigDecimal
diff --git a/bin/configs/java-webclient-springBoot4-jackson3-jspecify-optional-getters.yaml b/bin/configs/java-webclient-springBoot4-jackson3-jspecify-optional-getters.yaml
new file mode 100644
index 000000000000..b7fdae68869e
--- /dev/null
+++ b/bin/configs/java-webclient-springBoot4-jackson3-jspecify-optional-getters.yaml
@@ -0,0 +1,18 @@
+generatorName: java
+outputDir: samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify-optional-getters
+library: webclient
+inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
+templateDir: modules/openapi-generator/src/main/resources/Java
+validateSpec: false
+additionalProperties:
+ artifactId: petstore-webclient-optional-getters
+ hideGenerationTimestamp: "true"
+ containerDefaultToNull: "true"
+ useSpringBoot4: true
+ useJackson3: true
+ openApiNullable: false
+ useJspecify: true
+ optionalGettersForNullableFieldsOnly: "true"
+typeMappings:
+ OffsetDateTime: java.time.Instant
+ BigDecimal: java.math.BigDecimal
diff --git a/bin/configs/spring-boot-4-jspecify-optional-getters.yaml b/bin/configs/spring-boot-4-jspecify-optional-getters.yaml
new file mode 100644
index 000000000000..5e8b46e1c9f8
--- /dev/null
+++ b/bin/configs/spring-boot-4-jspecify-optional-getters.yaml
@@ -0,0 +1,22 @@
+generatorName: spring
+library: spring-boot
+outputDir: samples/openapi3/server/petstore/springboot-4-jspecify-optional-getters
+inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+validateSpec: false
+additionalProperties:
+ groupId: org.openapitools.openapi3
+ documentationProvider: springdoc
+ interfaceOnly: true
+ artifactId: springboot-optional-getters
+ snapshotVersion: "true"
+ useSpringBoot4: true
+ useJackson3: true
+ useBeanValidation: true
+ withXml: true
+ hideGenerationTimestamp: "true"
+ generateConstructorWithAllArgs: true
+ generateBuilders: true
+ openApiNullable: false
+ useJspecify: true
+ optionalGettersForNullableFieldsOnly: "true"
diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md
index d7009619ab26..f235da179c5a 100644
--- a/docs/generators/elixir.md
+++ b/docs/generators/elixir.md
@@ -24,7 +24,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response. With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enums are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false|
|invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null|
|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|HTTP library template (sub-template) to use|
**tesla**
Tesla >= 1.14 (https://github.com/elixir-tesla/tesla)
+ * The default implementation throws {@link RuntimeException}. To use custom exception
+ * types, implement this interface and pass the instance to
+ * {@link ApiClient#setExceptionProvider(ExceptionProvider)}.
+ *
+ */
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0-SNAPSHOT")
+public interface ExceptionProvider {
+
+ /** Returns an exception indicating that no Bearer authentication is configured. */
+ default RuntimeException bearerAuthException() {
+ return new RuntimeException("No Bearer authentication configured!");
+ }
+
+ /** Returns an exception indicating that no HTTP basic authentication is configured. */
+ default RuntimeException httpBasicAuthException() {
+ return new RuntimeException("No HTTP basic authentication configured!");
+ }
+
+ /** Returns an exception indicating that no API key authentication is configured. */
+ default RuntimeException apiKeyAuthException() {
+ return new RuntimeException("No API key authentication configured!");
+ }
+
+ /** Returns an exception indicating that no OAuth2 authentication is configured. */
+ default RuntimeException oAuth2Exception() {
+ return new RuntimeException("No OAuth2 authentication configured!");
+ }
+
+ /** Wraps a date/time parse exception. */
+ default RuntimeException dateTimeException(ParseException e) {
+ return new RuntimeException(e);
+ }
+
+ /** Wraps a Jackson serialization/deserialization exception. */
+ default RuntimeException jacksonException(Exception e) {
+ return new RuntimeException(e);
+ }
+
+ /**
+ * Returns an exception indicating that the requested authentication scheme is not configured.
+ *
+ * @param authName the name of the authentication scheme that could not be found
+ * @return a {@link RestClientException} describing the missing authentication
+ */
+ default RestClientException undefinedAuthenticationException(String authName) {
+ return new RestClientException("Authentication undefined: " + authName);
+ }
+
+ /** The default {@link ExceptionProvider} instance. */
+ ExceptionProvider DEFAULT = new ExceptionProvider() {};
+
+}
\ No newline at end of file
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/JavaTimeFormatter.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/JavaTimeFormatter.java
new file mode 100644
index 000000000000..a40073563104
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/JavaTimeFormatter.java
@@ -0,0 +1,68 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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}.
+ */
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.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/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/RFC3339DateFormat.java
new file mode 100644
index 000000000000..c8020e56ec5a
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/RFC3339DateFormat.java
@@ -0,0 +1,57 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.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/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/ServerConfiguration.java
new file mode 100644
index 000000000000..482a1895de98
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/ServerConfiguration.java
@@ -0,0 +1,72 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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.
+ */
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.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/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/ServerVariable.java
new file mode 100644
index 000000000000..6b88c89af501
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/ServerVariable.java
@@ -0,0 +1,37 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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.
+ */
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.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/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/StringUtil.java
new file mode 100644
index 000000000000..a7019e42a4d3
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/StringUtil.java
@@ -0,0 +1,83 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.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/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/api/DefaultApi.java
new file mode 100644
index 000000000000..5c44d1841571
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/api/DefaultApi.java
@@ -0,0 +1,271 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+
+import java.io.File;
+import org.openapitools.client.model.Foo;
+import org.jspecify.annotations.Nullable;
+import java.time.OffsetDateTime;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Arrays;
+import java.util.stream.Collectors;
+
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.core.ParameterizedTypeReference;
+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;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.RestClient.ResponseSpec;
+import org.springframework.web.client.RestClientResponseException;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
+public class DefaultApi {
+ private ApiClient apiClient;
+
+ public DefaultApi() {
+ this(new ApiClient());
+ }
+
+ public DefaultApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ *
+ *
+ *
200 - ok
+ * @param id The id parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fileIdGetRequestCreation(String id) throws RestClientResponseException {
+ Object postBody = null;
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new RestClientResponseException("Missing the required parameter 'id' when calling fileIdGet", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
+ }
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ pathParams.put("id", id);
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap<>();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
+ final MultiValueMap formParams = 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 localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/file/{id}", HttpMethod.GET, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
200 - ok
+ * @param id The id parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public void fileIdGet( String id) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ fileIdGetRequestCreation(id).body(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
200 - ok
+ * @param id The id parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity fileIdGetWithHttpInfo( String id) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return fileIdGetRequestCreation(id).toEntity(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
200 - ok
+ * @param id The id parameter
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fileIdGetWithResponseSpec(String id) throws RestClientResponseException {
+ return fileIdGetRequestCreation(id);
+ }
+
+ /**
+ *
+ *
+ *
0 - response
+ * @param dtParam The dtParam parameter
+ * @param dtQuery The dtQuery parameter
+ * @param dtCookie The dtCookie parameter
+ * @return Foo
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fooDtParamGetRequestCreation(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie) throws RestClientResponseException {
+ Object postBody = null;
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ pathParams.put("dtParam", dtParam);
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap<>();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
+ final MultiValueMap formParams = new LinkedMultiValueMap<>();
+
+ localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "dtQuery", dtQuery));
+
+ cookieParams.putAll(apiClient.parameterToMultiValueMap(null, "dtCookie", dtCookie));
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = { };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/foo/{dtParam}", HttpMethod.GET, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - response
+ * @param dtParam The dtParam parameter
+ * @param dtQuery The dtQuery parameter
+ * @param dtCookie The dtCookie parameter
+ * @return Foo
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Foo fooDtParamGet( java.time.Instant dtParam, java.time.Instant dtQuery, java.time.Instant dtCookie) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return fooDtParamGetRequestCreation(dtParam, dtQuery, dtCookie).body(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - response
+ * @param dtParam The dtParam parameter
+ * @param dtQuery The dtQuery parameter
+ * @param dtCookie The dtCookie parameter
+ * @return ResponseEntity<Foo>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity fooDtParamGetWithHttpInfo( java.time.Instant dtParam, java.time.Instant dtQuery, java.time.Instant dtCookie) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return fooDtParamGetRequestCreation(dtParam, dtQuery, dtCookie).toEntity(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - response
+ * @param dtParam The dtParam parameter
+ * @param dtQuery The dtQuery parameter
+ * @param dtCookie The dtCookie parameter
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec fooDtParamGetWithResponseSpec(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie) throws RestClientResponseException {
+ return fooDtParamGetRequestCreation(dtParam, dtQuery, dtCookie);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec uploadPostRequestCreation(@Nullable File _file) throws RestClientResponseException {
+ Object postBody = null;
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap<>();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
+ final MultiValueMap formParams = new LinkedMultiValueMap<>();
+
+ if (_file != null)
+ formParams.add("file", new FileSystemResource(_file));
+
+ final String[] localVarAccepts = { };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {
+ "multipart/form-data"
+ };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/upload", HttpMethod.POST, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public void uploadPost(@Nullable File _file) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ uploadPostRequestCreation(_file).body(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity uploadPostWithHttpInfo(@Nullable File _file) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return uploadPostRequestCreation(_file).toEntity(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
200 - ok
+ * @param id The id parameter
+ * @return FileContent
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec fileIdGetRequestCreation(String id) throws RestClientResponseException {
+ Object postBody = null;
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new RestClientResponseException("Missing the required parameter 'id' when calling fileIdGet", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
+ }
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ pathParams.put("id", id);
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap<>();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
+ final MultiValueMap formParams = new LinkedMultiValueMap<>();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = { };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/file/{id}", HttpMethod.GET, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
200 - ok
+ * @param id The id parameter
+ * @return FileContent
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public FileContent fileIdGet(String id) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return fileIdGetRequestCreation(id).body(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
200 - ok
+ * @param id The id parameter
+ * @return ResponseEntity<FileContent>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity fileIdGetWithHttpInfo(String id) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return fileIdGetRequestCreation(id).toEntity(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec uploadFilesPostRequestCreation(@Nullable List _file) throws RestClientResponseException {
+ Object postBody = null;
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap<>();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
+ final MultiValueMap formParams = new LinkedMultiValueMap<>();
+
+ if (_file != null)
+ formParams.addAll("file", _file.stream().map(FileSystemResource::new).collect(Collectors.toList()));
+
+ final String[] localVarAccepts = { };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {
+ "multipart/form-data"
+ };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/uploadFiles", HttpMethod.POST, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public void uploadFilesPost(@Nullable List _file) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ uploadFilesPostRequestCreation(_file).body(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity uploadFilesPostWithHttpInfo(@Nullable List _file) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return uploadFilesPostRequestCreation(_file).toEntity(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec uploadFilesPostWithResponseSpec(@Nullable List _file) throws RestClientResponseException {
+ return uploadFilesPostRequestCreation(_file);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec uploadPostRequestCreation(@Nullable File _file) throws RestClientResponseException {
+ Object postBody = null;
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap<>();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
+ final MultiValueMap formParams = new LinkedMultiValueMap<>();
+
+ if (_file != null)
+ formParams.add("file", new FileSystemResource(_file));
+
+ final String[] localVarAccepts = { };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {
+ "multipart/form-data"
+ };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/upload", HttpMethod.POST, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public void uploadPost(@Nullable File _file) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ uploadPostRequestCreation(_file).body(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity uploadPostWithHttpInfo(@Nullable File _file) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return uploadPostRequestCreation(_file).toEntity(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ *
0 - ok
+ * @param _file The _file parameter
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec uploadPostWithResponseSpec(@Nullable File _file) throws RestClientResponseException {
+ return uploadPostRequestCreation(_file);
+ }
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/api/package-info.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/api/package-info.java
new file mode 100644
index 000000000000..6d0d02339408
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/api/package-info.java
@@ -0,0 +1,2 @@
+@org.jspecify.annotations.NullMarked
+package org.openapitools.client.api;
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
new file mode 100644
index 000000000000..4ebede4c15db
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
@@ -0,0 +1,75 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.auth;
+
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.MultiValueMap;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.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/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/Authentication.java
new file mode 100644
index 000000000000..3ebf4d8ef554
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/Authentication.java
@@ -0,0 +1,29 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.auth;
+
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.MultiValueMap;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0-SNAPSHOT")
+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
+ */
+ void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams);
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
new file mode 100644
index 000000000000..bad9e94fb044
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
@@ -0,0 +1,51 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.auth;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.MultiValueMap;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.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/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
new file mode 100644
index 000000000000..b476d4955edf
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
@@ -0,0 +1,69 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.auth;
+
+import java.util.Optional;
+import java.util.function.Supplier;
+import org.springframework.http.HttpHeaders;
+import org.springframework.util.MultiValueMap;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.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/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/FileContent.java
new file mode 100644
index 000000000000..5441a7390e50
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/FileContent.java
@@ -0,0 +1,183 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.jspecify.annotations.Nullable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * FileContent
+ */
+@JsonPropertyOrder({
+ FileContent.JSON_PROPERTY_NAME,
+ FileContent.JSON_PROPERTY_SIZE,
+ FileContent.JSON_PROPERTY_VIRUS_SCAN
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0-SNAPSHOT")
+public class FileContent {
+ public static final String JSON_PROPERTY_NAME = "name";
+
+ private String name;
+
+ public static final String JSON_PROPERTY_SIZE = "size";
+
+ private @Nullable Integer size;
+
+ /**
+ * Gets or Sets virusScan
+ */
+ public enum VirusScanEnum {
+ CLEAN(String.valueOf("clean")),
+
+ DETECTED(String.valueOf("detected"));
+
+ private String value;
+
+ VirusScanEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static VirusScanEnum fromValue(String value) {
+ for (VirusScanEnum b : VirusScanEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ public static final String JSON_PROPERTY_VIRUS_SCAN = "virusScan";
+
+ private @Nullable VirusScanEnum virusScan;
+
+ public FileContent() {
+ }
+ /**
+ * Constructor with only readonly parameters
+ */
+ @JsonCreator
+ public FileContent(
+ @JsonProperty(JSON_PROPERTY_NAME) String name,
+ @JsonProperty(JSON_PROPERTY_SIZE) Integer size,
+ @JsonProperty(JSON_PROPERTY_VIRUS_SCAN) VirusScanEnum virusScan
+ ) {
+ this();
+ this.name = name;
+ this.size = size;
+ this.virusScan = virusScan;
+ }
+
+ /**
+ * Get name
+ * @return name
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_NAME, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getName() {
+ return name;
+ }
+
+
+
+ /**
+ * Get size
+ * @return size
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_SIZE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getSize() {
+ return java.util.Optional.ofNullable(size);
+ }
+
+
+
+ /**
+ * Get virusScan
+ * @return virusScan
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_VIRUS_SCAN, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getVirusScan() {
+ return java.util.Optional.ofNullable(virusScan);
+ }
+
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FileContent fileContent = (FileContent) o;
+ return Objects.equals(this.name, fileContent.name) &&
+ Objects.equals(this.size, fileContent.size) &&
+ Objects.equals(this.virusScan, fileContent.virusScan);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, size, virusScan);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FileContent {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" size: ").append(toIndentedString(size)).append("\n");
+ sb.append(" virusScan: ").append(toIndentedString(virusScan)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ return o == null ? "null" : o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/Foo.java
new file mode 100644
index 000000000000..1bb4de0f37bd
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/Foo.java
@@ -0,0 +1,517 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.File;
+import java.math.BigDecimal;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.jspecify.annotations.Nullable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Foo
+ */
+@JsonPropertyOrder({
+ Foo.JSON_PROPERTY_DT,
+ Foo.JSON_PROPERTY_NULLABLE_DT,
+ Foo.JSON_PROPERTY_BINARY,
+ Foo.JSON_PROPERTY_NULLABLE_BINARY,
+ Foo.JSON_PROPERTY_LIST_OF_DT,
+ Foo.JSON_PROPERTY_LIST_MIN_INTEMS,
+ Foo.JSON_PROPERTY_NULLABLE_LIST_MIN_INTEMS,
+ Foo.JSON_PROPERTY_REQUIRED_DT,
+ Foo.JSON_PROPERTY_NUMBER,
+ Foo.JSON_PROPERTY_NULLABLE_NUMBER,
+ Foo.JSON_PROPERTY_COLOR,
+ Foo.JSON_PROPERTY_REQUIRED_COLOR,
+ Foo.JSON_PROPERTY_NULLABLE_COLOR
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0-SNAPSHOT")
+public class Foo {
+ public static final String JSON_PROPERTY_DT = "dt";
+
+ private java.time.@Nullable Instant dt;
+
+ public static final String JSON_PROPERTY_NULLABLE_DT = "nullableDt";
+
+ private java.time.@Nullable Instant nullableDt;
+
+ public static final String JSON_PROPERTY_BINARY = "binary";
+
+ private @Nullable File binary;
+
+ public static final String JSON_PROPERTY_NULLABLE_BINARY = "nullableBinary";
+
+ private @Nullable File nullableBinary;
+
+ public static final String JSON_PROPERTY_LIST_OF_DT = "listOfDt";
+
+ private @Nullable List listOfDt;
+
+ public static final String JSON_PROPERTY_LIST_MIN_INTEMS = "listMinIntems";
+
+ private @Nullable List listMinIntems;
+
+ public static final String JSON_PROPERTY_NULLABLE_LIST_MIN_INTEMS = "nullableListMinIntems";
+
+ private @Nullable List nullableListMinIntems;
+
+ public static final String JSON_PROPERTY_REQUIRED_DT = "requiredDt";
+
+ private java.time.Instant requiredDt;
+
+ public static final String JSON_PROPERTY_NUMBER = "number";
+
+ private java.math.@Nullable BigDecimal number;
+
+ public static final String JSON_PROPERTY_NULLABLE_NUMBER = "nullableNumber";
+
+ private java.math.@Nullable BigDecimal nullableNumber;
+
+ public static final String JSON_PROPERTY_COLOR = "color";
+
+ private @Nullable String color = "red";
+
+ public static final String JSON_PROPERTY_REQUIRED_COLOR = "requiredColor";
+
+ private String requiredColor = "red";
+
+ public static final String JSON_PROPERTY_NULLABLE_COLOR = "nullableColor";
+
+ private @Nullable String nullableColor = "red";
+
+ public Foo() {
+ }
+
+ public Foo dt(java.time.@Nullable Instant dt) {
+
+ this.dt = dt;
+ return this;
+ }
+
+ /**
+ * Get dt
+ * @return dt
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_DT, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getDt() {
+ return java.util.Optional.ofNullable(dt);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_DT, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setDt(java.time.@Nullable Instant dt) {
+ this.dt = dt;
+ }
+
+ public Foo nullableDt(java.time.@Nullable Instant nullableDt) {
+
+ this.nullableDt = nullableDt;
+ return this;
+ }
+
+ /**
+ * Get nullableDt
+ * @return nullableDt
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_DT, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getNullableDt() {
+ return java.util.Optional.ofNullable(nullableDt);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_DT, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setNullableDt(java.time.@Nullable Instant nullableDt) {
+ this.nullableDt = nullableDt;
+ }
+
+ public Foo binary(@Nullable File binary) {
+
+ this.binary = binary;
+ return this;
+ }
+
+ /**
+ * Get binary
+ * @return binary
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_BINARY, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getBinary() {
+ return java.util.Optional.ofNullable(binary);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_BINARY, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setBinary(@Nullable File binary) {
+ this.binary = binary;
+ }
+
+ public Foo nullableBinary(@Nullable File nullableBinary) {
+
+ this.nullableBinary = nullableBinary;
+ return this;
+ }
+
+ /**
+ * Get nullableBinary
+ * @return nullableBinary
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_BINARY, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getNullableBinary() {
+ return java.util.Optional.ofNullable(nullableBinary);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_BINARY, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setNullableBinary(@Nullable File nullableBinary) {
+ this.nullableBinary = nullableBinary;
+ }
+
+ public Foo listOfDt(@Nullable List listOfDt) {
+
+ this.listOfDt = listOfDt;
+ return this;
+ }
+
+ public Foo addListOfDtItem(java.time.Instant listOfDtItem) {
+ if (this.listOfDt == null) {
+ this.listOfDt = new ArrayList<>();
+ }
+ this.listOfDt.add(listOfDtItem);
+ return this;
+ }
+
+ /**
+ * Get listOfDt
+ * @return listOfDt
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_LIST_OF_DT, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional> getListOfDt() {
+ return java.util.Optional.ofNullable(listOfDt);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_LIST_OF_DT, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setListOfDt(@Nullable List listOfDt) {
+ this.listOfDt = listOfDt;
+ }
+
+ public Foo listMinIntems(@Nullable List listMinIntems) {
+
+ this.listMinIntems = listMinIntems;
+ return this;
+ }
+
+ public Foo addListMinIntemsItem(java.time.Instant listMinIntemsItem) {
+ if (this.listMinIntems == null) {
+ this.listMinIntems = new ArrayList<>();
+ }
+ this.listMinIntems.add(listMinIntemsItem);
+ return this;
+ }
+
+ /**
+ * Get listMinIntems
+ * @return listMinIntems
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_LIST_MIN_INTEMS, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional> getListMinIntems() {
+ return java.util.Optional.ofNullable(listMinIntems);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_LIST_MIN_INTEMS, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setListMinIntems(@Nullable List listMinIntems) {
+ this.listMinIntems = listMinIntems;
+ }
+
+ public Foo nullableListMinIntems(@Nullable List nullableListMinIntems) {
+
+ this.nullableListMinIntems = nullableListMinIntems;
+ return this;
+ }
+
+ public Foo addNullableListMinIntemsItem(java.time.Instant nullableListMinIntemsItem) {
+ if (this.nullableListMinIntems == null) {
+ this.nullableListMinIntems = new ArrayList<>();
+ }
+ this.nullableListMinIntems.add(nullableListMinIntemsItem);
+ return this;
+ }
+
+ /**
+ * Get nullableListMinIntems
+ * @return nullableListMinIntems
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_LIST_MIN_INTEMS, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional> getNullableListMinIntems() {
+ return java.util.Optional.ofNullable(nullableListMinIntems);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_LIST_MIN_INTEMS, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setNullableListMinIntems(@Nullable List nullableListMinIntems) {
+ this.nullableListMinIntems = nullableListMinIntems;
+ }
+
+ public Foo requiredDt(java.time.Instant requiredDt) {
+
+ this.requiredDt = requiredDt;
+ return this;
+ }
+
+ /**
+ * Get requiredDt
+ * @return requiredDt
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_REQUIRED_DT, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public java.time.Instant getRequiredDt() {
+ return requiredDt;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_REQUIRED_DT, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setRequiredDt(java.time.Instant requiredDt) {
+ this.requiredDt = requiredDt;
+ }
+
+ public Foo number(java.math.@Nullable BigDecimal number) {
+
+ this.number = number;
+ return this;
+ }
+
+ /**
+ * Get number
+ * @return number
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_NUMBER, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getNumber() {
+ return java.util.Optional.ofNullable(number);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_NUMBER, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setNumber(java.math.@Nullable BigDecimal number) {
+ this.number = number;
+ }
+
+ public Foo nullableNumber(java.math.@Nullable BigDecimal nullableNumber) {
+
+ this.nullableNumber = nullableNumber;
+ return this;
+ }
+
+ /**
+ * Get nullableNumber
+ * @return nullableNumber
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_NUMBER, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getNullableNumber() {
+ return java.util.Optional.ofNullable(nullableNumber);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_NUMBER, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setNullableNumber(java.math.@Nullable BigDecimal nullableNumber) {
+ this.nullableNumber = nullableNumber;
+ }
+
+ public Foo color(@Nullable String color) {
+
+ this.color = color;
+ return this;
+ }
+
+ /**
+ * Get color
+ * @return color
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_COLOR, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getColor() {
+ return java.util.Optional.ofNullable(color);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_COLOR, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setColor(@Nullable String color) {
+ this.color = color;
+ }
+
+ public Foo requiredColor(String requiredColor) {
+
+ this.requiredColor = requiredColor;
+ return this;
+ }
+
+ /**
+ * Get requiredColor
+ * @return requiredColor
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_REQUIRED_COLOR, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getRequiredColor() {
+ return requiredColor;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_REQUIRED_COLOR, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setRequiredColor(String requiredColor) {
+ this.requiredColor = requiredColor;
+ }
+
+ public Foo nullableColor(@Nullable String nullableColor) {
+
+ this.nullableColor = nullableColor;
+ return this;
+ }
+
+ /**
+ * Get nullableColor
+ * @return nullableColor
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_COLOR, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public java.util.Optional getNullableColor() {
+ return java.util.Optional.ofNullable(nullableColor);
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_NULLABLE_COLOR, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setNullableColor(@Nullable String nullableColor) {
+ this.nullableColor = nullableColor;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Foo foo = (Foo) o;
+ return Objects.equals(this.dt, foo.dt) &&
+ Objects.equals(this.nullableDt, foo.nullableDt) &&
+ Objects.equals(this.binary, foo.binary) &&
+ Objects.equals(this.nullableBinary, foo.nullableBinary) &&
+ Objects.equals(this.listOfDt, foo.listOfDt) &&
+ Objects.equals(this.listMinIntems, foo.listMinIntems) &&
+ Objects.equals(this.nullableListMinIntems, foo.nullableListMinIntems) &&
+ Objects.equals(this.requiredDt, foo.requiredDt) &&
+ Objects.equals(this.number, foo.number) &&
+ Objects.equals(this.nullableNumber, foo.nullableNumber) &&
+ Objects.equals(this.color, foo.color) &&
+ Objects.equals(this.requiredColor, foo.requiredColor) &&
+ Objects.equals(this.nullableColor, foo.nullableColor);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(dt, nullableDt, binary, nullableBinary, listOfDt, listMinIntems, nullableListMinIntems, requiredDt, number, nullableNumber, color, requiredColor, nullableColor);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Foo {\n");
+ sb.append(" dt: ").append(toIndentedString(dt)).append("\n");
+ sb.append(" nullableDt: ").append(toIndentedString(nullableDt)).append("\n");
+ sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
+ sb.append(" nullableBinary: ").append(toIndentedString(nullableBinary)).append("\n");
+ sb.append(" listOfDt: ").append(toIndentedString(listOfDt)).append("\n");
+ sb.append(" listMinIntems: ").append(toIndentedString(listMinIntems)).append("\n");
+ sb.append(" nullableListMinIntems: ").append(toIndentedString(nullableListMinIntems)).append("\n");
+ sb.append(" requiredDt: ").append(toIndentedString(requiredDt)).append("\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" nullableNumber: ").append(toIndentedString(nullableNumber)).append("\n");
+ sb.append(" color: ").append(toIndentedString(color)).append("\n");
+ sb.append(" requiredColor: ").append(toIndentedString(requiredColor)).append("\n");
+ sb.append(" nullableColor: ").append(toIndentedString(nullableColor)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ return o == null ? "null" : o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/RequiredAndNullable.java
new file mode 100644
index 000000000000..460f6e1faa99
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/RequiredAndNullable.java
@@ -0,0 +1,243 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.jspecify.annotations.Nullable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * RequiredAndNullable
+ */
+@JsonPropertyOrder({
+ RequiredAndNullable.JSON_PROPERTY_STR,
+ RequiredAndNullable.JSON_PROPERTY_FILE,
+ RequiredAndNullable.JSON_PROPERTY_COLOR,
+ RequiredAndNullable.JSON_PROPERTY_ONLY_REQUIRED,
+ RequiredAndNullable.JSON_PROPERTY_LIST
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0-SNAPSHOT")
+public class RequiredAndNullable {
+ public static final String JSON_PROPERTY_STR = "str";
+
+ private @Nullable String str;
+
+ public static final String JSON_PROPERTY_FILE = "file";
+
+ private @Nullable File _file;
+
+ public static final String JSON_PROPERTY_COLOR = "color";
+
+ private @Nullable String color = "red";
+
+ public static final String JSON_PROPERTY_ONLY_REQUIRED = "onlyRequired";
+
+ private String onlyRequired;
+
+ public static final String JSON_PROPERTY_LIST = "list";
+
+ private @Nullable List _list;
+
+ public RequiredAndNullable() {
+ }
+
+ public RequiredAndNullable str(@Nullable String str) {
+
+ this.str = str;
+ return this;
+ }
+
+ /**
+ * Get str
+ * @return str
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_STR, required = false)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public @Nullable String getStr() {
+ return str;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_STR, required = false)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setStr(@Nullable String str) {
+ this.str = str;
+ }
+
+ public RequiredAndNullable _file(@Nullable File _file) {
+
+ this._file = _file;
+ return this;
+ }
+
+ /**
+ * Get _file
+ * @return _file
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_FILE, required = false)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public @Nullable File getFile() {
+ return _file;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FILE, required = false)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setFile(@Nullable File _file) {
+ this._file = _file;
+ }
+
+ public RequiredAndNullable color(@Nullable String color) {
+
+ this.color = color;
+ return this;
+ }
+
+ /**
+ * Get color
+ * @return color
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_COLOR, required = false)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public @Nullable String getColor() {
+ return color;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_COLOR, required = false)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setColor(@Nullable String color) {
+ this.color = color;
+ }
+
+ public RequiredAndNullable onlyRequired(String onlyRequired) {
+
+ this.onlyRequired = onlyRequired;
+ return this;
+ }
+
+ /**
+ * Get onlyRequired
+ * @return onlyRequired
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_ONLY_REQUIRED, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getOnlyRequired() {
+ return onlyRequired;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_ONLY_REQUIRED, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setOnlyRequired(String onlyRequired) {
+ this.onlyRequired = onlyRequired;
+ }
+
+ public RequiredAndNullable _list(@Nullable List _list) {
+
+ this._list = _list;
+ return this;
+ }
+
+ public RequiredAndNullable addListItem(String _listItem) {
+ if (this._list == null) {
+ this._list = new ArrayList<>();
+ }
+ this._list.add(_listItem);
+ return this;
+ }
+
+ /**
+ * Get _list
+ * @return _list
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_LIST, required = false)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public @Nullable List getList() {
+ return _list;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_LIST, required = false)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setList(@Nullable List _list) {
+ this._list = _list;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RequiredAndNullable requiredAndNullable = (RequiredAndNullable) o;
+ return Objects.equals(this.str, requiredAndNullable.str) &&
+ Objects.equals(this._file, requiredAndNullable._file) &&
+ Objects.equals(this.color, requiredAndNullable.color) &&
+ Objects.equals(this.onlyRequired, requiredAndNullable.onlyRequired) &&
+ Objects.equals(this._list, requiredAndNullable._list);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(str, _file, color, onlyRequired, _list);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RequiredAndNullable {\n");
+ sb.append(" str: ").append(toIndentedString(str)).append("\n");
+ sb.append(" _file: ").append(toIndentedString(_file)).append("\n");
+ sb.append(" color: ").append(toIndentedString(color)).append("\n");
+ sb.append(" onlyRequired: ").append(toIndentedString(onlyRequired)).append("\n");
+ sb.append(" _list: ").append(toIndentedString(_list)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ return o == null ? "null" : o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/package-info.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/package-info.java
new file mode 100644
index 000000000000..774ca336f509
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/model/package-info.java
@@ -0,0 +1,2 @@
+@org.jspecify.annotations.NullMarked
+package org.openapitools.client.model;
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/package-info.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/package-info.java
new file mode 100644
index 000000000000..9c547369c362
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/main/java/org/openapitools/client/package-info.java
@@ -0,0 +1,2 @@
+@org.jspecify.annotations.NullMarked
+package org.openapitools.client;
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/DefaultApiTest.java
new file mode 100644
index 000000000000..ba1b11e4c4f5
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/DefaultApiTest.java
@@ -0,0 +1,79 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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 java.io.File;
+import org.openapitools.client.model.Foo;
+import org.jspecify.annotations.Nullable;
+import java.time.OffsetDateTime;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * API tests for DefaultApi
+ */
+@Disabled
+public class DefaultApiTest {
+
+ private final DefaultApi api = new DefaultApi();
+
+
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void fileIdGetTest() {
+ String id = null;
+ api.fileIdGet(id);
+
+ // TODO: test validations
+ }
+
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void fooDtParamGetTest() {
+ java.time.Instant dtParam = null;
+ java.time.Instant dtQuery = null;
+ java.time.Instant dtCookie = null;
+ Foo response = api.fooDtParamGet(dtParam, dtQuery, dtCookie);
+
+ // TODO: test validations
+ }
+
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void uploadPostTest() {
+ File _file = null;
+ api.uploadPost(_file);
+
+ // TODO: test validations
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/FileApiTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/FileApiTest.java
new file mode 100644
index 000000000000..ce5d7c6c6123
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/FileApiTest.java
@@ -0,0 +1,48 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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.model.FileContent;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * API tests for FileApi
+ */
+@Disabled
+public class FileApiTest {
+
+ private final FileApi api = new FileApi();
+
+
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void fileIdGetTest() {
+ String id = null;
+ FileContent response = api.fileIdGet(id);
+
+ // TODO: test validations
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/FooApiTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/FooApiTest.java
new file mode 100644
index 000000000000..8fba1baf72f8
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/FooApiTest.java
@@ -0,0 +1,53 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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.model.Foo;
+import org.jspecify.annotations.Nullable;
+import java.time.OffsetDateTime;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * API tests for FooApi
+ */
+@Disabled
+public class FooApiTest {
+
+ private final FooApi api = new FooApi();
+
+
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void fooDtParamGetTest() {
+ java.time.Instant dtParam = null;
+ java.time.Instant dtQuery = null;
+ java.time.Instant dtCookie = null;
+ String color = null;
+ Foo response = api.fooDtParamGet(dtParam, dtQuery, dtCookie, color);
+
+ // TODO: test validations
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/RequiredAndNullableApiTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/RequiredAndNullableApiTest.java
new file mode 100644
index 000000000000..41e971ae1aa5
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/RequiredAndNullableApiTest.java
@@ -0,0 +1,48 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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.model.RequiredAndNullable;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * API tests for RequiredAndNullableApi
+ */
+@Disabled
+public class RequiredAndNullableApiTest {
+
+ private final RequiredAndNullableApi api = new RequiredAndNullableApi();
+
+
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void requiredAndNullablePostTest() {
+ RequiredAndNullable requiredAndNullable = null;
+ RequiredAndNullable response = api.requiredAndNullablePost(requiredAndNullable);
+
+ // TODO: test validations
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/UploadApiTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/UploadApiTest.java
new file mode 100644
index 000000000000..561ece97dae4
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/api/UploadApiTest.java
@@ -0,0 +1,62 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * 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 java.io.File;
+import org.jspecify.annotations.Nullable;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * API tests for UploadApi
+ */
+@Disabled
+public class UploadApiTest {
+
+ private final UploadApi api = new UploadApi();
+
+
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void uploadFilesPostTest() {
+ List _file = null;
+ api.uploadFilesPost(_file);
+
+ // TODO: test validations
+ }
+
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void uploadPostTest() {
+ File _file = null;
+ api.uploadPost(_file);
+
+ // TODO: test validations
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/FileContentTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/FileContentTest.java
new file mode 100644
index 000000000000..ef670ad23315
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/FileContentTest.java
@@ -0,0 +1,63 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.jspecify.annotations.Nullable;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for FileContent
+ */
+class FileContentTest {
+ private final FileContent model = new FileContent();
+
+ /**
+ * Model tests for FileContent
+ */
+ @Test
+ void testFileContent() {
+ // TODO: test FileContent
+ }
+
+ /**
+ * Test the property 'name'
+ */
+ @Test
+ void nameTest() {
+ // TODO: test name
+ }
+
+ /**
+ * Test the property 'size'
+ */
+ @Test
+ void sizeTest() {
+ // TODO: test size
+ }
+
+ /**
+ * Test the property 'virusScan'
+ */
+ @Test
+ void virusScanTest() {
+ // TODO: test virusScan
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/FooTest.java
new file mode 100644
index 000000000000..66ed819a0c83
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/FooTest.java
@@ -0,0 +1,93 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.File;
+import java.math.BigDecimal;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.jspecify.annotations.Nullable;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Foo
+ */
+class FooTest {
+ private final Foo model = new Foo();
+
+ /**
+ * Model tests for Foo
+ */
+ @Test
+ void testFoo() {
+ // TODO: test Foo
+ }
+
+ /**
+ * Test the property 'dt'
+ */
+ @Test
+ void dtTest() {
+ // TODO: test dt
+ }
+
+ /**
+ * Test the property 'binary'
+ */
+ @Test
+ void binaryTest() {
+ // TODO: test binary
+ }
+
+ /**
+ * Test the property 'listOfDt'
+ */
+ @Test
+ void listOfDtTest() {
+ // TODO: test listOfDt
+ }
+
+ /**
+ * Test the property 'listMinIntems'
+ */
+ @Test
+ void listMinIntemsTest() {
+ // TODO: test listMinIntems
+ }
+
+ /**
+ * Test the property 'requiredDt'
+ */
+ @Test
+ void requiredDtTest() {
+ // TODO: test requiredDt
+ }
+
+ /**
+ * Test the property 'number'
+ */
+ @Test
+ void numberTest() {
+ // TODO: test number
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.java
new file mode 100644
index 000000000000..d2d8f59cb506
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.java
@@ -0,0 +1,83 @@
+/*
+ * jspecify
+ * test fully qualified name and jspecify
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.jspecify.annotations.Nullable;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for RequiredAndNullable
+ */
+class RequiredAndNullableTest {
+ private final RequiredAndNullable model = new RequiredAndNullable();
+
+ /**
+ * Model tests for RequiredAndNullable
+ */
+ @Test
+ void testRequiredAndNullable() {
+ // TODO: test RequiredAndNullable
+ }
+
+ /**
+ * Test the property 'str'
+ */
+ @Test
+ void strTest() {
+ // TODO: test str
+ }
+
+ /**
+ * Test the property '_file'
+ */
+ @Test
+ void _fileTest() {
+ // TODO: test _file
+ }
+
+ /**
+ * Test the property 'color'
+ */
+ @Test
+ void colorTest() {
+ // TODO: test color
+ }
+
+ /**
+ * Test the property 'onlyRequired'
+ */
+ @Test
+ void onlyRequiredTest() {
+ // TODO: test onlyRequired
+ }
+
+ /**
+ * Test the property '_list'
+ */
+ @Test
+ void _listTest() {
+ // TODO: test _list
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java
index f0ae3425f47c..4bc86396d6b8 100644
--- a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java
+++ b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/EnumTest.java
@@ -347,7 +347,7 @@ public EnumTest outerEnum(@jakarta.annotation.Nullable OuterEnum outerEnum) {
@JsonIgnore
public OuterEnum getOuterEnum() {
- return outerEnum.orElse(null);
+ return outerEnum.orElse(null);
}
@JsonProperty(value = JSON_PROPERTY_OUTER_ENUM, required = false)
diff --git a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/HealthCheckResult.java
index 89d806a5a708..cff75872a2e7 100644
--- a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/HealthCheckResult.java
+++ b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/HealthCheckResult.java
@@ -60,7 +60,7 @@ public HealthCheckResult nullableMessage(@jakarta.annotation.Nullable String nul
@JsonIgnore
public String getNullableMessage() {
- return nullableMessage.orElse(null);
+ return nullableMessage.orElse(null);
}
@JsonProperty(value = JSON_PROPERTY_NULLABLE_MESSAGE, required = false)
diff --git a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/NullableClass.java
index d8a0120bd1bf..aca3a292e27d 100644
--- a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/NullableClass.java
+++ b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/NullableClass.java
@@ -126,7 +126,7 @@ public NullableClass integerProp(@jakarta.annotation.Nullable Integer integerPro
@JsonIgnore
public Integer getIntegerProp() {
- return integerProp.orElse(null);
+ return integerProp.orElse(null);
}
@JsonProperty(value = JSON_PROPERTY_INTEGER_PROP, required = false)
@@ -160,7 +160,7 @@ public NullableClass numberProp(@jakarta.annotation.Nullable BigDecimal numberPr
@JsonIgnore
public BigDecimal getNumberProp() {
- return numberProp.orElse(null);
+ return numberProp.orElse(null);
}
@JsonProperty(value = JSON_PROPERTY_NUMBER_PROP, required = false)
@@ -194,7 +194,7 @@ public NullableClass booleanProp(@jakarta.annotation.Nullable Boolean booleanPro
@JsonIgnore
public Boolean getBooleanProp() {
- return booleanProp.orElse(null);
+ return booleanProp.orElse(null);
}
@JsonProperty(value = JSON_PROPERTY_BOOLEAN_PROP, required = false)
@@ -228,7 +228,7 @@ public NullableClass stringProp(@jakarta.annotation.Nullable String stringProp)
@JsonIgnore
public String getStringProp() {
- return stringProp.orElse(null);
+ return stringProp.orElse(null);
}
@JsonProperty(value = JSON_PROPERTY_STRING_PROP, required = false)
@@ -262,7 +262,7 @@ public NullableClass dateProp(@jakarta.annotation.Nullable LocalDate dateProp) {
@JsonIgnore
public LocalDate getDateProp() {
- return dateProp.orElse(null);
+ return dateProp.orElse(null);
}
@JsonProperty(value = JSON_PROPERTY_DATE_PROP, required = false)
@@ -296,7 +296,7 @@ public NullableClass datetimeProp(@jakarta.annotation.Nullable OffsetDateTime da
@JsonIgnore
public OffsetDateTime getDatetimeProp() {
- return datetimeProp.orElse(null);
+ return datetimeProp.orElse(null);
}
@JsonProperty(value = JSON_PROPERTY_DATETIME_PROP, required = false)
@@ -342,7 +342,7 @@ public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) {
@JsonIgnore
public List