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/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/api/BarApi.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/api/BarApi.java
new file mode 100644
index 000000000000..509e54a99540
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/api/BarApi.java
@@ -0,0 +1,122 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+
+import org.openapitools.client.model.Bar;
+import org.openapitools.client.model.BarCreate;
+
+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.21.0-SNAPSHOT")
+public class BarApi {
+ private ApiClient apiClient;
+
+ public BarApi() {
+ this(new ApiClient());
+ }
+
+ public BarApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create a Bar
+ *
+ * 200 - Bar created
+ * @param barCreate The barCreate parameter
+ * @return Bar
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec createBarRequestCreation(@jakarta.annotation.Nonnull BarCreate barCreate) throws RestClientResponseException {
+ Object postBody = barCreate;
+ // verify the required parameter 'barCreate' is set
+ if (barCreate == null) {
+ throw new RestClientResponseException("Missing the required parameter 'barCreate' when calling createBar", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
+ }
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ final MultiValueMap queryParams = 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("/bar", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ * Create a Bar
+ *
+ * 200 - Bar created
+ * @param barCreate The barCreate parameter
+ * @return Bar
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public Bar createBar(@jakarta.annotation.Nonnull BarCreate barCreate) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return createBarRequestCreation(barCreate).body(localVarReturnType);
+ }
+
+ /**
+ * Create a Bar
+ *
+ * 200 - Bar created
+ * @param barCreate The barCreate parameter
+ * @return ResponseEntity<Bar>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity createBarWithHttpInfo(@jakarta.annotation.Nonnull BarCreate barCreate) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return createBarRequestCreation(barCreate).toEntity(localVarReturnType);
+ }
+
+ /**
+ * Create a Bar
+ *
+ * 200 - Bar created
+ * @param barCreate The barCreate parameter
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec createBarWithResponseSpec(@jakarta.annotation.Nonnull BarCreate barCreate) throws RestClientResponseException {
+ return createBarRequestCreation(barCreate);
+ }
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/api/FooApi.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/api/FooApi.java
new file mode 100644
index 000000000000..60a960b3f7b8
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/api/FooApi.java
@@ -0,0 +1,183 @@
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiClient;
+
+import org.openapitools.client.model.Foo;
+import org.openapitools.client.model.FooRefOrValue;
+
+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.21.0-SNAPSHOT")
+public class FooApi {
+ private ApiClient apiClient;
+
+ public FooApi() {
+ this(new ApiClient());
+ }
+
+ public FooApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create a Foo
+ *
+ *
201 - Error
+ * @param foo The Foo to be created
+ * @return FooRefOrValue
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec createFooRequestCreation(@jakarta.annotation.Nullable Foo foo) throws RestClientResponseException {
+ Object postBody = foo;
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ final MultiValueMap queryParams = 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;charset=utf-8"
+ };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return apiClient.invokeAPI("/foo", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ * Create a Foo
+ *
+ * 201 - Error
+ * @param foo The Foo to be created
+ * @return FooRefOrValue
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public FooRefOrValue createFoo(@jakarta.annotation.Nullable Foo foo) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return createFooRequestCreation(foo).body(localVarReturnType);
+ }
+
+ /**
+ * Create a Foo
+ *
+ * 201 - Error
+ * @param foo The Foo to be created
+ * @return ResponseEntity<FooRefOrValue>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity createFooWithHttpInfo(@jakarta.annotation.Nullable Foo foo) throws RestClientResponseException {
+ ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
+ return createFooRequestCreation(foo).toEntity(localVarReturnType);
+ }
+
+ /**
+ * Create a Foo
+ *
+ * 201 - Error
+ * @param foo The Foo to be created
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec createFooWithResponseSpec(@jakarta.annotation.Nullable Foo foo) throws RestClientResponseException {
+ return createFooRequestCreation(foo);
+ }
+
+ /**
+ * GET all Foos
+ *
+ *
200 - Success
+ * @return List<FooRefOrValue>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ private ResponseSpec getAllFoosRequestCreation() throws RestClientResponseException {
+ Object postBody = null;
+ // create path and map variables
+ final Map pathParams = new HashMap<>();
+
+ final MultiValueMap queryParams = new LinkedMultiValueMap<>();
+ final HttpHeaders headerParams = new HttpHeaders();
+ final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
+ final MultiValueMap formParams = new LinkedMultiValueMap<>();
+
+ final String[] localVarAccepts = {
+ "application/json;charset=utf-8"
+ };
+ 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", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+
+ /**
+ * GET all Foos
+ *
+ * 200 - Success
+ * @return List<FooRefOrValue>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public List getAllFoos() throws RestClientResponseException {
+ ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {};
+ return getAllFoosRequestCreation().body(localVarReturnType);
+ }
+
+ /**
+ * GET all Foos
+ *
+ * 200 - Success
+ * @return ResponseEntity<List<FooRefOrValue>>
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseEntity> getAllFoosWithHttpInfo() throws RestClientResponseException {
+ ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference<>() {};
+ return getAllFoosRequestCreation().toEntity(localVarReturnType);
+ }
+
+ /**
+ * GET all Foos
+ *
+ * 200 - Success
+ * @return ResponseSpec
+ * @throws RestClientResponseException if an error occurs while attempting to invoke the API
+ */
+ public ResponseSpec getAllFoosWithResponseSpec() throws RestClientResponseException {
+ return getAllFoosRequestCreation();
+ }
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
new file mode 100644
index 000000000000..e6ff765ddcc6
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
@@ -0,0 +1,75 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.21.0-SNAPSHOT")
+public class ApiKeyAuth implements Authentication {
+ private final String location;
+ private final String paramName;
+
+ private String apiKey;
+ private String apiKeyPrefix;
+
+ public ApiKeyAuth(String location, String paramName) {
+ this.location = location;
+ this.paramName = paramName;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getParamName() {
+ return paramName;
+ }
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
+
+ public String getApiKeyPrefix() {
+ return apiKeyPrefix;
+ }
+
+ public void setApiKeyPrefix(String apiKeyPrefix) {
+ this.apiKeyPrefix = apiKeyPrefix;
+ }
+
+ @Override
+ public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) {
+ if (apiKey == null) {
+ return;
+ }
+ String value;
+ if (apiKeyPrefix != null) {
+ value = apiKeyPrefix + " " + apiKey;
+ } else {
+ value = apiKey;
+ }
+ if (location.equals("query")) {
+ queryParams.add(paramName, value);
+ } else if (location.equals("header")) {
+ headerParams.add(paramName, value);
+ } else if (location.equals("cookie")) {
+ cookieParams.add(paramName, value);
+ }
+ }
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/Authentication.java
new file mode 100644
index 000000000000..af58486a2a59
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/Authentication.java
@@ -0,0 +1,29 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.21.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/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
new file mode 100644
index 000000000000..90e67b1fc137
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
@@ -0,0 +1,51 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.21.0-SNAPSHOT")
+public class HttpBasicAuth implements Authentication {
+ private String username;
+ private String password;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ @Override
+ public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) {
+ if (username == null && password == null) {
+ return;
+ }
+ String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
+ headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8)));
+ }
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
new file mode 100644
index 000000000000..9bc1845d1b00
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
@@ -0,0 +1,69 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.21.0-SNAPSHOT")
+public class HttpBearerAuth implements Authentication {
+ private final String scheme;
+ private Supplier tokenSupplier;
+
+ public HttpBearerAuth(String scheme) {
+ this.scheme = scheme;
+ }
+
+ /**
+ * Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @return The bearer token
+ */
+ public String getBearerToken() {
+ return tokenSupplier.get();
+ }
+
+ /**
+ * Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @param bearerToken The bearer token to send in the Authorization header
+ */
+ public void setBearerToken(String bearerToken) {
+ this.tokenSupplier = () -> bearerToken;
+ }
+
+ /**
+ * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header.
+ *
+ * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header
+ */
+ public void setBearerToken(Supplier tokenSupplier) {
+ this.tokenSupplier = tokenSupplier;
+ }
+
+ @Override
+ public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) {
+ String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
+ if (bearerToken == null) {
+ return;
+ }
+ headerParams.add(HttpHeaders.AUTHORIZATION, (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
+ }
+
+ private static String upperCaseBearer(String scheme) {
+ return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
+ }
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Addressable.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Addressable.java
new file mode 100644
index 000000000000..130610acfa8a
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Addressable.java
@@ -0,0 +1,141 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Base schema for addressable entities
+ */
+@JsonPropertyOrder({
+ Addressable.JSON_PROPERTY_HREF,
+ Addressable.JSON_PROPERTY_ID
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+public final class Addressable implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_HREF = "href";
+ @jakarta.annotation.Nullable
+ private String href;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ @jakarta.annotation.Nullable
+ private String id;
+
+ public Addressable() {
+ }
+
+ public Addressable href(@jakarta.annotation.Nullable String href) {
+
+ this.href = href;
+ return this;
+ }
+
+ /**
+ * Hyperlink reference
+ * @return href
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_HREF, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getHref() {
+ return href;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_HREF, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setHref(@jakarta.annotation.Nullable String href) {
+ this.href = href;
+ }
+
+ public Addressable id(@jakarta.annotation.Nullable String id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * unique identifier
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_ID, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getId() {
+ return id;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_ID, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setId(@jakarta.annotation.Nullable String id) {
+ this.id = id;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Addressable addressable = (Addressable) o;
+ return Objects.equals(this.href, addressable.href) &&
+ Objects.equals(this.id, addressable.id);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(href, id);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Addressable {\n");
+ sb.append(" href: ").append(toIndentedString(href)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Animal.java
new file mode 100644
index 000000000000..f341405da00b
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Animal.java
@@ -0,0 +1,42 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Cat;
+import org.openapitools.client.model.Dog;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "", // ignore manually set , it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "", visible = true)
+
+public sealed interface Animal extends Serializable permits Dog, Cat {
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Apple.java
new file mode 100644
index 000000000000..7a3dcb3df115
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Apple.java
@@ -0,0 +1,144 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Apple
+ */
+@JsonPropertyOrder({
+ Apple.JSON_PROPERTY_SEEDS,
+ Apple.JSON_PROPERTY_FRUIT_TYPE
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+public final class Apple implements Serializable, Fruit {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_SEEDS = "seeds";
+ @jakarta.annotation.Nonnull
+ private Integer seeds;
+
+ public static final String JSON_PROPERTY_FRUIT_TYPE = "fruitType";
+ // The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
+ private FruitType fruitType;
+
+ public Apple() {
+ }
+
+ public Apple seeds(@jakarta.annotation.Nonnull Integer seeds) {
+
+ this.seeds = seeds;
+ return this;
+ }
+
+ /**
+ * Get seeds
+ * @return seeds
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(value = JSON_PROPERTY_SEEDS, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public Integer getSeeds() {
+ return seeds;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_SEEDS, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setSeeds(@jakarta.annotation.Nonnull Integer seeds) {
+ this.seeds = seeds;
+ }
+
+ public Apple fruitType(@jakarta.annotation.Nonnull FruitType fruitType) {
+
+ this.fruitType = fruitType;
+ return this;
+ }
+
+ /**
+ * test
+ * @return fruitType
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(value = JSON_PROPERTY_FRUIT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public FruitType getFruitType() {
+ return fruitType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FRUIT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setFruitType(@jakarta.annotation.Nonnull FruitType fruitType) {
+ this.fruitType = fruitType;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Apple apple = (Apple) o;
+ return Objects.equals(this.seeds, apple.seeds) &&
+ Objects.equals(this.fruitType, apple.fruitType);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(seeds, fruitType);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Apple {\n");
+ sb.append(" seeds: ").append(toIndentedString(seeds)).append("\n");
+ sb.append(" fruitType: ").append(toIndentedString(fruitType)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Banana.java
new file mode 100644
index 000000000000..49ea8db322b0
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Banana.java
@@ -0,0 +1,144 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Banana
+ */
+@JsonPropertyOrder({
+ Banana.JSON_PROPERTY_LENGTH,
+ Banana.JSON_PROPERTY_FRUIT_TYPE
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+public final class Banana implements Serializable, Fruit {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_LENGTH = "length";
+ @jakarta.annotation.Nonnull
+ private Integer length;
+
+ public static final String JSON_PROPERTY_FRUIT_TYPE = "fruitType";
+ // The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
+ private FruitType fruitType;
+
+ public Banana() {
+ }
+
+ public Banana length(@jakarta.annotation.Nonnull Integer length) {
+
+ this.length = length;
+ return this;
+ }
+
+ /**
+ * Get length
+ * @return length
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(value = JSON_PROPERTY_LENGTH, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public Integer getLength() {
+ return length;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_LENGTH, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setLength(@jakarta.annotation.Nonnull Integer length) {
+ this.length = length;
+ }
+
+ public Banana fruitType(@jakarta.annotation.Nonnull FruitType fruitType) {
+
+ this.fruitType = fruitType;
+ return this;
+ }
+
+ /**
+ * test
+ * @return fruitType
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(value = JSON_PROPERTY_FRUIT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public FruitType getFruitType() {
+ return fruitType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FRUIT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setFruitType(@jakarta.annotation.Nonnull FruitType fruitType) {
+ this.fruitType = fruitType;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Banana banana = (Banana) o;
+ return Objects.equals(this.length, banana.length) &&
+ Objects.equals(this.fruitType, banana.fruitType);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(length, fruitType);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Banana {\n");
+ sb.append(" length: ").append(toIndentedString(length)).append("\n");
+ sb.append(" fruitType: ").append(toIndentedString(fruitType)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Bar.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Bar.java
new file mode 100644
index 000000000000..b95485dfdce3
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Bar.java
@@ -0,0 +1,243 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Entity;
+import org.openapitools.client.model.FooRefOrValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Bar
+ */
+@JsonPropertyOrder({
+ Bar.JSON_PROPERTY_ID,
+ Bar.JSON_PROPERTY_BAR_PROP_A,
+ Bar.JSON_PROPERTY_FOO_PROP_B,
+ Bar.JSON_PROPERTY_FOO
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+
+public final class Bar extends Entity implements Serializable, BarRefOrValue {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ @jakarta.annotation.Nonnull
+ private String id;
+
+ public static final String JSON_PROPERTY_BAR_PROP_A = "barPropA";
+ @jakarta.annotation.Nullable
+ private String barPropA;
+
+ public static final String JSON_PROPERTY_FOO_PROP_B = "fooPropB";
+ @jakarta.annotation.Nullable
+ private String fooPropB;
+
+ public static final String JSON_PROPERTY_FOO = "foo";
+ @jakarta.annotation.Nullable
+ private FooRefOrValue foo;
+
+ public Bar() {
+
+ }
+
+ public Bar id(@jakarta.annotation.Nonnull String id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get id
+ * @return id
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(value = JSON_PROPERTY_ID, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getId() {
+ return id;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_ID, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setId(@jakarta.annotation.Nonnull String id) {
+ this.id = id;
+ }
+
+ public Bar barPropA(@jakarta.annotation.Nullable String barPropA) {
+
+ this.barPropA = barPropA;
+ return this;
+ }
+
+ /**
+ * Get barPropA
+ * @return barPropA
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_BAR_PROP_A, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getBarPropA() {
+ return barPropA;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_BAR_PROP_A, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setBarPropA(@jakarta.annotation.Nullable String barPropA) {
+ this.barPropA = barPropA;
+ }
+
+ public Bar fooPropB(@jakarta.annotation.Nullable String fooPropB) {
+
+ this.fooPropB = fooPropB;
+ return this;
+ }
+
+ /**
+ * Get fooPropB
+ * @return fooPropB
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_FOO_PROP_B, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getFooPropB() {
+ return fooPropB;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FOO_PROP_B, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setFooPropB(@jakarta.annotation.Nullable String fooPropB) {
+ this.fooPropB = fooPropB;
+ }
+
+ public Bar foo(@jakarta.annotation.Nullable FooRefOrValue foo) {
+
+ this.foo = foo;
+ return this;
+ }
+
+ /**
+ * Get foo
+ * @return foo
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_FOO, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public FooRefOrValue getFoo() {
+ return foo;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FOO, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setFoo(@jakarta.annotation.Nullable FooRefOrValue foo) {
+ this.foo = foo;
+ }
+
+
+ @Override
+ public Bar href(@jakarta.annotation.Nullable String href) {
+ this.setHref(href);
+ return this;
+ }
+
+ @Override
+ public Bar atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.setAtSchemaLocation(atSchemaLocation);
+ return this;
+ }
+
+ @Override
+ public Bar atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.setAtBaseType(atBaseType);
+ return this;
+ }
+
+ @Override
+ public Bar atType(@jakarta.annotation.Nonnull String atType) {
+ this.setAtType(atType);
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Bar bar = (Bar) o;
+ return Objects.equals(this.id, bar.id) &&
+ Objects.equals(this.barPropA, bar.barPropA) &&
+ Objects.equals(this.fooPropB, bar.fooPropB) &&
+ Objects.equals(this.foo, bar.foo) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, barPropA, fooPropB, foo, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Bar {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" barPropA: ").append(toIndentedString(barPropA)).append("\n");
+ sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).append("\n");
+ sb.append(" foo: ").append(toIndentedString(foo)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarCreate.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarCreate.java
new file mode 100644
index 000000000000..8276bc9bc711
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarCreate.java
@@ -0,0 +1,218 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Entity;
+import org.openapitools.client.model.FooRefOrValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * BarCreate
+ */
+@JsonPropertyOrder({
+ BarCreate.JSON_PROPERTY_BAR_PROP_A,
+ BarCreate.JSON_PROPERTY_FOO_PROP_B,
+ BarCreate.JSON_PROPERTY_FOO
+})
+@JsonTypeName("Bar_Create")
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+
+public final class BarCreate extends Entity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_BAR_PROP_A = "barPropA";
+ @jakarta.annotation.Nullable
+ private String barPropA;
+
+ public static final String JSON_PROPERTY_FOO_PROP_B = "fooPropB";
+ @jakarta.annotation.Nullable
+ private String fooPropB;
+
+ public static final String JSON_PROPERTY_FOO = "foo";
+ @jakarta.annotation.Nullable
+ private FooRefOrValue foo;
+
+ public BarCreate() {
+
+ }
+
+ public BarCreate barPropA(@jakarta.annotation.Nullable String barPropA) {
+
+ this.barPropA = barPropA;
+ return this;
+ }
+
+ /**
+ * Get barPropA
+ * @return barPropA
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_BAR_PROP_A, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getBarPropA() {
+ return barPropA;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_BAR_PROP_A, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setBarPropA(@jakarta.annotation.Nullable String barPropA) {
+ this.barPropA = barPropA;
+ }
+
+ public BarCreate fooPropB(@jakarta.annotation.Nullable String fooPropB) {
+
+ this.fooPropB = fooPropB;
+ return this;
+ }
+
+ /**
+ * Get fooPropB
+ * @return fooPropB
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_FOO_PROP_B, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getFooPropB() {
+ return fooPropB;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FOO_PROP_B, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setFooPropB(@jakarta.annotation.Nullable String fooPropB) {
+ this.fooPropB = fooPropB;
+ }
+
+ public BarCreate foo(@jakarta.annotation.Nullable FooRefOrValue foo) {
+
+ this.foo = foo;
+ return this;
+ }
+
+ /**
+ * Get foo
+ * @return foo
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_FOO, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public FooRefOrValue getFoo() {
+ return foo;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FOO, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setFoo(@jakarta.annotation.Nullable FooRefOrValue foo) {
+ this.foo = foo;
+ }
+
+
+ @Override
+ public BarCreate href(@jakarta.annotation.Nullable String href) {
+ this.setHref(href);
+ return this;
+ }
+
+ @Override
+ public BarCreate id(@jakarta.annotation.Nullable String id) {
+ this.setId(id);
+ return this;
+ }
+
+ @Override
+ public BarCreate atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.setAtSchemaLocation(atSchemaLocation);
+ return this;
+ }
+
+ @Override
+ public BarCreate atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.setAtBaseType(atBaseType);
+ return this;
+ }
+
+ @Override
+ public BarCreate atType(@jakarta.annotation.Nonnull String atType) {
+ this.setAtType(atType);
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BarCreate barCreate = (BarCreate) o;
+ return Objects.equals(this.barPropA, barCreate.barPropA) &&
+ Objects.equals(this.fooPropB, barCreate.fooPropB) &&
+ Objects.equals(this.foo, barCreate.foo) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(barPropA, fooPropB, foo, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BarCreate {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" barPropA: ").append(toIndentedString(barPropA)).append("\n");
+ sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).append("\n");
+ sb.append(" foo: ").append(toIndentedString(foo)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java
new file mode 100644
index 000000000000..8ed479b33013
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java
@@ -0,0 +1,119 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.EntityRef;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * BarRef
+ */
+@JsonPropertyOrder({
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+
+public final class BarRef extends EntityRef implements Serializable, BarRefOrValue {
+ private static final long serialVersionUID = 1L;
+
+ public BarRef() {
+
+ }
+
+
+ @Override
+ public BarRef href(@jakarta.annotation.Nullable String href) {
+ this.setHref(href);
+ return this;
+ }
+
+ @Override
+ public BarRef id(@jakarta.annotation.Nullable String id) {
+ this.setId(id);
+ return this;
+ }
+
+ @Override
+ public BarRef atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.setAtSchemaLocation(atSchemaLocation);
+ return this;
+ }
+
+ @Override
+ public BarRef atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.setAtBaseType(atBaseType);
+ return this;
+ }
+
+ @Override
+ public BarRef atType(@jakarta.annotation.Nonnull String atType) {
+ this.setAtType(atType);
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BarRef {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRefOrValue.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRefOrValue.java
new file mode 100644
index 000000000000..e87fcbbc64e7
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRefOrValue.java
@@ -0,0 +1,48 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Bar;
+import org.openapitools.client.model.BarRef;
+import org.openapitools.client.model.FooRefOrValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = Bar.class, name = "Bar"),
+ @JsonSubTypes.Type(value = BarRef.class, name = "BarRef"),
+})
+
+public sealed interface BarRefOrValue extends Serializable permits Bar, BarRef {
+ public String getAtType();
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Cat.java
new file mode 100644
index 000000000000..3165f3ad5335
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Cat.java
@@ -0,0 +1,109 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Cat
+ */
+@JsonPropertyOrder({
+ Cat.JSON_PROPERTY_DECLAWED
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+public final class Cat implements Serializable, Animal {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_DECLAWED = "declawed";
+ @jakarta.annotation.Nullable
+ private Boolean declawed;
+
+ public Cat() {
+ }
+
+ public Cat declawed(@jakarta.annotation.Nullable Boolean declawed) {
+
+ this.declawed = declawed;
+ return this;
+ }
+
+ /**
+ * Get declawed
+ * @return declawed
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_DECLAWED, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Boolean getDeclawed() {
+ return declawed;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_DECLAWED, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setDeclawed(@jakarta.annotation.Nullable Boolean declawed) {
+ this.declawed = declawed;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Cat cat = (Cat) o;
+ return Objects.equals(this.declawed, cat.declawed);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(declawed);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Cat {\n");
+ sb.append(" declawed: ").append(toIndentedString(declawed)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Dog.java
new file mode 100644
index 000000000000..110553985381
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Dog.java
@@ -0,0 +1,109 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Dog
+ */
+@JsonPropertyOrder({
+ Dog.JSON_PROPERTY_BARK
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+public final class Dog implements Serializable, Animal {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_BARK = "bark";
+ @jakarta.annotation.Nullable
+ private Boolean bark;
+
+ public Dog() {
+ }
+
+ public Dog bark(@jakarta.annotation.Nullable Boolean bark) {
+
+ this.bark = bark;
+ return this;
+ }
+
+ /**
+ * Get bark
+ * @return bark
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_BARK, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public Boolean getBark() {
+ return bark;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_BARK, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setBark(@jakarta.annotation.Nullable Boolean bark) {
+ this.bark = bark;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Dog dog = (Dog) o;
+ return Objects.equals(this.bark, dog.bark);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(bark);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Dog {\n");
+ sb.append(" bark: ").append(toIndentedString(bark)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Entity.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Entity.java
new file mode 100644
index 000000000000..2ae7521ba1b7
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Entity.java
@@ -0,0 +1,254 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Entity
+ */
+@JsonPropertyOrder({
+ Entity.JSON_PROPERTY_HREF,
+ Entity.JSON_PROPERTY_ID,
+ Entity.JSON_PROPERTY_AT_SCHEMA_LOCATION,
+ Entity.JSON_PROPERTY_AT_BASE_TYPE,
+ Entity.JSON_PROPERTY_AT_TYPE
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = Bar.class, name = "Bar"),
+ @JsonSubTypes.Type(value = BarCreate.class, name = "Bar_Create"),
+ @JsonSubTypes.Type(value = Foo.class, name = "Foo"),
+ @JsonSubTypes.Type(value = Pasta.class, name = "Pasta"),
+ @JsonSubTypes.Type(value = Pizza.class, name = "Pizza"),
+ @JsonSubTypes.Type(value = PizzaSpeziale.class, name = "PizzaSpeziale"),
+})
+
+public class Entity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_HREF = "href";
+ @jakarta.annotation.Nullable
+ protected String href;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ @jakarta.annotation.Nullable
+ protected String id;
+
+ public static final String JSON_PROPERTY_AT_SCHEMA_LOCATION = "@schemaLocation";
+ @jakarta.annotation.Nullable
+ protected String atSchemaLocation;
+
+ public static final String JSON_PROPERTY_AT_BASE_TYPE = "@baseType";
+ @jakarta.annotation.Nullable
+ protected String atBaseType;
+
+ public static final String JSON_PROPERTY_AT_TYPE = "@type";
+ // The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
+ protected String atType;
+
+ public Entity() {
+ }
+
+ public Entity href(@jakarta.annotation.Nullable String href) {
+
+ this.href = href;
+ return this;
+ }
+
+ /**
+ * Hyperlink reference
+ * @return href
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_HREF, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getHref() {
+ return href;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_HREF, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setHref(@jakarta.annotation.Nullable String href) {
+ this.href = href;
+ }
+
+ public Entity id(@jakarta.annotation.Nullable String id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * unique identifier
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_ID, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getId() {
+ return id;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_ID, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setId(@jakarta.annotation.Nullable String id) {
+ this.id = id;
+ }
+
+ public Entity atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+
+ this.atSchemaLocation = atSchemaLocation;
+ return this;
+ }
+
+ /**
+ * A URI to a JSON-Schema file that defines additional attributes and relationships
+ * @return atSchemaLocation
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_AT_SCHEMA_LOCATION, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getAtSchemaLocation() {
+ return atSchemaLocation;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_SCHEMA_LOCATION, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setAtSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.atSchemaLocation = atSchemaLocation;
+ }
+
+ public Entity atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+
+ this.atBaseType = atBaseType;
+ return this;
+ }
+
+ /**
+ * When sub-classing, this defines the super-class
+ * @return atBaseType
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_AT_BASE_TYPE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getAtBaseType() {
+ return atBaseType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_BASE_TYPE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setAtBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.atBaseType = atBaseType;
+ }
+
+ public Entity atType(@jakarta.annotation.Nonnull String atType) {
+
+ this.atType = atType;
+ return this;
+ }
+
+ /**
+ * When sub-classing, this defines the sub-class Extensible name
+ * @return atType
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(value = JSON_PROPERTY_AT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getAtType() {
+ return atType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setAtType(@jakarta.annotation.Nonnull String atType) {
+ this.atType = atType;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Entity entity = (Entity) o;
+ return Objects.equals(this.href, entity.href) &&
+ Objects.equals(this.id, entity.id) &&
+ Objects.equals(this.atSchemaLocation, entity.atSchemaLocation) &&
+ Objects.equals(this.atBaseType, entity.atBaseType) &&
+ Objects.equals(this.atType, entity.atType);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(href, id, atSchemaLocation, atBaseType, atType);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Entity {\n");
+ sb.append(" href: ").append(toIndentedString(href)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
+ sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
+ sb.append(" atType: ").append(toIndentedString(atType)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/EntityRef.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/EntityRef.java
new file mode 100644
index 000000000000..690e269c98f4
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/EntityRef.java
@@ -0,0 +1,314 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * EntityRef
+ */
+@JsonPropertyOrder({
+ EntityRef.JSON_PROPERTY_HREF,
+ EntityRef.JSON_PROPERTY_ID,
+ EntityRef.JSON_PROPERTY_AT_SCHEMA_LOCATION,
+ EntityRef.JSON_PROPERTY_AT_BASE_TYPE,
+ EntityRef.JSON_PROPERTY_AT_TYPE,
+ EntityRef.JSON_PROPERTY_NAME,
+ EntityRef.JSON_PROPERTY_AT_REFERRED_TYPE
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = BarRef.class, name = "BarRef"),
+ @JsonSubTypes.Type(value = FooRef.class, name = "FooRef"),
+})
+
+public class EntityRef implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_HREF = "href";
+ @jakarta.annotation.Nullable
+ protected String href;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ @jakarta.annotation.Nullable
+ protected String id;
+
+ public static final String JSON_PROPERTY_AT_SCHEMA_LOCATION = "@schemaLocation";
+ @jakarta.annotation.Nullable
+ protected String atSchemaLocation;
+
+ public static final String JSON_PROPERTY_AT_BASE_TYPE = "@baseType";
+ @jakarta.annotation.Nullable
+ protected String atBaseType;
+
+ public static final String JSON_PROPERTY_AT_TYPE = "@type";
+ // The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
+ protected String atType;
+
+ public static final String JSON_PROPERTY_NAME = "name";
+ @jakarta.annotation.Nullable
+ protected String name;
+
+ public static final String JSON_PROPERTY_AT_REFERRED_TYPE = "@referredType";
+ @jakarta.annotation.Nullable
+ protected String atReferredType;
+
+ public EntityRef() {
+ }
+
+ public EntityRef href(@jakarta.annotation.Nullable String href) {
+
+ this.href = href;
+ return this;
+ }
+
+ /**
+ * Hyperlink reference
+ * @return href
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_HREF, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getHref() {
+ return href;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_HREF, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setHref(@jakarta.annotation.Nullable String href) {
+ this.href = href;
+ }
+
+ public EntityRef id(@jakarta.annotation.Nullable String id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * unique identifier
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_ID, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getId() {
+ return id;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_ID, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setId(@jakarta.annotation.Nullable String id) {
+ this.id = id;
+ }
+
+ public EntityRef atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+
+ this.atSchemaLocation = atSchemaLocation;
+ return this;
+ }
+
+ /**
+ * A URI to a JSON-Schema file that defines additional attributes and relationships
+ * @return atSchemaLocation
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_AT_SCHEMA_LOCATION, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getAtSchemaLocation() {
+ return atSchemaLocation;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_SCHEMA_LOCATION, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setAtSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.atSchemaLocation = atSchemaLocation;
+ }
+
+ public EntityRef atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+
+ this.atBaseType = atBaseType;
+ return this;
+ }
+
+ /**
+ * When sub-classing, this defines the super-class
+ * @return atBaseType
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_AT_BASE_TYPE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getAtBaseType() {
+ return atBaseType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_BASE_TYPE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setAtBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.atBaseType = atBaseType;
+ }
+
+ public EntityRef atType(@jakarta.annotation.Nonnull String atType) {
+
+ this.atType = atType;
+ return this;
+ }
+
+ /**
+ * When sub-classing, this defines the sub-class Extensible name
+ * @return atType
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(value = JSON_PROPERTY_AT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getAtType() {
+ return atType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setAtType(@jakarta.annotation.Nonnull String atType) {
+ this.atType = atType;
+ }
+
+ public EntityRef name(@jakarta.annotation.Nullable String name) {
+
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of the related entity.
+ * @return name
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_NAME, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getName() {
+ return name;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_NAME, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setName(@jakarta.annotation.Nullable String name) {
+ this.name = name;
+ }
+
+ public EntityRef atReferredType(@jakarta.annotation.Nullable String atReferredType) {
+
+ this.atReferredType = atReferredType;
+ return this;
+ }
+
+ /**
+ * The actual type of the target instance when needed for disambiguation.
+ * @return atReferredType
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_AT_REFERRED_TYPE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getAtReferredType() {
+ return atReferredType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_REFERRED_TYPE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setAtReferredType(@jakarta.annotation.Nullable String atReferredType) {
+ this.atReferredType = atReferredType;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ EntityRef entityRef = (EntityRef) o;
+ return Objects.equals(this.href, entityRef.href) &&
+ Objects.equals(this.id, entityRef.id) &&
+ Objects.equals(this.atSchemaLocation, entityRef.atSchemaLocation) &&
+ Objects.equals(this.atBaseType, entityRef.atBaseType) &&
+ Objects.equals(this.atType, entityRef.atType) &&
+ Objects.equals(this.name, entityRef.name) &&
+ Objects.equals(this.atReferredType, entityRef.atReferredType);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(href, id, atSchemaLocation, atBaseType, atType, name, atReferredType);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EntityRef {\n");
+ sb.append(" href: ").append(toIndentedString(href)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
+ sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
+ sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" atReferredType: ").append(toIndentedString(atReferredType)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Extensible.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Extensible.java
new file mode 100644
index 000000000000..482ea86c2b67
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Extensible.java
@@ -0,0 +1,173 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Extensible
+ */
+@JsonPropertyOrder({
+ Extensible.JSON_PROPERTY_AT_SCHEMA_LOCATION,
+ Extensible.JSON_PROPERTY_AT_BASE_TYPE,
+ Extensible.JSON_PROPERTY_AT_TYPE
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+public final class Extensible implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_AT_SCHEMA_LOCATION = "@schemaLocation";
+ @jakarta.annotation.Nullable
+ private String atSchemaLocation;
+
+ public static final String JSON_PROPERTY_AT_BASE_TYPE = "@baseType";
+ @jakarta.annotation.Nullable
+ private String atBaseType;
+
+ public static final String JSON_PROPERTY_AT_TYPE = "@type";
+ @jakarta.annotation.Nonnull
+ private String atType;
+
+ public Extensible() {
+ }
+
+ public Extensible atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+
+ this.atSchemaLocation = atSchemaLocation;
+ return this;
+ }
+
+ /**
+ * A URI to a JSON-Schema file that defines additional attributes and relationships
+ * @return atSchemaLocation
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_AT_SCHEMA_LOCATION, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getAtSchemaLocation() {
+ return atSchemaLocation;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_SCHEMA_LOCATION, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setAtSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.atSchemaLocation = atSchemaLocation;
+ }
+
+ public Extensible atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+
+ this.atBaseType = atBaseType;
+ return this;
+ }
+
+ /**
+ * When sub-classing, this defines the super-class
+ * @return atBaseType
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_AT_BASE_TYPE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getAtBaseType() {
+ return atBaseType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_BASE_TYPE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setAtBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.atBaseType = atBaseType;
+ }
+
+ public Extensible atType(@jakarta.annotation.Nonnull String atType) {
+
+ this.atType = atType;
+ return this;
+ }
+
+ /**
+ * When sub-classing, this defines the sub-class Extensible name
+ * @return atType
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(value = JSON_PROPERTY_AT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getAtType() {
+ return atType;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_AT_TYPE, required = true)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setAtType(@jakarta.annotation.Nonnull String atType) {
+ this.atType = atType;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Extensible extensible = (Extensible) o;
+ return Objects.equals(this.atSchemaLocation, extensible.atSchemaLocation) &&
+ Objects.equals(this.atBaseType, extensible.atBaseType) &&
+ Objects.equals(this.atType, extensible.atType);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(atSchemaLocation, atBaseType, atType);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Extensible {\n");
+ sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
+ sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
+ sb.append(" atType: ").append(toIndentedString(atType)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Foo.java
new file mode 100644
index 000000000000..47789a9580bd
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Foo.java
@@ -0,0 +1,184 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Entity;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Foo
+ */
+@JsonPropertyOrder({
+ Foo.JSON_PROPERTY_FOO_PROP_A,
+ Foo.JSON_PROPERTY_FOO_PROP_B
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+
+public final class Foo extends Entity implements Serializable, FooRefOrValue {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_FOO_PROP_A = "fooPropA";
+ @jakarta.annotation.Nullable
+ private String fooPropA;
+
+ public static final String JSON_PROPERTY_FOO_PROP_B = "fooPropB";
+ @jakarta.annotation.Nullable
+ private String fooPropB;
+
+ public Foo() {
+
+ }
+
+ public Foo fooPropA(@jakarta.annotation.Nullable String fooPropA) {
+
+ this.fooPropA = fooPropA;
+ return this;
+ }
+
+ /**
+ * Get fooPropA
+ * @return fooPropA
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_FOO_PROP_A, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getFooPropA() {
+ return fooPropA;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FOO_PROP_A, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setFooPropA(@jakarta.annotation.Nullable String fooPropA) {
+ this.fooPropA = fooPropA;
+ }
+
+ public Foo fooPropB(@jakarta.annotation.Nullable String fooPropB) {
+
+ this.fooPropB = fooPropB;
+ return this;
+ }
+
+ /**
+ * Get fooPropB
+ * @return fooPropB
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_FOO_PROP_B, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getFooPropB() {
+ return fooPropB;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FOO_PROP_B, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setFooPropB(@jakarta.annotation.Nullable String fooPropB) {
+ this.fooPropB = fooPropB;
+ }
+
+
+ @Override
+ public Foo href(@jakarta.annotation.Nullable String href) {
+ this.setHref(href);
+ return this;
+ }
+
+ @Override
+ public Foo id(@jakarta.annotation.Nullable String id) {
+ this.setId(id);
+ return this;
+ }
+
+ @Override
+ public Foo atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.setAtSchemaLocation(atSchemaLocation);
+ return this;
+ }
+
+ @Override
+ public Foo atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.setAtBaseType(atBaseType);
+ return this;
+ }
+
+ @Override
+ public Foo atType(@jakarta.annotation.Nonnull String atType) {
+ this.setAtType(atType);
+ return this;
+ }
+
+ @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.fooPropA, foo.fooPropA) &&
+ Objects.equals(this.fooPropB, foo.fooPropB) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fooPropA, fooPropB, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Foo {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" fooPropA: ").append(toIndentedString(fooPropA)).append("\n");
+ sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java
new file mode 100644
index 000000000000..a8ce77e8b762
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java
@@ -0,0 +1,152 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.EntityRef;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * FooRef
+ */
+@JsonPropertyOrder({
+ FooRef.JSON_PROPERTY_FOOREF_PROP_A
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+
+public final class FooRef extends EntityRef implements Serializable, FooRefOrValue {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_FOOREF_PROP_A = "foorefPropA";
+ @jakarta.annotation.Nullable
+ private String foorefPropA;
+
+ public FooRef() {
+
+ }
+
+ public FooRef foorefPropA(@jakarta.annotation.Nullable String foorefPropA) {
+
+ this.foorefPropA = foorefPropA;
+ return this;
+ }
+
+ /**
+ * Get foorefPropA
+ * @return foorefPropA
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_FOOREF_PROP_A, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getFoorefPropA() {
+ return foorefPropA;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_FOOREF_PROP_A, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setFoorefPropA(@jakarta.annotation.Nullable String foorefPropA) {
+ this.foorefPropA = foorefPropA;
+ }
+
+
+ @Override
+ public FooRef href(@jakarta.annotation.Nullable String href) {
+ this.setHref(href);
+ return this;
+ }
+
+ @Override
+ public FooRef id(@jakarta.annotation.Nullable String id) {
+ this.setId(id);
+ return this;
+ }
+
+ @Override
+ public FooRef atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.setAtSchemaLocation(atSchemaLocation);
+ return this;
+ }
+
+ @Override
+ public FooRef atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.setAtBaseType(atBaseType);
+ return this;
+ }
+
+ @Override
+ public FooRef atType(@jakarta.annotation.Nonnull String atType) {
+ this.setAtType(atType);
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FooRef fooRef = (FooRef) o;
+ return Objects.equals(this.foorefPropA, fooRef.foorefPropA) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(foorefPropA, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FooRef {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" foorefPropA: ").append(toIndentedString(foorefPropA)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRefOrValue.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRefOrValue.java
new file mode 100644
index 000000000000..22365160eeda
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRefOrValue.java
@@ -0,0 +1,47 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Foo;
+import org.openapitools.client.model.FooRef;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = Foo.class, name = "Foo"),
+ @JsonSubTypes.Type(value = FooRef.class, name = "FooRef"),
+})
+
+public sealed interface FooRefOrValue extends Serializable permits Foo, FooRef {
+ public String getAtType();
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Fruit.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Fruit.java
new file mode 100644
index 000000000000..d534f3d92527
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Fruit.java
@@ -0,0 +1,48 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Apple;
+import org.openapitools.client.model.Banana;
+import org.openapitools.client.model.FruitType;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "fruitType", // ignore manually set fruitType, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the fruitType to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "fruitType", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = Apple.class, name = "APPLE"),
+ @JsonSubTypes.Type(value = Banana.class, name = "BANANA"),
+})
+
+public sealed interface Fruit extends Serializable permits Apple, Banana {
+ public FruitType getFruitType();
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FruitType.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FruitType.java
new file mode 100644
index 000000000000..c02964563ac0
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FruitType.java
@@ -0,0 +1,61 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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 java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Gets or Sets FruitType
+ */
+public enum FruitType implements Serializable {
+
+ APPLE("APPLE"),
+
+ BANANA("BANANA");
+
+ private String value;
+
+ FruitType(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static FruitType fromValue(String value) {
+ for (FruitType b : FruitType.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Pasta.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Pasta.java
new file mode 100644
index 000000000000..43b38a33e73e
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Pasta.java
@@ -0,0 +1,152 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Entity;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Pasta
+ */
+@JsonPropertyOrder({
+ Pasta.JSON_PROPERTY_VENDOR
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+
+public final class Pasta extends Entity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_VENDOR = "vendor";
+ @jakarta.annotation.Nullable
+ private String vendor;
+
+ public Pasta() {
+
+ }
+
+ public Pasta vendor(@jakarta.annotation.Nullable String vendor) {
+
+ this.vendor = vendor;
+ return this;
+ }
+
+ /**
+ * Get vendor
+ * @return vendor
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_VENDOR, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getVendor() {
+ return vendor;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_VENDOR, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setVendor(@jakarta.annotation.Nullable String vendor) {
+ this.vendor = vendor;
+ }
+
+
+ @Override
+ public Pasta href(@jakarta.annotation.Nullable String href) {
+ this.setHref(href);
+ return this;
+ }
+
+ @Override
+ public Pasta id(@jakarta.annotation.Nullable String id) {
+ this.setId(id);
+ return this;
+ }
+
+ @Override
+ public Pasta atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.setAtSchemaLocation(atSchemaLocation);
+ return this;
+ }
+
+ @Override
+ public Pasta atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.setAtBaseType(atBaseType);
+ return this;
+ }
+
+ @Override
+ public Pasta atType(@jakarta.annotation.Nonnull String atType) {
+ this.setAtType(atType);
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Pasta pasta = (Pasta) o;
+ return Objects.equals(this.vendor, pasta.vendor) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(vendor, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Pasta {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" vendor: ").append(toIndentedString(vendor)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Pizza.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Pizza.java
new file mode 100644
index 000000000000..8e2790920e1f
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/Pizza.java
@@ -0,0 +1,156 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.math.BigDecimal;
+import org.openapitools.client.model.Entity;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Pizza
+ */
+@JsonPropertyOrder({
+ Pizza.JSON_PROPERTY_PIZZA_SIZE
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = PizzaSpeziale.class, name = "PizzaSpeziale"),
+})
+
+public class Pizza extends Entity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_PIZZA_SIZE = "pizzaSize";
+ @jakarta.annotation.Nullable
+ protected BigDecimal pizzaSize;
+
+ public Pizza() {
+
+ }
+
+ public Pizza pizzaSize(@jakarta.annotation.Nullable BigDecimal pizzaSize) {
+
+ this.pizzaSize = pizzaSize;
+ return this;
+ }
+
+ /**
+ * Get pizzaSize
+ * @return pizzaSize
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_PIZZA_SIZE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public BigDecimal getPizzaSize() {
+ return pizzaSize;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_PIZZA_SIZE, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setPizzaSize(@jakarta.annotation.Nullable BigDecimal pizzaSize) {
+ this.pizzaSize = pizzaSize;
+ }
+
+
+ @Override
+ public Pizza href(@jakarta.annotation.Nullable String href) {
+ this.setHref(href);
+ return this;
+ }
+
+ @Override
+ public Pizza id(@jakarta.annotation.Nullable String id) {
+ this.setId(id);
+ return this;
+ }
+
+ @Override
+ public Pizza atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.setAtSchemaLocation(atSchemaLocation);
+ return this;
+ }
+
+ @Override
+ public Pizza atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.setAtBaseType(atBaseType);
+ return this;
+ }
+
+ @Override
+ public Pizza atType(@jakarta.annotation.Nonnull String atType) {
+ this.setAtType(atType);
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Pizza pizza = (Pizza) o;
+ return Objects.equals(this.pizzaSize, pizza.pizzaSize) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(pizzaSize, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Pizza {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" pizzaSize: ").append(toIndentedString(pizzaSize)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java
new file mode 100644
index 000000000000..39fcf82bfd7a
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java
@@ -0,0 +1,153 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.math.BigDecimal;
+import org.openapitools.client.model.Pizza;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * PizzaSpeziale
+ */
+@JsonPropertyOrder({
+ PizzaSpeziale.JSON_PROPERTY_TOPPINGS
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0-SNAPSHOT")
+@JsonIgnoreProperties(
+ value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
+ allowSetters = true // allows the @type to be set during deserialization
+)
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
+
+public final class PizzaSpeziale extends Pizza implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final String JSON_PROPERTY_TOPPINGS = "toppings";
+ @jakarta.annotation.Nullable
+ private String toppings;
+
+ public PizzaSpeziale() {
+
+ }
+
+ public PizzaSpeziale toppings(@jakarta.annotation.Nullable String toppings) {
+
+ this.toppings = toppings;
+ return this;
+ }
+
+ /**
+ * Get toppings
+ * @return toppings
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(value = JSON_PROPERTY_TOPPINGS, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+
+ public String getToppings() {
+ return toppings;
+ }
+
+
+ @JsonProperty(value = JSON_PROPERTY_TOPPINGS, required = false)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setToppings(@jakarta.annotation.Nullable String toppings) {
+ this.toppings = toppings;
+ }
+
+
+ @Override
+ public PizzaSpeziale href(@jakarta.annotation.Nullable String href) {
+ this.setHref(href);
+ return this;
+ }
+
+ @Override
+ public PizzaSpeziale id(@jakarta.annotation.Nullable String id) {
+ this.setId(id);
+ return this;
+ }
+
+ @Override
+ public PizzaSpeziale atSchemaLocation(@jakarta.annotation.Nullable String atSchemaLocation) {
+ this.setAtSchemaLocation(atSchemaLocation);
+ return this;
+ }
+
+ @Override
+ public PizzaSpeziale atBaseType(@jakarta.annotation.Nullable String atBaseType) {
+ this.setAtBaseType(atBaseType);
+ return this;
+ }
+
+ @Override
+ public PizzaSpeziale atType(@jakarta.annotation.Nonnull String atType) {
+ this.setAtType(atType);
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ PizzaSpeziale pizzaSpeziale = (PizzaSpeziale) o;
+ return Objects.equals(this.toppings, pizzaSpeziale.toppings) &&
+ super.equals(o);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(toppings, super.hashCode());
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class PizzaSpeziale {\n");
+ sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" toppings: ").append(toIndentedString(toppings)).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) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/api/BarApiTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/api/BarApiTest.java
new file mode 100644
index 000000000000..8063dba60afb
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/api/BarApiTest.java
@@ -0,0 +1,49 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.Bar;
+import org.openapitools.client.model.BarCreate;
+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 BarApi
+ */
+@Disabled
+public class BarApiTest {
+
+ private final BarApi api = new BarApi();
+
+
+ /**
+ * Create a Bar
+ *
+ *
+ */
+ @Test
+ public void createBarTest() {
+ BarCreate barCreate = null;
+ Bar response = api.createBar(barCreate);
+
+ // TODO: test validations
+ }
+
+}
\ No newline at end of file
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/api/FooApiTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/api/FooApiTest.java
new file mode 100644
index 000000000000..85fc9c3b5f4d
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/api/FooApiTest.java
@@ -0,0 +1,61 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.openapitools.client.model.FooRefOrValue;
+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();
+
+
+ /**
+ * Create a Foo
+ *
+ *
+ */
+ @Test
+ public void createFooTest() {
+ Foo foo = null;
+ FooRefOrValue response = api.createFoo(foo);
+
+ // TODO: test validations
+ }
+
+ /**
+ * GET all Foos
+ *
+ *
+ */
+ @Test
+ public void getAllFoosTest() {
+ List response = api.getAllFoos();
+
+ // TODO: test validations
+ }
+
+}
\ No newline at end of file
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AddressableTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AddressableTest.java
new file mode 100644
index 000000000000..b298f46e63ea
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AddressableTest.java
@@ -0,0 +1,55 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Addressable
+ */
+class AddressableTest {
+ private final Addressable model = new Addressable();
+
+ /**
+ * Model tests for Addressable
+ */
+ @Test
+ void testAddressable() {
+ // TODO: test Addressable
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AnimalTest.java
new file mode 100644
index 000000000000..c22f4bd39218
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AnimalTest.java
@@ -0,0 +1,34 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Cat;
+import org.openapitools.client.model.Dog;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Animal
+ */
+class AnimalTest {
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AppleTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AppleTest.java
new file mode 100644
index 000000000000..ed97c849d726
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/AppleTest.java
@@ -0,0 +1,50 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Apple
+ */
+class AppleTest {
+ private final Apple model = new Apple();
+
+ /**
+ * Model tests for Apple
+ */
+ @Test
+ void testApple() {
+ // TODO: test Apple
+ }
+
+ /**
+ * Test the property 'seeds'
+ */
+ @Test
+ void seedsTest() {
+ // TODO: test seeds
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BananaTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BananaTest.java
new file mode 100644
index 000000000000..ea6cfbe742c3
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BananaTest.java
@@ -0,0 +1,50 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Banana
+ */
+class BananaTest {
+ private final Banana model = new Banana();
+
+ /**
+ * Model tests for Banana
+ */
+ @Test
+ void testBanana() {
+ // TODO: test Banana
+ }
+
+ /**
+ * Test the property 'length'
+ */
+ @Test
+ void lengthTest() {
+ // TODO: test length
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarCreateTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarCreateTest.java
new file mode 100644
index 000000000000..540c37da9f4b
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarCreateTest.java
@@ -0,0 +1,108 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Entity;
+import org.openapitools.client.model.FooRefOrValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for BarCreate
+ */
+class BarCreateTest {
+ private final BarCreate model = new BarCreate();
+
+ /**
+ * Model tests for BarCreate
+ */
+ @Test
+ void testBarCreate() {
+ // TODO: test BarCreate
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'barPropA'
+ */
+ @Test
+ void barPropATest() {
+ // TODO: test barPropA
+ }
+
+ /**
+ * Test the property 'fooPropB'
+ */
+ @Test
+ void fooPropBTest() {
+ // TODO: test fooPropB
+ }
+
+ /**
+ * Test the property 'foo'
+ */
+ @Test
+ void fooTest() {
+ // TODO: test foo
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarRefOrValueTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarRefOrValueTest.java
new file mode 100644
index 000000000000..19fb3cdae646
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarRefOrValueTest.java
@@ -0,0 +1,35 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Bar;
+import org.openapitools.client.model.BarRef;
+import org.openapitools.client.model.FooRefOrValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for BarRefOrValue
+ */
+class BarRefOrValueTest {
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarRefTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarRefTest.java
new file mode 100644
index 000000000000..615e97397057
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarRefTest.java
@@ -0,0 +1,99 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.EntityRef;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for BarRef
+ */
+class BarRefTest {
+ private final BarRef model = new BarRef();
+
+ /**
+ * Model tests for BarRef
+ */
+ @Test
+ void testBarRef() {
+ // TODO: test BarRef
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'name'
+ */
+ @Test
+ void nameTest() {
+ // TODO: test name
+ }
+
+ /**
+ * Test the property 'atReferredType'
+ */
+ @Test
+ void atReferredTypeTest() {
+ // TODO: test atReferredType
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarTest.java
new file mode 100644
index 000000000000..ab738ded1d0a
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/BarTest.java
@@ -0,0 +1,108 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Entity;
+import org.openapitools.client.model.FooRefOrValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Bar
+ */
+class BarTest {
+ private final Bar model = new Bar();
+
+ /**
+ * Model tests for Bar
+ */
+ @Test
+ void testBar() {
+ // TODO: test Bar
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'barPropA'
+ */
+ @Test
+ void barPropATest() {
+ // TODO: test barPropA
+ }
+
+ /**
+ * Test the property 'fooPropB'
+ */
+ @Test
+ void fooPropBTest() {
+ // TODO: test fooPropB
+ }
+
+ /**
+ * Test the property 'foo'
+ */
+ @Test
+ void fooTest() {
+ // TODO: test foo
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/CatTest.java
new file mode 100644
index 000000000000..aee81afeb24d
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/CatTest.java
@@ -0,0 +1,47 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Cat
+ */
+class CatTest {
+ private final Cat model = new Cat();
+
+ /**
+ * Model tests for Cat
+ */
+ @Test
+ void testCat() {
+ // TODO: test Cat
+ }
+
+ /**
+ * Test the property 'declawed'
+ */
+ @Test
+ void declawedTest() {
+ // TODO: test declawed
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/DogTest.java
new file mode 100644
index 000000000000..86b2d87bd2f9
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/DogTest.java
@@ -0,0 +1,47 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Dog
+ */
+class DogTest {
+ private final Dog model = new Dog();
+
+ /**
+ * Model tests for Dog
+ */
+ @Test
+ void testDog() {
+ // TODO: test Dog
+ }
+
+ /**
+ * Test the property 'bark'
+ */
+ @Test
+ void barkTest() {
+ // TODO: test bark
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/EntityRefTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/EntityRefTest.java
new file mode 100644
index 000000000000..a025334444d4
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/EntityRefTest.java
@@ -0,0 +1,98 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for EntityRef
+ */
+class EntityRefTest {
+ private final EntityRef model = new EntityRef();
+
+ /**
+ * Model tests for EntityRef
+ */
+ @Test
+ void testEntityRef() {
+ // TODO: test EntityRef
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'name'
+ */
+ @Test
+ void nameTest() {
+ // TODO: test name
+ }
+
+ /**
+ * Test the property 'atReferredType'
+ */
+ @Test
+ void atReferredTypeTest() {
+ // TODO: test atReferredType
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/EntityTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/EntityTest.java
new file mode 100644
index 000000000000..8968b6539047
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/EntityTest.java
@@ -0,0 +1,82 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Entity
+ */
+class EntityTest {
+ private final Entity model = new Entity();
+
+ /**
+ * Model tests for Entity
+ */
+ @Test
+ void testEntity() {
+ // TODO: test Entity
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/ExtensibleTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/ExtensibleTest.java
new file mode 100644
index 000000000000..2d4da7dbf7a6
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/ExtensibleTest.java
@@ -0,0 +1,63 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Extensible
+ */
+class ExtensibleTest {
+ private final Extensible model = new Extensible();
+
+ /**
+ * Model tests for Extensible
+ */
+ @Test
+ void testExtensible() {
+ // TODO: test Extensible
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooRefOrValueTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooRefOrValueTest.java
new file mode 100644
index 000000000000..e2e3d98ab759
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooRefOrValueTest.java
@@ -0,0 +1,34 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Foo;
+import org.openapitools.client.model.FooRef;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for FooRefOrValue
+ */
+class FooRefOrValueTest {
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooRefTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooRefTest.java
new file mode 100644
index 000000000000..1fb3e29c9bed
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooRefTest.java
@@ -0,0 +1,107 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.EntityRef;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for FooRef
+ */
+class FooRefTest {
+ private final FooRef model = new FooRef();
+
+ /**
+ * Model tests for FooRef
+ */
+ @Test
+ void testFooRef() {
+ // TODO: test FooRef
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'name'
+ */
+ @Test
+ void nameTest() {
+ // TODO: test name
+ }
+
+ /**
+ * Test the property 'atReferredType'
+ */
+ @Test
+ void atReferredTypeTest() {
+ // TODO: test atReferredType
+ }
+
+ /**
+ * Test the property 'foorefPropA'
+ */
+ @Test
+ void foorefPropATest() {
+ // TODO: test foorefPropA
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooTest.java
new file mode 100644
index 000000000000..709c03512acd
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FooTest.java
@@ -0,0 +1,99 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Entity;
+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 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'fooPropA'
+ */
+ @Test
+ void fooPropATest() {
+ // TODO: test fooPropA
+ }
+
+ /**
+ * Test the property 'fooPropB'
+ */
+ @Test
+ void fooPropBTest() {
+ // TODO: test fooPropB
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FruitTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FruitTest.java
new file mode 100644
index 000000000000..cc1adc4a88e5
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FruitTest.java
@@ -0,0 +1,35 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Apple;
+import org.openapitools.client.model.Banana;
+import org.openapitools.client.model.FruitType;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Fruit
+ */
+class FruitTest {
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FruitTypeTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FruitTypeTest.java
new file mode 100644
index 000000000000..63738bea136e
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/FruitTypeTest.java
@@ -0,0 +1,32 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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 org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for FruitType
+ */
+class FruitTypeTest {
+ /**
+ * Model tests for FruitType
+ */
+ @Test
+ void testFruitType() {
+ // TODO: test FruitType
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PastaTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PastaTest.java
new file mode 100644
index 000000000000..68101ad5fac4
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PastaTest.java
@@ -0,0 +1,91 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.client.model.Entity;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Pasta
+ */
+class PastaTest {
+ private final Pasta model = new Pasta();
+
+ /**
+ * Model tests for Pasta
+ */
+ @Test
+ void testPasta() {
+ // TODO: test Pasta
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'vendor'
+ */
+ @Test
+ void vendorTest() {
+ // TODO: test vendor
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PizzaSpezialeTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PizzaSpezialeTest.java
new file mode 100644
index 000000000000..1a8d714b75b0
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PizzaSpezialeTest.java
@@ -0,0 +1,100 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.math.BigDecimal;
+import org.openapitools.client.model.Pizza;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for PizzaSpeziale
+ */
+class PizzaSpezialeTest {
+ private final PizzaSpeziale model = new PizzaSpeziale();
+
+ /**
+ * Model tests for PizzaSpeziale
+ */
+ @Test
+ void testPizzaSpeziale() {
+ // TODO: test PizzaSpeziale
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'pizzaSize'
+ */
+ @Test
+ void pizzaSizeTest() {
+ // TODO: test pizzaSize
+ }
+
+ /**
+ * Test the property 'toppings'
+ */
+ @Test
+ void toppingsTest() {
+ // TODO: test toppings
+ }
+
+}
diff --git a/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PizzaTest.java b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PizzaTest.java
new file mode 100644
index 000000000000..f5431d272861
--- /dev/null
+++ b/samples/client/others/java/restclient-sealedInterface/src/test/java/org/openapitools/client/model/PizzaTest.java
@@ -0,0 +1,92 @@
+/*
+ * ByRefOrValue
+ * This tests for a oneOf interface representation
+ *
+ * The version of the OpenAPI document: 0.0.1
+ *
+ *
+ * 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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.math.BigDecimal;
+import org.openapitools.client.model.Entity;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Model tests for Pizza
+ */
+class PizzaTest {
+ private final Pizza model = new Pizza();
+
+ /**
+ * Model tests for Pizza
+ */
+ @Test
+ void testPizza() {
+ // TODO: test Pizza
+ }
+
+ /**
+ * Test the property 'href'
+ */
+ @Test
+ void hrefTest() {
+ // TODO: test href
+ }
+
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'atSchemaLocation'
+ */
+ @Test
+ void atSchemaLocationTest() {
+ // TODO: test atSchemaLocation
+ }
+
+ /**
+ * Test the property 'atBaseType'
+ */
+ @Test
+ void atBaseTypeTest() {
+ // TODO: test atBaseType
+ }
+
+ /**
+ * Test the property 'atType'
+ */
+ @Test
+ void atTypeTest() {
+ // TODO: test atType
+ }
+
+ /**
+ * Test the property 'pizzaSize'
+ */
+ @Test
+ void pizzaSizeTest() {
+ // TODO: test pizzaSize
+ }
+
+}