>of(new HashMap<>());
}
try {
@@ -468,7 +468,7 @@ public NullableClass objectAndItemsNullableProp(@javax.annotation.Nullable Map>of(new HashMap<>());
}
try {
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/.openapi-generator/FILES b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/.openapi-generator/FILES
index 905482ebbf2c..a9762735bc0b 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/.openapi-generator/FILES
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/.openapi-generator/FILES
@@ -6,8 +6,11 @@ api/openapi.yaml
build.gradle
build.sbt
docs/FileApi.md
+docs/FileContent.md
docs/Foo.md
docs/FooApi.md
+docs/RequiredAndNullable.md
+docs/RequiredAndNullableApi.md
docs/UploadApi.md
git_push.sh
gradle.properties
@@ -27,12 +30,15 @@ src/main/java/org/openapitools/client/ServerVariable.java
src/main/java/org/openapitools/client/StringUtil.java
src/main/java/org/openapitools/client/api/FileApi.java
src/main/java/org/openapitools/client/api/FooApi.java
+src/main/java/org/openapitools/client/api/RequiredAndNullableApi.java
src/main/java/org/openapitools/client/api/UploadApi.java
src/main/java/org/openapitools/client/api/package-info.java
src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
src/main/java/org/openapitools/client/auth/Authentication.java
src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
+src/main/java/org/openapitools/client/model/FileContent.java
src/main/java/org/openapitools/client/model/Foo.java
+src/main/java/org/openapitools/client/model/RequiredAndNullable.java
src/main/java/org/openapitools/client/model/package-info.java
src/main/java/org/openapitools/client/package-info.java
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/README.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/README.md
index 4d406688dd86..c8dcc331bcce 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/README.md
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/README.md
@@ -95,7 +95,8 @@ public class FileApiExample {
FileApi apiInstance = new FileApi(defaultClient);
String id = "id_example"; // String |
try {
- apiInstance.fileIdGet(id);
+ FileContent result = apiInstance.fileIdGet(id);
+ System.out.println(result);
} catch (HttpStatusCodeException e) {
System.err.println("Exception when calling FileApi#fileIdGet");
System.err.println("Status code: " + e.getStatusCode().value());
@@ -116,13 +117,16 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FileApi* | [**fileIdGet**](docs/FileApi.md#fileIdGet) | **GET** /file/{id} |
*FooApi* | [**fooDtParamGet**](docs/FooApi.md#fooDtParamGet) | **GET** /foo/{dtParam} |
+*RequiredAndNullableApi* | [**requiredAndNullablePost**](docs/RequiredAndNullableApi.md#requiredAndNullablePost) | **POST** /requiredAndNullable |
*UploadApi* | [**uploadFilesPost**](docs/UploadApi.md#uploadFilesPost) | **POST** /uploadFiles |
*UploadApi* | [**uploadPost**](docs/UploadApi.md#uploadPost) | **POST** /upload |
## Documentation for Models
+ - [FileContent](docs/FileContent.md)
- [Foo](docs/Foo.md)
+ - [RequiredAndNullable](docs/RequiredAndNullable.md)
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/api/openapi.yaml b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/api/openapi.yaml
index b5f967c8460e..15c1f4176a50 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/api/openapi.yaml
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/api/openapi.yaml
@@ -6,6 +6,8 @@ info:
servers:
- url: /
tags:
+- description: requiredAndNullable
+ name: requiredAndNullable
- description: foo
name: foo
- description: upload
@@ -59,6 +61,27 @@ paths:
- foo
x-accepts:
- application/json
+ /requiredAndNullable:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RequiredAndNullable"
+ description: bodyWithRequiredAndNullableAttributes
+ required: true
+ responses:
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RequiredAndNullable"
+ description: response
+ tags:
+ - requiredAndNullable
+ x-content-type: application/json
+ x-accepts:
+ - application/json
/upload:
post:
requestBody:
@@ -103,6 +126,10 @@ paths:
style: simple
responses:
"200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/FileContent"
description: ok
tags:
- file
@@ -185,6 +212,62 @@ components:
required:
- requiredColor
- requiredDt
+ RequiredAndNullable:
+ example:
+ str: str
+ file: ""
+ color: red
+ onlyRequired: onlyRequired
+ list:
+ - list
+ - list
+ properties:
+ str:
+ nullable: true
+ type: string
+ file:
+ format: binary
+ nullable: true
+ type: string
+ color:
+ default: red
+ nullable: true
+ type: string
+ onlyRequired:
+ type: string
+ list:
+ items:
+ type: string
+ nullable: true
+ type: array
+ required:
+ - color
+ - file
+ - list
+ - onlyRequired
+ - str
+ type: object
+ FileContent:
+ example:
+ name: name
+ size: 0
+ virusScan: clean
+ properties:
+ name:
+ readOnly: true
+ type: string
+ size:
+ readOnly: true
+ type: integer
+ virusScan:
+ enum:
+ - clean
+ - detected
+ readOnly: true
+ type: string
+ required:
+ - name
+ type: object
_upload_post_request:
properties:
file:
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/FileApi.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/FileApi.md
index 4e6607ae5a71..59683371bc55 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/FileApi.md
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/FileApi.md
@@ -10,7 +10,7 @@ All URIs are relative to *http://localhost*
## fileIdGet
-> fileIdGet(id)
+> FileContent fileIdGet(id)
@@ -32,7 +32,8 @@ public class Example {
FileApi apiInstance = new FileApi(defaultClient);
String id = "id_example"; // String |
try {
- apiInstance.fileIdGet(id);
+ FileContent result = apiInstance.fileIdGet(id);
+ System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FileApi#fileIdGet");
System.err.println("Status code: " + e.getCode());
@@ -53,7 +54,7 @@ public class Example {
### Return type
-null (empty response body)
+[**FileContent**](FileContent.md)
### Authorization
@@ -62,7 +63,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
-- **Accept**: Not defined
+- **Accept**: application/json
### HTTP response details
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/FileContent.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/FileContent.md
new file mode 100644
index 000000000000..5b6654a0bf18
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/FileContent.md
@@ -0,0 +1,24 @@
+
+
+# FileContent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**name** | **String** | | [readonly] |
+|**size** | **Integer** | | [optional] [readonly] |
+|**virusScan** | [**VirusScanEnum**](#VirusScanEnum) | | [optional] [readonly] |
+
+
+
+## Enum: VirusScanEnum
+
+| Name | Value |
+|---- | -----|
+| CLEAN | "clean" |
+| DETECTED | "detected" |
+
+
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/RequiredAndNullable.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/RequiredAndNullable.md
new file mode 100644
index 000000000000..ff4ade0f226d
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/RequiredAndNullable.md
@@ -0,0 +1,17 @@
+
+
+# RequiredAndNullable
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**str** | **String** | | |
+|**_file** | **File** | | |
+|**color** | **String** | | |
+|**onlyRequired** | **String** | | |
+|**_list** | **List<String>** | | |
+
+
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/RequiredAndNullableApi.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/RequiredAndNullableApi.md
new file mode 100644
index 000000000000..ada434bf0b9e
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/docs/RequiredAndNullableApi.md
@@ -0,0 +1,73 @@
+# RequiredAndNullableApi
+
+All URIs are relative to *http://localhost*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**requiredAndNullablePost**](RequiredAndNullableApi.md#requiredAndNullablePost) | **POST** /requiredAndNullable | |
+
+
+
+## requiredAndNullablePost
+
+> RequiredAndNullable requiredAndNullablePost(requiredAndNullable)
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.RequiredAndNullableApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost");
+
+ RequiredAndNullableApi apiInstance = new RequiredAndNullableApi(defaultClient);
+ RequiredAndNullable requiredAndNullable = new RequiredAndNullable(); // RequiredAndNullable | bodyWithRequiredAndNullableAttributes
+ try {
+ RequiredAndNullable result = apiInstance.requiredAndNullablePost(requiredAndNullable);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RequiredAndNullableApi#requiredAndNullablePost");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **requiredAndNullable** | [**RequiredAndNullable**](RequiredAndNullable.md)| bodyWithRequiredAndNullableAttributes | |
+
+### Return type
+
+[**RequiredAndNullable**](RequiredAndNullable.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | response | - |
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/api/FileApi.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/api/FileApi.java
index 4f1bf741d207..a391a80e7577 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/api/FileApi.java
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/api/FileApi.java
@@ -2,6 +2,7 @@
import org.openapitools.client.ApiClient;
+import org.openapitools.client.model.FileContent;
import java.util.HashMap;
import java.util.List;
@@ -48,6 +49,7 @@ public void setApiClient(ApiClient apiClient) {
*
* 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 {
@@ -66,14 +68,16 @@ private ResponseSpec fileIdGetRequestCreation(String id) throws RestClientRespon
final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap formParams = new LinkedMultiValueMap<>();
- final String[] localVarAccepts = { };
+ 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<>() {};
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/file/{id}", HttpMethod.GET, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
@@ -82,11 +86,12 @@ private ResponseSpec fileIdGetRequestCreation(String id) throws RestClientRespon
*
* 200 - ok
* @param id The id parameter
+ * @return FileContent
* @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);
+ public FileContent fileIdGet(String id) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return fileIdGetRequestCreation(id).body(localVarReturnType);
}
/**
@@ -94,10 +99,11 @@ public void fileIdGet(String id) throws RestClientResponseException {
*
* 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<>() {};
+ public ResponseEntity fileIdGetWithHttpInfo(String id) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
return fileIdGetRequestCreation(id).toEntity(localVarReturnType);
}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/api/RequiredAndNullableApi.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/api/RequiredAndNullableApi.java
new file mode 100644
index 000000000000..cc0e7c9ca9fa
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/api/RequiredAndNullableApi.java
@@ -0,0 +1,121 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+
+import org.openapitools.client.model.RequiredAndNullable;
+
+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 RequiredAndNullableApi {
+ private ApiClient apiClient;
+
+ public RequiredAndNullableApi() {
+ this(new ApiClient());
+ }
+
+ public RequiredAndNullableApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @param requiredAndNullable bodyWithRequiredAndNullableAttributes
+ * @return RequiredAndNullable
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec requiredAndNullablePostRequestCreation(RequiredAndNullable requiredAndNullable) throws RestClientResponseException {
+ Object postBody = requiredAndNullable;
+ // verify the required parameter 'requiredAndNullable' is set
+ if (requiredAndNullable == null) {
+ throw new RestClientResponseException("Missing the required parameter 'requiredAndNullable' when calling requiredAndNullablePost", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, 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<>();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/requiredAndNullable", HttpMethod.POST, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @param requiredAndNullable bodyWithRequiredAndNullableAttributes
+ * @return RequiredAndNullable
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public RequiredAndNullable requiredAndNullablePost(RequiredAndNullable requiredAndNullable) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return requiredAndNullablePostRequestCreation(requiredAndNullable).body(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @param requiredAndNullable bodyWithRequiredAndNullableAttributes
+ * @return ResponseEntity<RequiredAndNullable>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity requiredAndNullablePostWithHttpInfo(RequiredAndNullable requiredAndNullable) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return requiredAndNullablePostRequestCreation(requiredAndNullable).toEntity(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @param requiredAndNullable bodyWithRequiredAndNullableAttributes
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec requiredAndNullablePostWithResponseSpec(RequiredAndNullable requiredAndNullable) throws RestClientResponseException {
+ return requiredAndNullablePostRequestCreation(requiredAndNullable);
+ }
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java
new file mode 100644
index 000000000000..b0f00682525b
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java
@@ -0,0 +1,247 @@
+/*
+ * 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.25.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 and all 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 @Nullable Integer getSize() {
+ return size;
+ }
+
+
+
+ /**
+ * Get virusScan
+ * @return virusScan
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_VIRUS_SCAN, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public @Nullable VirusScanEnum getVirusScan() {
+ return 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 ");
+ }
+
+ public static class Builder {
+
+ private FileContent instance;
+
+ public Builder() {
+ this(new FileContent());
+ }
+
+ protected Builder(FileContent instance) {
+ this.instance = instance;
+ }
+
+ public FileContent.Builder name(String name) {
+ this.instance.name = name;
+ return this;
+ }
+ public FileContent.Builder size(@Nullable Integer size) {
+ this.instance.size = size;
+ return this;
+ }
+ public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) {
+ this.instance.virusScan = virusScan;
+ return this;
+ }
+
+
+ /**
+ * returns a built FileContent instance.
+ *
+ * The builder is not reusable.
+ */
+ public FileContent build() {
+ try {
+ return this.instance;
+ } finally {
+ // ensure that this.instance is not reused
+ this.instance = null;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return getClass() + "=(" + instance + ")";
+ }
+ }
+
+ /**
+ * Create a builder with no initialized field.
+ */
+ public static FileContent.Builder builder() {
+ return new FileContent.Builder();
+ }
+
+ /**
+ * Create a builder with a shallow copy of this instance.
+ */
+ public FileContent.Builder toBuilder() {
+ return new FileContent.Builder()
+ .name(getName())
+ .size(getSize())
+ .virusScan(getVirusScan());
+ }
+
+
+}
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java
index 3397bcbf9b49..e5cc9c951158 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java
@@ -317,7 +317,7 @@ public Foo nullableListMinIntems(@Nullable List nullableListM
}
public Foo addNullableListMinIntemsItem(java.time.Instant nullableListMinIntemsItem) {
- if (this.nullableListMinIntems == null || !this.nullableListMinIntems.isPresent()) {
+ if (this.nullableListMinIntems == null || !this.nullableListMinIntems.isPresent() || this.nullableListMinIntems.get() == null) {
this.nullableListMinIntems = JsonNullable.>of(new ArrayList<>());
}
try {
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java
new file mode 100644
index 000000000000..55653e9e6161
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java
@@ -0,0 +1,328 @@
+/*
+ * 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.25.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() {
+ }
+
+ /**
+ * Constructor with all args parameters
+ */
+ public RequiredAndNullable(@JsonProperty(JSON_PROPERTY_STR) @Nullable String str, @JsonProperty(JSON_PROPERTY_FILE) @Nullable File _file, @JsonProperty(JSON_PROPERTY_COLOR) @Nullable String color, @JsonProperty(JSON_PROPERTY_ONLY_REQUIRED) String onlyRequired, @JsonProperty(JSON_PROPERTY_LIST) @Nullable List _list) {
+ this.str = str;
+ this._file = _file;
+ this.color = color;
+ this.onlyRequired = onlyRequired;
+ this._list = _list;
+ }
+
+ 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 ");
+ }
+
+ public static class Builder {
+
+ private RequiredAndNullable instance;
+
+ public Builder() {
+ this(new RequiredAndNullable());
+ }
+
+ protected Builder(RequiredAndNullable instance) {
+ this.instance = instance;
+ }
+
+ public RequiredAndNullable.Builder str(@Nullable String str) {
+ this.instance.str = str;
+ return this;
+ }
+ public RequiredAndNullable.Builder _file(@Nullable File _file) {
+ this.instance._file = _file;
+ return this;
+ }
+ public RequiredAndNullable.Builder color(@Nullable String color) {
+ this.instance.color = color;
+ return this;
+ }
+ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) {
+ this.instance.onlyRequired = onlyRequired;
+ return this;
+ }
+ public RequiredAndNullable.Builder _list(@Nullable List _list) {
+ this.instance._list = _list;
+ return this;
+ }
+
+
+ /**
+ * returns a built RequiredAndNullable instance.
+ *
+ * The builder is not reusable.
+ */
+ public RequiredAndNullable build() {
+ try {
+ return this.instance;
+ } finally {
+ // ensure that this.instance is not reused
+ this.instance = null;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return getClass() + "=(" + instance + ")";
+ }
+ }
+
+ /**
+ * Create a builder with no initialized field.
+ */
+ public static RequiredAndNullable.Builder builder() {
+ return new RequiredAndNullable.Builder();
+ }
+
+ /**
+ * Create a builder with a shallow copy of this instance.
+ */
+ public RequiredAndNullable.Builder toBuilder() {
+ return new RequiredAndNullable.Builder()
+ .str(getStr())
+ ._file(getFile())
+ .color(getColor())
+ .onlyRequired(getOnlyRequired())
+ ._list(getList());
+ }
+
+
+}
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/test/java/org/openapitools/client/api/RequiredAndNullableApiTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/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-openapiNullable/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-openapiNullable/src/test/java/org/openapitools/client/model/FileContentTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/test/java/org/openapitools/client/model/FileContentTest.java
new file mode 100644
index 000000000000..bc686732b1ca
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/test/java/org/openapitools/client/model/FileContentTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.java
new file mode 100644
index 000000000000..3d3388460faf
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.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.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 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
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/.openapi-generator/FILES b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/.openapi-generator/FILES
index 905482ebbf2c..a9762735bc0b 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/.openapi-generator/FILES
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/.openapi-generator/FILES
@@ -6,8 +6,11 @@ api/openapi.yaml
build.gradle
build.sbt
docs/FileApi.md
+docs/FileContent.md
docs/Foo.md
docs/FooApi.md
+docs/RequiredAndNullable.md
+docs/RequiredAndNullableApi.md
docs/UploadApi.md
git_push.sh
gradle.properties
@@ -27,12 +30,15 @@ src/main/java/org/openapitools/client/ServerVariable.java
src/main/java/org/openapitools/client/StringUtil.java
src/main/java/org/openapitools/client/api/FileApi.java
src/main/java/org/openapitools/client/api/FooApi.java
+src/main/java/org/openapitools/client/api/RequiredAndNullableApi.java
src/main/java/org/openapitools/client/api/UploadApi.java
src/main/java/org/openapitools/client/api/package-info.java
src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
src/main/java/org/openapitools/client/auth/Authentication.java
src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
+src/main/java/org/openapitools/client/model/FileContent.java
src/main/java/org/openapitools/client/model/Foo.java
+src/main/java/org/openapitools/client/model/RequiredAndNullable.java
src/main/java/org/openapitools/client/model/package-info.java
src/main/java/org/openapitools/client/package-info.java
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/README.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/README.md
index 4d406688dd86..c8dcc331bcce 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/README.md
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/README.md
@@ -95,7 +95,8 @@ public class FileApiExample {
FileApi apiInstance = new FileApi(defaultClient);
String id = "id_example"; // String |
try {
- apiInstance.fileIdGet(id);
+ FileContent result = apiInstance.fileIdGet(id);
+ System.out.println(result);
} catch (HttpStatusCodeException e) {
System.err.println("Exception when calling FileApi#fileIdGet");
System.err.println("Status code: " + e.getStatusCode().value());
@@ -116,13 +117,16 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FileApi* | [**fileIdGet**](docs/FileApi.md#fileIdGet) | **GET** /file/{id} |
*FooApi* | [**fooDtParamGet**](docs/FooApi.md#fooDtParamGet) | **GET** /foo/{dtParam} |
+*RequiredAndNullableApi* | [**requiredAndNullablePost**](docs/RequiredAndNullableApi.md#requiredAndNullablePost) | **POST** /requiredAndNullable |
*UploadApi* | [**uploadFilesPost**](docs/UploadApi.md#uploadFilesPost) | **POST** /uploadFiles |
*UploadApi* | [**uploadPost**](docs/UploadApi.md#uploadPost) | **POST** /upload |
## Documentation for Models
+ - [FileContent](docs/FileContent.md)
- [Foo](docs/Foo.md)
+ - [RequiredAndNullable](docs/RequiredAndNullable.md)
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/api/openapi.yaml b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/api/openapi.yaml
index b5f967c8460e..15c1f4176a50 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/api/openapi.yaml
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/api/openapi.yaml
@@ -6,6 +6,8 @@ info:
servers:
- url: /
tags:
+- description: requiredAndNullable
+ name: requiredAndNullable
- description: foo
name: foo
- description: upload
@@ -59,6 +61,27 @@ paths:
- foo
x-accepts:
- application/json
+ /requiredAndNullable:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RequiredAndNullable"
+ description: bodyWithRequiredAndNullableAttributes
+ required: true
+ responses:
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RequiredAndNullable"
+ description: response
+ tags:
+ - requiredAndNullable
+ x-content-type: application/json
+ x-accepts:
+ - application/json
/upload:
post:
requestBody:
@@ -103,6 +126,10 @@ paths:
style: simple
responses:
"200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/FileContent"
description: ok
tags:
- file
@@ -185,6 +212,62 @@ components:
required:
- requiredColor
- requiredDt
+ RequiredAndNullable:
+ example:
+ str: str
+ file: ""
+ color: red
+ onlyRequired: onlyRequired
+ list:
+ - list
+ - list
+ properties:
+ str:
+ nullable: true
+ type: string
+ file:
+ format: binary
+ nullable: true
+ type: string
+ color:
+ default: red
+ nullable: true
+ type: string
+ onlyRequired:
+ type: string
+ list:
+ items:
+ type: string
+ nullable: true
+ type: array
+ required:
+ - color
+ - file
+ - list
+ - onlyRequired
+ - str
+ type: object
+ FileContent:
+ example:
+ name: name
+ size: 0
+ virusScan: clean
+ properties:
+ name:
+ readOnly: true
+ type: string
+ size:
+ readOnly: true
+ type: integer
+ virusScan:
+ enum:
+ - clean
+ - detected
+ readOnly: true
+ type: string
+ required:
+ - name
+ type: object
_upload_post_request:
properties:
file:
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/FileApi.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/FileApi.md
index 4e6607ae5a71..59683371bc55 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/FileApi.md
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/FileApi.md
@@ -10,7 +10,7 @@ All URIs are relative to *http://localhost*
## fileIdGet
-> fileIdGet(id)
+> FileContent fileIdGet(id)
@@ -32,7 +32,8 @@ public class Example {
FileApi apiInstance = new FileApi(defaultClient);
String id = "id_example"; // String |
try {
- apiInstance.fileIdGet(id);
+ FileContent result = apiInstance.fileIdGet(id);
+ System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FileApi#fileIdGet");
System.err.println("Status code: " + e.getCode());
@@ -53,7 +54,7 @@ public class Example {
### Return type
-null (empty response body)
+[**FileContent**](FileContent.md)
### Authorization
@@ -62,7 +63,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
-- **Accept**: Not defined
+- **Accept**: application/json
### HTTP response details
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/FileContent.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/FileContent.md
new file mode 100644
index 000000000000..5b6654a0bf18
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/FileContent.md
@@ -0,0 +1,24 @@
+
+
+# FileContent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**name** | **String** | | [readonly] |
+|**size** | **Integer** | | [optional] [readonly] |
+|**virusScan** | [**VirusScanEnum**](#VirusScanEnum) | | [optional] [readonly] |
+
+
+
+## Enum: VirusScanEnum
+
+| Name | Value |
+|---- | -----|
+| CLEAN | "clean" |
+| DETECTED | "detected" |
+
+
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/RequiredAndNullable.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/RequiredAndNullable.md
new file mode 100644
index 000000000000..ff4ade0f226d
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/RequiredAndNullable.md
@@ -0,0 +1,17 @@
+
+
+# RequiredAndNullable
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**str** | **String** | | |
+|**_file** | **File** | | |
+|**color** | **String** | | |
+|**onlyRequired** | **String** | | |
+|**_list** | **List<String>** | | |
+
+
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/RequiredAndNullableApi.md b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/RequiredAndNullableApi.md
new file mode 100644
index 000000000000..ada434bf0b9e
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/docs/RequiredAndNullableApi.md
@@ -0,0 +1,73 @@
+# RequiredAndNullableApi
+
+All URIs are relative to *http://localhost*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**requiredAndNullablePost**](RequiredAndNullableApi.md#requiredAndNullablePost) | **POST** /requiredAndNullable | |
+
+
+
+## requiredAndNullablePost
+
+> RequiredAndNullable requiredAndNullablePost(requiredAndNullable)
+
+
+
+### Example
+
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.RequiredAndNullableApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("http://localhost");
+
+ RequiredAndNullableApi apiInstance = new RequiredAndNullableApi(defaultClient);
+ RequiredAndNullable requiredAndNullable = new RequiredAndNullable(); // RequiredAndNullable | bodyWithRequiredAndNullableAttributes
+ try {
+ RequiredAndNullable result = apiInstance.requiredAndNullablePost(requiredAndNullable);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RequiredAndNullableApi#requiredAndNullablePost");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **requiredAndNullable** | [**RequiredAndNullable**](RequiredAndNullable.md)| bodyWithRequiredAndNullableAttributes | |
+
+### Return type
+
+[**RequiredAndNullable**](RequiredAndNullable.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | response | - |
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/FileApi.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/FileApi.java
index 4f1bf741d207..a391a80e7577 100644
--- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/FileApi.java
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/FileApi.java
@@ -2,6 +2,7 @@
import org.openapitools.client.ApiClient;
+import org.openapitools.client.model.FileContent;
import java.util.HashMap;
import java.util.List;
@@ -48,6 +49,7 @@ public void setApiClient(ApiClient apiClient) {
*
* 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 {
@@ -66,14 +68,16 @@ private ResponseSpec fileIdGetRequestCreation(String id) throws RestClientRespon
final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap formParams = new LinkedMultiValueMap<>();
- final String[] localVarAccepts = { };
+ 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<>() {};
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/file/{id}", HttpMethod.GET, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
@@ -82,11 +86,12 @@ private ResponseSpec fileIdGetRequestCreation(String id) throws RestClientRespon
*
* 200 - ok
* @param id The id parameter
+ * @return FileContent
* @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);
+ public FileContent fileIdGet(String id) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return fileIdGetRequestCreation(id).body(localVarReturnType);
}
/**
@@ -94,10 +99,11 @@ public void fileIdGet(String id) throws RestClientResponseException {
*
* 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<>() {};
+ public ResponseEntity fileIdGetWithHttpInfo(String id) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
return fileIdGetRequestCreation(id).toEntity(localVarReturnType);
}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/RequiredAndNullableApi.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/RequiredAndNullableApi.java
new file mode 100644
index 000000000000..cc0e7c9ca9fa
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/RequiredAndNullableApi.java
@@ -0,0 +1,121 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+
+import org.openapitools.client.model.RequiredAndNullable;
+
+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 RequiredAndNullableApi {
+ private ApiClient apiClient;
+
+ public RequiredAndNullableApi() {
+ this(new ApiClient());
+ }
+
+ public RequiredAndNullableApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @param requiredAndNullable bodyWithRequiredAndNullableAttributes
+ * @return RequiredAndNullable
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec requiredAndNullablePostRequestCreation(RequiredAndNullable requiredAndNullable) throws RestClientResponseException {
+ Object postBody = requiredAndNullable;
+ // verify the required parameter 'requiredAndNullable' is set
+ if (requiredAndNullable == null) {
+ throw new RestClientResponseException("Missing the required parameter 'requiredAndNullable' when calling requiredAndNullablePost", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, 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<>();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/requiredAndNullable", HttpMethod.POST, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @param requiredAndNullable bodyWithRequiredAndNullableAttributes
+ * @return RequiredAndNullable
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public RequiredAndNullable requiredAndNullablePost(RequiredAndNullable requiredAndNullable) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return requiredAndNullablePostRequestCreation(requiredAndNullable).body(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @param requiredAndNullable bodyWithRequiredAndNullableAttributes
+ * @return ResponseEntity<RequiredAndNullable>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity requiredAndNullablePostWithHttpInfo(RequiredAndNullable requiredAndNullable) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return requiredAndNullablePostRequestCreation(requiredAndNullable).toEntity(localVarReturnType);
+ }
+
+ /**
+ *
+ *
+ * 0 - response
+ * @param requiredAndNullable bodyWithRequiredAndNullableAttributes
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec requiredAndNullablePostWithResponseSpec(RequiredAndNullable requiredAndNullable) throws RestClientResponseException {
+ return requiredAndNullablePostRequestCreation(requiredAndNullable);
+ }
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java
new file mode 100644
index 000000000000..b0f00682525b
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java
@@ -0,0 +1,247 @@
+/*
+ * 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.25.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 and all 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 @Nullable Integer getSize() {
+ return size;
+ }
+
+
+
+ /**
+ * Get virusScan
+ * @return virusScan
+ */
+
+ @JsonProperty(value = JSON_PROPERTY_VIRUS_SCAN, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public @Nullable VirusScanEnum getVirusScan() {
+ return 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 ");
+ }
+
+ public static class Builder {
+
+ private FileContent instance;
+
+ public Builder() {
+ this(new FileContent());
+ }
+
+ protected Builder(FileContent instance) {
+ this.instance = instance;
+ }
+
+ public FileContent.Builder name(String name) {
+ this.instance.name = name;
+ return this;
+ }
+ public FileContent.Builder size(@Nullable Integer size) {
+ this.instance.size = size;
+ return this;
+ }
+ public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) {
+ this.instance.virusScan = virusScan;
+ return this;
+ }
+
+
+ /**
+ * returns a built FileContent instance.
+ *
+ * The builder is not reusable.
+ */
+ public FileContent build() {
+ try {
+ return this.instance;
+ } finally {
+ // ensure that this.instance is not reused
+ this.instance = null;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return getClass() + "=(" + instance + ")";
+ }
+ }
+
+ /**
+ * Create a builder with no initialized field.
+ */
+ public static FileContent.Builder builder() {
+ return new FileContent.Builder();
+ }
+
+ /**
+ * Create a builder with a shallow copy of this instance.
+ */
+ public FileContent.Builder toBuilder() {
+ return new FileContent.Builder()
+ .name(getName())
+ .size(getSize())
+ .virusScan(getVirusScan());
+ }
+
+
+}
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java
new file mode 100644
index 000000000000..55653e9e6161
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java
@@ -0,0 +1,328 @@
+/*
+ * 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.25.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() {
+ }
+
+ /**
+ * Constructor with all args parameters
+ */
+ public RequiredAndNullable(@JsonProperty(JSON_PROPERTY_STR) @Nullable String str, @JsonProperty(JSON_PROPERTY_FILE) @Nullable File _file, @JsonProperty(JSON_PROPERTY_COLOR) @Nullable String color, @JsonProperty(JSON_PROPERTY_ONLY_REQUIRED) String onlyRequired, @JsonProperty(JSON_PROPERTY_LIST) @Nullable List _list) {
+ this.str = str;
+ this._file = _file;
+ this.color = color;
+ this.onlyRequired = onlyRequired;
+ this._list = _list;
+ }
+
+ 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 ");
+ }
+
+ public static class Builder {
+
+ private RequiredAndNullable instance;
+
+ public Builder() {
+ this(new RequiredAndNullable());
+ }
+
+ protected Builder(RequiredAndNullable instance) {
+ this.instance = instance;
+ }
+
+ public RequiredAndNullable.Builder str(@Nullable String str) {
+ this.instance.str = str;
+ return this;
+ }
+ public RequiredAndNullable.Builder _file(@Nullable File _file) {
+ this.instance._file = _file;
+ return this;
+ }
+ public RequiredAndNullable.Builder color(@Nullable String color) {
+ this.instance.color = color;
+ return this;
+ }
+ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) {
+ this.instance.onlyRequired = onlyRequired;
+ return this;
+ }
+ public RequiredAndNullable.Builder _list(@Nullable List _list) {
+ this.instance._list = _list;
+ return this;
+ }
+
+
+ /**
+ * returns a built RequiredAndNullable instance.
+ *
+ * The builder is not reusable.
+ */
+ public RequiredAndNullable build() {
+ try {
+ return this.instance;
+ } finally {
+ // ensure that this.instance is not reused
+ this.instance = null;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return getClass() + "=(" + instance + ")";
+ }
+ }
+
+ /**
+ * Create a builder with no initialized field.
+ */
+ public static RequiredAndNullable.Builder builder() {
+ return new RequiredAndNullable.Builder();
+ }
+
+ /**
+ * Create a builder with a shallow copy of this instance.
+ */
+ public RequiredAndNullable.Builder toBuilder() {
+ return new RequiredAndNullable.Builder()
+ .str(getStr())
+ ._file(getFile())
+ .color(getColor())
+ .onlyRequired(getOnlyRequired())
+ ._list(getList());
+ }
+
+
+}
+
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/test/java/org/openapitools/client/api/RequiredAndNullableApiTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/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/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/src/test/java/org/openapitools/client/model/FileContentTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/test/java/org/openapitools/client/model/FileContentTest.java
new file mode 100644
index 000000000000..bc686732b1ca
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/test/java/org/openapitools/client/model/FileContentTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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
+ }
+
+}
diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.java
new file mode 100644
index 000000000000..3d3388460faf
--- /dev/null
+++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/test/java/org/openapitools/client/model/RequiredAndNullableTest.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.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 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
+ }
+
+}
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 d6cab3c6d44e..8dbec199a934 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
@@ -343,7 +343,7 @@ public EnumTest outerEnum(@jakarta.annotation.Nullable OuterEnum outerEnum) {
* @return outerEnum
*/
@jakarta.annotation.Nullable
- @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "")
+ @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "", nullable = true)
@JsonIgnore
public OuterEnum getOuterEnum() {
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 acaacf9f1ed4..8aee3efd00bc 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
@@ -56,7 +56,7 @@ public HealthCheckResult nullableMessage(@jakarta.annotation.Nullable String nul
* @return nullableMessage
*/
@jakarta.annotation.Nullable
- @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "")
+ @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "", nullable = true)
@JsonIgnore
public String getNullableMessage() {
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 fc29bdb28d6c..0d4c5fb23fde 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
@@ -122,7 +122,7 @@ public NullableClass integerProp(@jakarta.annotation.Nullable Integer integerPro
* @return integerProp
*/
@jakarta.annotation.Nullable
- @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "")
+ @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "", nullable = true)
@JsonIgnore
public Integer getIntegerProp() {
@@ -156,7 +156,7 @@ public NullableClass numberProp(@jakarta.annotation.Nullable BigDecimal numberPr
* @return numberProp
*/
@jakarta.annotation.Nullable
- @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "")
+ @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "", nullable = true)
@JsonIgnore
public BigDecimal getNumberProp() {
@@ -190,7 +190,7 @@ public NullableClass booleanProp(@jakarta.annotation.Nullable Boolean booleanPro
* @return booleanProp
*/
@jakarta.annotation.Nullable
- @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "")
+ @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "", nullable = true)
@JsonIgnore
public Boolean getBooleanProp() {
@@ -224,7 +224,7 @@ public NullableClass stringProp(@jakarta.annotation.Nullable String stringProp)
* @return stringProp
*/
@jakarta.annotation.Nullable
- @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "")
+ @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "", nullable = true)
@JsonIgnore
public String getStringProp() {
@@ -258,7 +258,7 @@ public NullableClass dateProp(@jakarta.annotation.Nullable LocalDate dateProp) {
* @return dateProp
*/
@jakarta.annotation.Nullable
- @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "")
+ @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "", nullable = true)
@JsonIgnore
public LocalDate getDateProp() {
@@ -292,7 +292,7 @@ public NullableClass datetimeProp(@jakarta.annotation.Nullable OffsetDateTime da
* @return datetimeProp
*/
@jakarta.annotation.Nullable
- @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "")
+ @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "", nullable = true)
@JsonIgnore
public OffsetDateTime getDatetimeProp() {
@@ -322,7 +322,7 @@ public NullableClass arrayNullableProp(@jakarta.annotation.Nullable List