From 814ee9b78c192f60628f05a483f1490109bed10d Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Sun, 29 Sep 2024 17:52:03 +0300 Subject: [PATCH 01/12] spring-http-interface: introduce `springHttpClientAdapter`, fix `paramDoc.mustache` --- ### What - Introduce `springHttpClientAdapter` for `spring-http-interface` - This property is used for selecting HTTP client implementation in Spring HTTP interfaces, with separate templates for each client configuration - Added an `spring-http-interface`-specific **empty** `paramDoc.mustache` --- ### Why - Enable selecting different HTTP client implementations when generating Spring HTTP client interfaces - Provides additional flexibility for users who want to generate non-reactive Spring Boot applications. --- ### How - `springHttpClientAdapter`: Allows users to choose between different HTTP client implementations used in `HttpInterfacesAbstractConfigurator`: - `web-client` (set by default, to ensure **backward compatibility**) - `rest-client` - `rest-template` - Separate templates for each `HttpInterfacesAbstractConfigurator` implementation: - `httpInterfacesRestClientConfiguration.mustache` - `httpInterfacesRestTemplateConfiguration.mustache` - `httpInterfacesWebClientConfiguration.mustache` - Log warning for configuration mismatch - When `reactive: false` is used in combination with the reactive `web-client`, it warns users of potential configuration mismatches, and suggests switching to `rest-template` or `rest-client` for non-reactive configurations. - Remove unnecessary paramDoc - Added an `spring-http-interface`-specific **empty** `paramDoc.mustache` in `JavaSpring/libraries/spring-http-interface/paramDoc.mustache` - This prevents inheriting the `@Parameter` annotations from the default Spring template located at `JavaSpring/paramDoc.mustache`. - Otherwise, the generated code includes `@Parameter` annotations on request body parameters, which were causing compile errors due to missing imports --- ### Testing Done - **Manual testing**: Verified that the generated code uses `WebClient`, `RestTemplate`, or `RestClient` based on the value of the `springHttpClientAdapter` property. - **Tested different configurations**: - **`reactive: false` & `web-client`**: Logs a warning, suggesting the use of `rest-client` or `rest-template`. - **`springHttpClientAdapter: rest-template`**: Generates code with `RestTemplateAdapter` using the `httpInterfacesRestTemplateConfiguration.mustache`. - **`springHttpClientAdapter: web-client` (default)**: Generates code using `WebClientAdapter` from `httpInterfacesWebClientConfiguration.mustache` and ensures backward compatibility. - **Tested `paramDoc.mustache` change**: Verified that the empty `paramDoc.mustache` prevents the generation of `@Parameter` annotations on request body parameters and resolves the compile errors caused by missing imports. --- ### PR checklist - [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md). - [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. - [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples: ``` ./mvnw clean package ./bin/generate-samples.sh ./bin/configs/*.yaml ./bin/utils/export_docs_generators.sh ``` (For Windows users, please run the script in [Git BASH](https://gitforwindows.org/)) Commit all changed files. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`. IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed. - [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming `7.x.0` minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks) - [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request. --- .../codegen/languages/SpringCodegen.java | 83 +++++++++++-------- ...InterfacesRestClientConfiguration.mustache | 38 +++++++++ ...terfacesRestTemplateConfiguration.mustache | 38 +++++++++ ...InterfacesWebClientConfiguration.mustache} | 2 +- .../spring-http-interface/paramDoc.mustache | 0 5 files changed, 126 insertions(+), 35 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache rename modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/{httpInterfacesConfiguration.mustache => httpInterfacesWebClientConfiguration.mustache} (94%) create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/paramDoc.mustache diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index cb3c52a99c75..db4301b7c47b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -17,10 +17,6 @@ package org.openapitools.codegen.languages; -import static org.apache.commons.lang3.StringUtils.isNotEmpty; -import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; -import static org.openapitools.codegen.utils.StringUtils.camelize; - import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; @@ -30,39 +26,14 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.tags.Tag; -import java.io.File; -import java.net.URL; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - import lombok.Getter; +import lombok.RequiredArgsConstructor; import lombok.Setter; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.CodegenParameter; -import org.openapitools.codegen.CodegenProperty; -import org.openapitools.codegen.CodegenResponse; -import org.openapitools.codegen.CodegenSecurity; -import org.openapitools.codegen.CodegenType; -import org.openapitools.codegen.SupportingFile; -import org.openapitools.codegen.VendorExtension; -import org.openapitools.codegen.languages.features.BeanValidationFeatures; -import org.openapitools.codegen.languages.features.DocumentationProviderFeatures; -import org.openapitools.codegen.languages.features.OptionalFeatures; -import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; -import org.openapitools.codegen.languages.features.SwaggerUIFeatures; -import org.openapitools.codegen.meta.features.DocumentationFeature; -import org.openapitools.codegen.meta.features.GlobalFeature; -import org.openapitools.codegen.meta.features.ParameterFeature; -import org.openapitools.codegen.meta.features.SchemaSupportFeature; -import org.openapitools.codegen.meta.features.SecurityFeature; -import org.openapitools.codegen.meta.features.WireFormatFeature; +import org.openapitools.codegen.*; +import org.openapitools.codegen.languages.features.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.model.ModelMap; import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.model.OperationMap; @@ -75,6 +46,18 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.File; +import java.net.URL; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static org.apache.commons.lang3.StringUtils.isNotEmpty; +import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; +import static org.openapitools.codegen.utils.StringUtils.camelize; + public class SpringCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, PerformBeanValidationFeatures, OptionalFeatures, SwaggerUIFeatures { private final Logger LOGGER = LoggerFactory.getLogger(SpringCodegen.class); @@ -102,6 +85,7 @@ public class SpringCodegen extends AbstractJavaCodegen public static final String SPRING_BOOT = "spring-boot"; public static final String SPRING_CLOUD_LIBRARY = "spring-cloud"; public static final String SPRING_HTTP_INTERFACE = "spring-http-interface"; + public static final String SPRING_HTTP_CLIENT_ADAPTER = "springHttpClientAdapter"; public static final String API_FIRST = "apiFirst"; public static final String SPRING_CONTROLLER = "useSpringController"; public static final String HATEOAS = "hateoas"; @@ -126,6 +110,25 @@ public class SpringCodegen extends AbstractJavaCodegen } } + @Getter + @RequiredArgsConstructor + public enum SpringHttpClientAdapter { + web_client("web-client", "Use RestClientAdapter", "httpInterfacesWebClientConfiguration.mustache"), + rest_client("rest-client", "Use RestClientAdapter", "httpInterfacesRestClientConfiguration.mustache"), + rest_template("rest-template", "Use RestTemplateAdapter", "httpInterfacesRestTemplateConfiguration.mustache"); + + private final String key; + private final String description; + private final String templateFileName; + + static SpringHttpClientAdapter fromKey(String key) { + return Stream.of(values()).filter(value -> value.getKey().equals(key)).findFirst().orElseThrow( + () -> new IllegalArgumentException("Invalid SpringHttpClientAdapter key: " + key) + ); + } + + } + public static final String OPEN_BRACE = "{"; public static final String CLOSE_BRACE = "}"; @@ -165,6 +168,7 @@ public class SpringCodegen extends AbstractJavaCodegen protected boolean generatedConstructorWithRequiredArgs = true; @Getter @Setter protected RequestMappingMode requestMappingMode = RequestMappingMode.controller; + @Setter SpringHttpClientAdapter springHttpClientAdapter; public SpringCodegen() { super(); @@ -268,6 +272,10 @@ public SpringCodegen() { generatedConstructorWithRequiredArgs)); cliOptions.add(new CliOption(RESOURCE_FOLDER, RESOURCE_FOLDER_DESC).defaultValue(this.getResourceFolder())); + cliOptions.add(CliOption.newString(SPRING_HTTP_CLIENT_ADAPTER, + "Allows users to choose between different HTTP client implementations for Spring HTTP interfaces (`web-client`, `rest-client`, `rest-template`).") + .defaultValue(SpringHttpClientAdapter.web_client.getKey() + )); supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application."); supportedLibraries.put(SPRING_CLOUD_LIBRARY, "Spring-Cloud-Feign client with Spring-Boot auto-configured settings."); @@ -443,7 +451,9 @@ public void processOpts() { useJakartaEe=true; applyJakartaPackage(); } + convertPropertyToStringAndWriteBack(RESOURCE_FOLDER, this::setResourceFolder); + convertPropertyToTypeAndWriteBack(SPRING_HTTP_CLIENT_ADAPTER, SpringHttpClientAdapter::fromKey, this::setSpringHttpClientAdapter); typeMapping.put("file", "org.springframework.core.io.Resource"); importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource"); @@ -528,7 +538,12 @@ public void processOpts() { } } } else if (SPRING_HTTP_INTERFACE.equals(library)) { - supportingFiles.add(new SupportingFile("httpInterfacesConfiguration.mustache", + if (!reactive && springHttpClientAdapter == SpringHttpClientAdapter.web_client) { + LOGGER.warn("Configuration mismatch: The 'web-client' is selected as the HTTP client adapter, " + + "but 'reactive' is set to 'false'. " + + "Consider using 'rest-template' or 'rest-client' for non-reactive configurations."); + } + supportingFiles.add(new SupportingFile(springHttpClientAdapter.getTemplateFileName(), (sourceFolder + File.separator + configPackage).replace(".", java.io.File.separator), "HttpInterfacesAbstractConfigurator.java")); writePropertyBack(USE_BEANVALIDATION, false); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache new file mode 100644 index 000000000000..47aae980e77a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache @@ -0,0 +1,38 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package {{configPackage}}; + +{{#apiInfo}} + {{#apis}} +import {{apiPackage}}.{{classname}}; + {{/apis}} +{{/apiInfo}} + +import org.springframework.context.annotation.Bean; +import org.springframework.web.client.RestClient; +import org.springframework.web.client.support.RestClientAdapter; +import org.springframework.web.service.invoker.HttpServiceProxyFactory; + +public abstract class HttpInterfacesAbstractConfigurator { + + private final RestClient restClient; + + public HttpInterfacesAbstractConfigurator(final RestClient restClient) { + this.restClient = restClient; + } + +{{#apiInfo}} +{{#apis}} + @Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") + {{classname}} {{classVarName}}HttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(restClient)).build(); + return factory.createClient({{classname}}.class); + } + +{{/apis}} +{{/apiInfo}} + +} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache new file mode 100644 index 000000000000..aaee8c724370 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache @@ -0,0 +1,38 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package {{configPackage}}; + +{{#apiInfo}} + {{#apis}} +import {{apiPackage}}.{{classname}}; + {{/apis}} +{{/apiInfo}} + +import org.springframework.context.annotation.Bean; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.client.support.RestTemplateAdapter; +import org.springframework.web.service.invoker.HttpServiceProxyFactory; + +public abstract class HttpInterfacesAbstractConfigurator { + + private final RestTemplate restTemplate; + + public HttpInterfacesAbstractConfigurator(final RestTemplate restTemplate) { + this.restTemplate = restTemplate; + } + +{{#apiInfo}} +{{#apis}} + @Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") + {{classname}} {{classVarName}}HttpProxy() { + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestTemplateAdapter.create(restTemplate)).build(); + return factory.createClient({{classname}}.class); + } + +{{/apis}} +{{/apiInfo}} + +} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache similarity index 94% rename from modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache rename to modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache index 6e92c83f51c8..26a44b106557 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache @@ -28,7 +28,7 @@ public abstract class HttpInterfacesAbstractConfigurator { {{#apis}} @Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") {{classname}} {{classVarName}}HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient({{classname}}.class); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/paramDoc.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/paramDoc.mustache new file mode 100644 index 000000000000..e69de29bb2d1 From f1bbe1b6eb6d7d9004c44dacd5307235b31ec20a Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Sun, 29 Sep 2024 18:44:52 +0300 Subject: [PATCH 02/12] fix imports --- .../codegen/languages/SpringCodegen.java | 49 +++++++++++++------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index db4301b7c47b..70afcfc1bd3c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -17,6 +17,10 @@ package org.openapitools.codegen.languages; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; +import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; +import static org.openapitools.codegen.utils.StringUtils.camelize; + import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; @@ -26,14 +30,41 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.tags.Tag; +import java.io.File; +import java.net.URL; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; -import org.openapitools.codegen.*; -import org.openapitools.codegen.languages.features.*; -import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.CliOption; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.CodegenResponse; +import org.openapitools.codegen.CodegenSecurity; +import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.VendorExtension; +import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.languages.features.DocumentationProviderFeatures; +import org.openapitools.codegen.languages.features.OptionalFeatures; +import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; +import org.openapitools.codegen.languages.features.SwaggerUIFeatures; +import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.meta.features.GlobalFeature; +import org.openapitools.codegen.meta.features.ParameterFeature; +import org.openapitools.codegen.meta.features.SchemaSupportFeature; +import org.openapitools.codegen.meta.features.SecurityFeature; +import org.openapitools.codegen.meta.features.WireFormatFeature; import org.openapitools.codegen.model.ModelMap; import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.model.OperationMap; @@ -46,18 +77,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.File; -import java.net.URL; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static org.apache.commons.lang3.StringUtils.isNotEmpty; -import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; -import static org.openapitools.codegen.utils.StringUtils.camelize; - public class SpringCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, PerformBeanValidationFeatures, OptionalFeatures, SwaggerUIFeatures { private final Logger LOGGER = LoggerFactory.getLogger(SpringCodegen.class); From 4e03298fe4bc7ad0bdf54c57e56ea2b07f819e4a Mon Sep 17 00:00:00 2001 From: Ionut Baranga <1544344+ibaranga@users.noreply.github.com> Date: Sun, 29 Sep 2024 19:41:58 +0300 Subject: [PATCH 03/12] Update SpringCodegen.java --- .../java/org/openapitools/codegen/languages/SpringCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 70afcfc1bd3c..47b26002c3f1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -132,7 +132,7 @@ public class SpringCodegen extends AbstractJavaCodegen @Getter @RequiredArgsConstructor public enum SpringHttpClientAdapter { - web_client("web-client", "Use RestClientAdapter", "httpInterfacesWebClientConfiguration.mustache"), + web_client("web-client", "Use WebClientAdapter", "httpInterfacesWebClientConfiguration.mustache"), rest_client("rest-client", "Use RestClientAdapter", "httpInterfacesRestClientConfiguration.mustache"), rest_template("rest-template", "Use RestTemplateAdapter", "httpInterfacesRestTemplateConfiguration.mustache"); From 0f9bfb14f0d0bc3e46045347b664fa54bc090da8 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Tue, 1 Oct 2024 15:30:34 +0300 Subject: [PATCH 04/12] fix docs and default value --- docs/generators/java-camel.md | 1 + docs/generators/spring.md | 1 + .../org/openapitools/codegen/languages/SpringCodegen.java | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index e77c38151eb3..055498e71fae 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -92,6 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|springHttpClientAdapter|Allows users to choose between different HTTP client implementations for Spring HTTP interfaces (`web-client`, `rest-client`, `rest-template`).| |web-client| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |OpenAPI Spring| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index b71cefb3c126..2673ed2f54c0 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -85,6 +85,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| +|springHttpClientAdapter|Allows users to choose between different HTTP client implementations for Spring HTTP interfaces (`web-client`, `rest-client`, `rest-template`).| |web-client| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |OpenAPI Spring| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 70afcfc1bd3c..5a4aabe9c457 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -187,7 +187,7 @@ static SpringHttpClientAdapter fromKey(String key) { protected boolean generatedConstructorWithRequiredArgs = true; @Getter @Setter protected RequestMappingMode requestMappingMode = RequestMappingMode.controller; - @Setter SpringHttpClientAdapter springHttpClientAdapter; + @Setter SpringHttpClientAdapter springHttpClientAdapter = SpringHttpClientAdapter.web_client; public SpringCodegen() { super(); @@ -293,8 +293,8 @@ public SpringCodegen() { cliOptions.add(CliOption.newString(SPRING_HTTP_CLIENT_ADAPTER, "Allows users to choose between different HTTP client implementations for Spring HTTP interfaces (`web-client`, `rest-client`, `rest-template`).") - .defaultValue(SpringHttpClientAdapter.web_client.getKey() - )); + .defaultValue(SpringHttpClientAdapter.web_client.getKey()) + ); supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application."); supportedLibraries.put(SPRING_CLOUD_LIBRARY, "Spring-Cloud-Feign client with Spring-Boot auto-configured settings."); From 4c3bdaecdf301fcaa5c7fecf3c8a454204283bb0 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Tue, 1 Oct 2024 17:34:10 +0300 Subject: [PATCH 05/12] fix docs and default value --- .../HttpInterfacesAbstractConfigurator.java | 12 ++++++------ .../HttpInterfacesAbstractConfigurator.java | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index d54d21f28851..70c2dc3733b8 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -27,37 +27,37 @@ public HttpInterfacesAbstractConfigurator(final WebClient webClient) { @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") AnotherFakeApi anotherFakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(AnotherFakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") FakeApi fakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(FakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(FakeClassnameTags123Api.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") PetApi petHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(PetApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") StoreApi storeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(StoreApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") UserApi userHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(UserApi.class); } diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index d54d21f28851..70c2dc3733b8 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -27,37 +27,37 @@ public HttpInterfacesAbstractConfigurator(final WebClient webClient) { @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") AnotherFakeApi anotherFakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(AnotherFakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") FakeApi fakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(FakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(FakeClassnameTags123Api.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") PetApi petHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(PetApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") StoreApi storeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(StoreApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") UserApi userHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(UserApi.class); } From 6addc9a67e8c5c0363bab67dc885ca2a734b4866 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Wed, 16 Oct 2024 20:42:49 +0300 Subject: [PATCH 06/12] revert to HttpServiceProxyFactory.builder for backward compatibility --- .../httpInterfacesRestClientConfiguration.mustache | 2 +- .../httpInterfacesRestTemplateConfiguration.mustache | 2 +- .../httpInterfacesWebClientConfiguration.mustache | 2 +- .../HttpInterfacesAbstractConfigurator.java | 12 ++++++------ .../HttpInterfacesAbstractConfigurator.java | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache index 47aae980e77a..9a1b2cec2843 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache @@ -28,7 +28,7 @@ public abstract class HttpInterfacesAbstractConfigurator { {{#apis}} @Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") {{classname}} {{classVarName}}HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestClientAdapter.create(restClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(RestClientAdapter.create(restClient)).build(); return factory.createClient({{classname}}.class); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache index aaee8c724370..1540cf43bc13 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache @@ -28,7 +28,7 @@ public abstract class HttpInterfacesAbstractConfigurator { {{#apis}} @Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") {{classname}} {{classVarName}}HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(RestTemplateAdapter.create(restTemplate)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(RestTemplateAdapter.create(restTemplate)).build(); return factory.createClient({{classname}}.class); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache index 26a44b106557..6e92c83f51c8 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache @@ -28,7 +28,7 @@ public abstract class HttpInterfacesAbstractConfigurator { {{#apis}} @Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") {{classname}} {{classVarName}}HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient({{classname}}.class); } diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index 450eb8fbb04e..0b4b212d8677 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -27,37 +27,37 @@ public HttpInterfacesAbstractConfigurator(final WebClient webClient) { @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") AnotherFakeApi anotherFakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(AnotherFakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") FakeApi fakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(FakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(FakeClassnameTags123Api.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") PetApi petHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(PetApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") StoreApi storeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(StoreApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") UserApi userHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(UserApi.class); } diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index 450eb8fbb04e..0b4b212d8677 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -27,37 +27,37 @@ public HttpInterfacesAbstractConfigurator(final WebClient webClient) { @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") AnotherFakeApi anotherFakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(AnotherFakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") FakeApi fakeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(FakeApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(FakeClassnameTags123Api.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") PetApi petHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(PetApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") StoreApi storeHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(StoreApi.class); } @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") UserApi userHttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.forClient(webClient)).build(); + HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(webClient)).build(); return factory.createClient(UserApi.class); } From 6a55e5deb1eea0ece8526bdaf79488efe816c5d1 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Sat, 30 Nov 2024 16:01:42 +0200 Subject: [PATCH 07/12] spring-http-interface: introduce `useHttpServiceProxyFactoryInterfacesConfiguration` config --- .github/workflows/samples-jdk17.yaml | 3 + ...ceProxyFactoryInterfacesConfiguration.yaml | 21 + docs/generators/java-camel.md | 2 +- docs/generators/spring.md | 2 +- .../codegen/languages/SpringCodegen.java | 52 +- .../spring-http-interface/README.mustache | 6 +- ...e => httpInterfacesConfiguration.mustache} | 0 ...terfacesRestTemplateConfiguration.mustache | 38 - ...xyFactoryInterfacesConfiguration.mustache} | 7 +- .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 59 ++ .../.openapi-generator/VERSION | 1 + .../README.md | 21 + .../pom.xml | 75 ++ .../org/openapitools/api/AnotherFakeApi.java | 40 + .../java/org/openapitools/api/FakeApi.java | 377 ++++++++ .../api/FakeClassnameTags123Api.java | 40 + .../java/org/openapitools/api/PetApi.java | 224 +++++ .../java/org/openapitools/api/StoreApi.java | 95 ++ .../java/org/openapitools/api/UserApi.java | 171 ++++ .../HttpInterfacesAbstractConfigurator.java | 59 ++ .../model/AdditionalPropertiesAnyType.java | 124 +++ .../model/AdditionalPropertiesArray.java | 125 +++ .../model/AdditionalPropertiesBoolean.java | 124 +++ .../model/AdditionalPropertiesClass.java | 400 +++++++++ .../model/AdditionalPropertiesInteger.java | 124 +++ .../model/AdditionalPropertiesNumber.java | 125 +++ .../model/AdditionalPropertiesObject.java | 125 +++ .../model/AdditionalPropertiesString.java | 124 +++ .../java/org/openapitools/model/Animal.java | 128 +++ .../model/ArrayOfArrayOfNumberOnly.java | 93 ++ .../openapitools/model/ArrayOfNumberOnly.java | 93 ++ .../org/openapitools/model/ArrayTest.java | 157 ++++ .../java/org/openapitools/model/BigCat.java | 153 ++++ .../openapitools/model/Capitalization.java | 195 +++++ .../main/java/org/openapitools/model/Cat.java | 116 +++ .../java/org/openapitools/model/Category.java | 114 +++ .../openapitools/model/ChildWithNullable.java | 111 +++ .../org/openapitools/model/ClassModel.java | 80 ++ .../java/org/openapitools/model/Client.java | 80 ++ .../model/ContainerDefaultValue.java | 213 +++++ .../main/java/org/openapitools/model/Dog.java | 108 +++ .../org/openapitools/model/EnumArrays.java | 186 ++++ .../org/openapitools/model/EnumClass.java | 56 ++ .../java/org/openapitools/model/EnumTest.java | 331 +++++++ .../java/org/openapitools/model/File.java | 80 ++ .../model/FileSchemaTestClass.java | 116 +++ .../org/openapitools/model/FormatTest.java | 413 +++++++++ .../openapitools/model/HasOnlyReadOnly.java | 105 +++ .../java/org/openapitools/model/MapTest.java | 223 +++++ ...ropertiesAndAdditionalPropertiesClass.java | 142 +++ .../openapitools/model/Model200Response.java | 105 +++ .../openapitools/model/ModelApiResponse.java | 128 +++ .../org/openapitools/model/ModelList.java | 82 ++ .../org/openapitools/model/ModelReturn.java | 82 ++ .../java/org/openapitools/model/Name.java | 160 ++++ .../model/NullableMapProperty.java | 105 +++ .../org/openapitools/model/NumberOnly.java | 81 ++ .../java/org/openapitools/model/Order.java | 236 +++++ .../openapitools/model/OuterComposite.java | 127 +++ .../org/openapitools/model/OuterEnum.java | 56 ++ .../model/ParentWithNullable.java | 163 ++++ .../main/java/org/openapitools/model/Pet.java | 279 ++++++ .../org/openapitools/model/ReadOnlyFirst.java | 103 +++ ...ResponseObjectWithDifferentFieldNames.java | 149 ++++ .../openapitools/model/SpecialModelName.java | 82 ++ .../main/java/org/openapitools/model/Tag.java | 103 +++ .../openapitools/model/TypeHolderDefault.java | 200 +++++ .../openapitools/model/TypeHolderExample.java | 224 +++++ .../java/org/openapitools/model/User.java | 241 ++++++ .../java/org/openapitools/model/XmlItem.java | 809 ++++++++++++++++++ 71 files changed, 9315 insertions(+), 80 deletions(-) create mode 100644 bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml rename modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/{httpInterfacesWebClientConfiguration.mustache => httpInterfacesConfiguration.mustache} (100%) delete mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache rename modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/{httpInterfacesRestClientConfiguration.mustache => httpServiceProxyFactoryInterfacesConfiguration.mustache} (75%) create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator-ignore create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/FILES create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/VERSION create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/README.md create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/pom.xml create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeApi.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesString.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Animal.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/BigCat.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Capitalization.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Cat.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ClassModel.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Client.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ContainerDefaultValue.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumClass.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumTest.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/File.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FileSchemaTestClass.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FormatTest.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/HasOnlyReadOnly.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MapTest.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Model200Response.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelList.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelReturn.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Name.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NullableMapProperty.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NumberOnly.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderDefault.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderExample.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/User.java create mode 100644 samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/XmlItem.java diff --git a/.github/workflows/samples-jdk17.yaml b/.github/workflows/samples-jdk17.yaml index 0a550c28f96d..fe2580523e9e 100644 --- a/.github/workflows/samples-jdk17.yaml +++ b/.github/workflows/samples-jdk17.yaml @@ -10,6 +10,7 @@ on: - samples/client/petstore/spring-http-interface/** - samples/client/petstore/spring-http-interface-reactive-noResponseEntity/** - samples/client/petstore/spring-http-interface-noResponseEntity/** + - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/** - samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/microprofile-rest-client-outer-enum/** # servers @@ -27,6 +28,7 @@ on: - samples/client/petstore/spring-http-interface/** - samples/client/petstore/spring-http-interface-reactive-noResponseEntity/** - samples/client/petstore/spring-http-interface-noResponseEntity/** + - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/** - samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/microprofile-rest-client-outer-enum/** # servers @@ -50,6 +52,7 @@ jobs: - samples/client/petstore/spring-http-interface - samples/client/petstore/spring-http-interface-reactive-noResponseEntity - samples/client/petstore/spring-http-interface-noResponseEntity + - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration - samples/client/petstore/java/webclient-jakarta - samples/client/petstore/java/microprofile-rest-client-outer-enum # servers diff --git a/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml b/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml new file mode 100644 index 000000000000..ec26ee0adecf --- /dev/null +++ b/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml @@ -0,0 +1,21 @@ +generatorName: spring +library: spring-http-interface +outputDir: samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration +inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration + snapshotVersion: "true" + hideGenerationTimestamp: "true" + # documentation provider should be ignored + documentationProvider: "springdoc" + # annotation provider should be ignored + annotationLibrary: "swagger2" + # validation should be ignored + useBeanValidation: "true" + performBeanValidation: "true" + useHttpServiceProxyFactoryInterfacesConfiguration: "true" + # needed until updating the default parentVersion (3.1.3) to 3.2+ + parentGroupId: "org.springframework.boot" + parentArtifactId: "spring-boot-starter-parent" + parentVersion: "3.2.0" diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 51bf5c2701f5..7a4e478a1cdf 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -93,13 +93,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| -|springHttpClientAdapter|Allows users to choose between different HTTP client implementations for Spring HTTP interfaces (`web-client`, `rest-client`, `rest-template`).| |web-client| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |OpenAPI Spring| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| |useBeanValidation|Use BeanValidation API annotations| |true| |useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false| |useFeignClientUrl|Whether to generate Feign client with url parameter.| |true| +|useHttpServiceProxyFactoryInterfacesConfiguration|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.| |false| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| |useOptional|Use Optional container for optional parameters| |false| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 7a922d32a4df..c42a58115815 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -86,13 +86,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |src/main/java| -|springHttpClientAdapter|Allows users to choose between different HTTP client implementations for Spring HTTP interfaces (`web-client`, `rest-client`, `rest-template`).| |web-client| |testOutput|Set output folder for models and APIs tests| |${project.build.directory}/generated-test-sources/openapi| |title|server title name or client service name| |OpenAPI Spring| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| |useBeanValidation|Use BeanValidation API annotations| |true| |useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false| |useFeignClientUrl|Whether to generate Feign client with url parameter.| |true| +|useHttpServiceProxyFactoryInterfacesConfiguration|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.| |false| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| |useOptional|Use Optional container for optional parameters| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 912d9d7112cb..7bbeae43ade5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -36,10 +36,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; -import java.util.stream.Stream; import lombok.Getter; -import lombok.RequiredArgsConstructor; import lombok.Setter; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; @@ -104,7 +102,8 @@ public class SpringCodegen extends AbstractJavaCodegen public static final String SPRING_BOOT = "spring-boot"; public static final String SPRING_CLOUD_LIBRARY = "spring-cloud"; public static final String SPRING_HTTP_INTERFACE = "spring-http-interface"; - public static final String SPRING_HTTP_CLIENT_ADAPTER = "springHttpClientAdapter"; + public static final String USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION = "useHttpServiceProxyFactoryInterfacesConfiguration"; + public static final String HTTP_INTERFACES_CONFIGURATOR_DEPENDENCY = "httpInterfacesConfiguratorDependency"; public static final String API_FIRST = "apiFirst"; public static final String SPRING_CONTROLLER = "useSpringController"; public static final String HATEOAS = "hateoas"; @@ -129,25 +128,6 @@ public class SpringCodegen extends AbstractJavaCodegen } } - @Getter - @RequiredArgsConstructor - public enum SpringHttpClientAdapter { - web_client("web-client", "Use WebClientAdapter", "httpInterfacesWebClientConfiguration.mustache"), - rest_client("rest-client", "Use RestClientAdapter", "httpInterfacesRestClientConfiguration.mustache"), - rest_template("rest-template", "Use RestTemplateAdapter", "httpInterfacesRestTemplateConfiguration.mustache"); - - private final String key; - private final String description; - private final String templateFileName; - - static SpringHttpClientAdapter fromKey(String key) { - return Stream.of(values()).filter(value -> value.getKey().equals(key)).findFirst().orElseThrow( - () -> new IllegalArgumentException("Invalid SpringHttpClientAdapter key: " + key) - ); - } - - } - public static final String OPEN_BRACE = "{"; public static final String CLOSE_BRACE = "}"; @@ -187,7 +167,7 @@ static SpringHttpClientAdapter fromKey(String key) { protected boolean generatedConstructorWithRequiredArgs = true; @Getter @Setter protected RequestMappingMode requestMappingMode = RequestMappingMode.controller; - @Setter SpringHttpClientAdapter springHttpClientAdapter = SpringHttpClientAdapter.web_client; + @Setter boolean useHttpServiceProxyFactoryInterfacesConfiguration = false; public SpringCodegen() { super(); @@ -291,9 +271,9 @@ public SpringCodegen() { generatedConstructorWithRequiredArgs)); cliOptions.add(new CliOption(RESOURCE_FOLDER, RESOURCE_FOLDER_DESC).defaultValue(this.getResourceFolder())); - cliOptions.add(CliOption.newString(SPRING_HTTP_CLIENT_ADAPTER, - "Allows users to choose between different HTTP client implementations for Spring HTTP interfaces (`web-client`, `rest-client`, `rest-template`).") - .defaultValue(SpringHttpClientAdapter.web_client.getKey()) + cliOptions.add(CliOption.newString(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION, + "Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.") + .defaultValue("false") ); supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application."); supportedLibraries.put(SPRING_CLOUD_LIBRARY, @@ -472,7 +452,7 @@ public void processOpts() { } convertPropertyToStringAndWriteBack(RESOURCE_FOLDER, this::setResourceFolder); - convertPropertyToTypeAndWriteBack(SPRING_HTTP_CLIENT_ADAPTER, SpringHttpClientAdapter::fromKey, this::setSpringHttpClientAdapter); + convertPropertyToBooleanAndWriteBack(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION, this::setUseHttpServiceProxyFactoryInterfacesConfiguration); typeMapping.put("file", "org.springframework.core.io.Resource"); importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource"); @@ -557,14 +537,20 @@ public void processOpts() { } } } else if (SPRING_HTTP_INTERFACE.equals(library)) { - if (!reactive && springHttpClientAdapter == SpringHttpClientAdapter.web_client) { - LOGGER.warn("Configuration mismatch: The 'web-client' is selected as the HTTP client adapter, " - + "but 'reactive' is set to 'false'. " - + "Consider using 'rest-template' or 'rest-client' for non-reactive configurations."); - } - supportingFiles.add(new SupportingFile(springHttpClientAdapter.getTemplateFileName(), + String httpInterfacesAbstractConfiguratorFile = useHttpServiceProxyFactoryInterfacesConfiguration ? + "httpServiceProxyFactoryInterfacesConfiguration.mustache" : + "httpInterfacesConfiguration.mustache"; + + supportingFiles.add(new SupportingFile(httpInterfacesAbstractConfiguratorFile, (sourceFolder + File.separator + configPackage).replace(".", java.io.File.separator), "HttpInterfacesAbstractConfigurator.java")); + writePropertyBack(USE_BEANVALIDATION, false); + + writePropertyBack(HTTP_INTERFACES_CONFIGURATOR_DEPENDENCY, + useHttpServiceProxyFactoryInterfacesConfiguration ? + "HttpServiceProxyFactory" : + "WebClient" + ); } } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/README.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/README.mustache index 6cc33662560b..fcda3ead154d 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/README.mustache @@ -9,13 +9,13 @@ By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an AP This is an example of building API stub interfaces in Java using the Spring framework. The stubs generated can be used in your existing Spring application for HTTP integration with other REST services -To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `WebClient` instance via constructor +To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `{{httpInterfacesConfiguratorDependency}}` instance via constructor ```java @Configuration public class MyConfiguration extends {{configPackage}}.HttpInterfacesAbstractConfigurator { - public MyConfiguration(WebClient myWebClient) { // separately created WebClient instance - super(myWebClient); + public MyConfiguration({{httpInterfacesConfiguratorDependency}} my{{httpInterfacesConfiguratorDependency}}) { // separately created {{httpInterfacesConfiguratorDependency}} instance + super(my{{httpInterfacesConfiguratorDependency}}); } } ``` \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesWebClientConfiguration.mustache rename to modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesConfiguration.mustache diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache deleted file mode 100644 index 1540cf43bc13..000000000000 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestTemplateConfiguration.mustache +++ /dev/null @@ -1,38 +0,0 @@ -/** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ -package {{configPackage}}; - -{{#apiInfo}} - {{#apis}} -import {{apiPackage}}.{{classname}}; - {{/apis}} -{{/apiInfo}} - -import org.springframework.context.annotation.Bean; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.client.support.RestTemplateAdapter; -import org.springframework.web.service.invoker.HttpServiceProxyFactory; - -public abstract class HttpInterfacesAbstractConfigurator { - - private final RestTemplate restTemplate; - - public HttpInterfacesAbstractConfigurator(final RestTemplate restTemplate) { - this.restTemplate = restTemplate; - } - -{{#apiInfo}} -{{#apis}} - @Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") - {{classname}} {{classVarName}}HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(RestTemplateAdapter.create(restTemplate)).build(); - return factory.createClient({{classname}}.class); - } - -{{/apis}} -{{/apiInfo}} - -} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfiguration.mustache similarity index 75% rename from modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache rename to modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfiguration.mustache index 9a1b2cec2843..0439052130f1 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpInterfacesRestClientConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfiguration.mustache @@ -18,17 +18,16 @@ import org.springframework.web.service.invoker.HttpServiceProxyFactory; public abstract class HttpInterfacesAbstractConfigurator { - private final RestClient restClient; + private final HttpServiceProxyFactory factory; - public HttpInterfacesAbstractConfigurator(final RestClient restClient) { - this.restClient = restClient; + public HttpInterfacesAbstractConfigurator(final HttpServiceProxyFactory factory) { + this.factory = factory; } {{#apiInfo}} {{#apis}} @Bean(name = "{{configPackage}}.HttpInterfacesAbstractConfigurator.{{classVarName}}") {{classname}} {{classVarName}}HttpProxy() { - HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(RestClientAdapter.create(restClient)).build(); return factory.createClient({{classname}}.class); } diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator-ignore b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/FILES new file mode 100644 index 000000000000..f91496ca5b57 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/FILES @@ -0,0 +1,59 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/AnotherFakeApi.java +src/main/java/org/openapitools/api/FakeApi.java +src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +src/main/java/org/openapitools/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/model/Animal.java +src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +src/main/java/org/openapitools/model/ArrayTest.java +src/main/java/org/openapitools/model/BigCat.java +src/main/java/org/openapitools/model/Capitalization.java +src/main/java/org/openapitools/model/Cat.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.java +src/main/java/org/openapitools/model/ClassModel.java +src/main/java/org/openapitools/model/Client.java +src/main/java/org/openapitools/model/ContainerDefaultValue.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/EnumArrays.java +src/main/java/org/openapitools/model/EnumClass.java +src/main/java/org/openapitools/model/EnumTest.java +src/main/java/org/openapitools/model/File.java +src/main/java/org/openapitools/model/FileSchemaTestClass.java +src/main/java/org/openapitools/model/FormatTest.java +src/main/java/org/openapitools/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/model/MapTest.java +src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/main/java/org/openapitools/model/Model200Response.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/ModelList.java +src/main/java/org/openapitools/model/ModelReturn.java +src/main/java/org/openapitools/model/Name.java +src/main/java/org/openapitools/model/NullableMapProperty.java +src/main/java/org/openapitools/model/NumberOnly.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/OuterComposite.java +src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/ReadOnlyFirst.java +src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +src/main/java/org/openapitools/model/SpecialModelName.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/TypeHolderDefault.java +src/main/java/org/openapitools/model/TypeHolderExample.java +src/main/java/org/openapitools/model/User.java +src/main/java/org/openapitools/model/XmlItem.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/VERSION new file mode 100644 index 000000000000..884119126398 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.11.0-SNAPSHOT diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/README.md b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/README.md new file mode 100644 index 000000000000..c5e3b37f7190 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated API stub + +[Spring Framework 6 HTTP Interface](https://docs.spring.io/spring-framework/docs/6.0.0/reference/html/integration.html#rest-http-interface) + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring application for HTTP integration with other REST services +To use auto-generated interfaces you have to create your own configuration which extends default abstract configurator & provide `HttpServiceProxyFactory` instance via constructor +```java +@Configuration +public class MyConfiguration extends org.openapitools.configuration.HttpInterfacesAbstractConfigurator { + + public MyConfiguration(HttpServiceProxyFactory myHttpServiceProxyFactory) { // separately created HttpServiceProxyFactory instance + super(myHttpServiceProxyFactory); + } +} +``` \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/pom.xml b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/pom.xml new file mode 100644 index 000000000000..3d8a2136bbf5 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/pom.xml @@ -0,0 +1,75 @@ + + 4.0.0 + org.openapitools + spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration + jar + spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration + 1.0.0-SNAPSHOT + + 17 + UTF-8 + + + org.springframework.boot + spring-boot-starter-parent + 3.2.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + org.springframework.boot + spring-boot-starter-webflux + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + jakarta.validation + jakarta.validation-api + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.6 + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/AnotherFakeApi.java new file mode 100644 index 000000000000..6fc595536876 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,40 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public interface AnotherFakeApi { + + /** + * PATCH /another-fake/dummy : To test special tags + * To test special tags and operation ID starting with number + * + * @param client client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/another-fake/dummy", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity call123testSpecialTags( + @RequestBody Client client + ); + +} diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeApi.java new file mode 100644 index 000000000000..f5cfab25c9d0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,377 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; +import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.model.FileSchemaTestClass; +import java.time.LocalDate; +import java.util.Map; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; +import org.openapitools.model.XmlItem; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public interface FakeApi { + + /** + * POST /fake/create_xml_item : creates an XmlItem + * this route creates an XmlItem + * + * @param xmlItem XmlItem Body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/create_xml_item", + accept = { "application/json" }, + contentType = "application/xml" + ) + ResponseEntity createXmlItem( + @RequestBody XmlItem xmlItem + ); + + + /** + * POST /fake/outer/boolean + * Test serialization of outer boolean types + * + * @param body Input boolean as post body (optional) + * @return Output boolean (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/boolean", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterBooleanSerialize( + @RequestBody(required = false) Boolean body + ); + + + /** + * POST /fake/outer/composite + * Test serialization of object with outer number type + * + * @param outerComposite Input composite as post body (optional) + * @return Output composite (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/composite", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterCompositeSerialize( + @RequestBody(required = false) OuterComposite outerComposite + ); + + + /** + * POST /fake/outer/number + * Test serialization of outer number types + * + * @param body Input number as post body (optional) + * @return Output number (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/number", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterNumberSerialize( + @RequestBody(required = false) BigDecimal body + ); + + + /** + * POST /fake/outer/string + * Test serialization of outer string types + * + * @param body Input string as post body (optional) + * @return Output string (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/outer/string", + accept = { "*/*" }, + contentType = "application/json" + ) + ResponseEntity fakeOuterStringSerialize( + @RequestBody(required = false) String body + ); + + + /** + * PUT /fake/body-with-file-schema + * For this test, the body for this request much reference a schema named `File`. + * + * @param fileSchemaTestClass (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/body-with-file-schema", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testBodyWithFileSchema( + @RequestBody FileSchemaTestClass fileSchemaTestClass + ); + + + /** + * PUT /fake/body-with-query-params + * + * @param query (required) + * @param user (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/body-with-query-params", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testBodyWithQueryParams( + @RequestParam(value = "query", required = true) String query, + @RequestBody User user + ); + + + /** + * PATCH /fake : To test \"client\" model + * To test \"client\" model + * + * @param client client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/fake", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testClientModel( + @RequestBody Client client + ); + + + /** + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * + * @param number None (required) + * @param _double None (required) + * @param patternWithoutDelimiter None (required) + * @param _byte None (required) + * @param integer None (optional) + * @param int32 None (optional) + * @param int64 None (optional) + * @param _float None (optional) + * @param string None (optional) + * @param binary None (optional) + * @param date None (optional) + * @param dateTime None (optional) + * @param password None (optional) + * @param paramCallback None (optional) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "POST", + value = "/fake", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testEndpointParameters( + @RequestParam(value = "number", required = true) BigDecimal number, + @RequestParam(value = "double", required = true) Double _double, + @RequestParam(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + @RequestParam(value = "byte", required = true) byte[] _byte, + @RequestParam(value = "integer", required = false) Integer integer, + @RequestParam(value = "int32", required = false) Integer int32, + @RequestParam(value = "int64", required = false) Long int64, + @RequestParam(value = "float", required = false) Float _float, + @RequestParam(value = "string", required = false) String string, + @RequestPart(value = "binary", required = false) MultipartFile binary, + @RequestParam(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @RequestParam(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @RequestParam(value = "password", required = false) String password, + @RequestParam(value = "callback", required = false) String paramCallback + ); + + + /** + * GET /fake : To test enum parameters + * To test enum parameters + * + * @param enumHeaderStringArray Header parameter enum test (string array) (optional) + * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) + * @param enumQueryStringArray Query parameter enum test (string array) (optional) + * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) + * @param enumQueryInteger Query parameter enum test (double) (optional) + * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) + * @param enumFormString Form parameter enum test (string) (optional, default to -efg) + * @return Invalid request (status code 400) + * or Not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/fake", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testEnumParameters( + @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, + @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, + @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, + @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble, + @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + @RequestParam(value = "enum_form_string", required = false) String enumFormString + ); + + + /** + * DELETE /fake : Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * + * @param requiredStringGroup Required String in group parameters (required) + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @param requiredInt64Group Required Integer in group parameters (required) + * @param stringGroup String in group parameters (optional) + * @param booleanGroup Boolean in group parameters (optional) + * @param int64Group Integer in group parameters (optional) + * @return Something wrong (status code 400) + */ + @HttpExchange( + method = "DELETE", + value = "/fake", + accept = { "application/json" } + ) + ResponseEntity testGroupParameters( + @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, + @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, + @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, + @RequestParam(value = "string_group", required = false) Integer stringGroup, + @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup, + @RequestParam(value = "int64_group", required = false) Long int64Group + ); + + + /** + * POST /fake/inline-additionalProperties : test inline additionalProperties + * + * + * @param requestBody request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/inline-additionalProperties", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testInlineAdditionalProperties( + @RequestBody Map requestBody + ); + + + /** + * GET /fake/jsonFormData : test json serialization of form data + * + * + * @param param field1 (required) + * @param param2 field2 (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/jsonFormData", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity testJsonFormData( + @RequestParam(value = "param", required = true) String param, + @RequestParam(value = "param2", required = true) String param2 + ); + + + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/nullable", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testNullable( + @RequestBody ChildWithNullable childWithNullable + ); + + + /** + * PUT /fake/test-query-parameters + * To test the collection format in query parameters + * + * @param pipe (required) + * @param http (required) + * @param url (required) + * @param context (required) + * @return Success (status code 200) + */ + @HttpExchange( + method = "PUT", + value = "/fake/test-query-parameters", + accept = { "application/json" } + ) + ResponseEntity testQueryParameterCollectionFormat( + @RequestParam(value = "pipe", required = true) List pipe, + @RequestParam(value = "http", required = true) List http, + @RequestParam(value = "url", required = true) List url, + @RequestParam(value = "context", required = true) List context + ); + + + /** + * GET /fake/response-with-example + * This endpoint defines an example value for its response schema. + * + * @return Success (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/response-with-example", + accept = { "application/json" } + ) + ResponseEntity testWithResultExample( + + ); + +} diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java new file mode 100644 index 000000000000..da248eedcce4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -0,0 +1,40 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Client; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public interface FakeClassnameTags123Api { + + /** + * PATCH /fake_classname_test : To test class name in snake case + * To test class name in snake case + * + * @param client client model (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "PATCH", + value = "/fake_classname_test", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity testClassname( + @RequestBody Client client + ); + +} diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..762d67c2374f --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,224 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import org.openapitools.model.ResponseObjectWithDifferentFieldNames; +import java.util.Set; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @HttpExchange( + method = "POST", + value = "/pet", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity addPet( + @RequestBody Pet pet + ); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return successful operation (status code 200) + * or Invalid pet value (status code 400) + */ + @HttpExchange( + method = "DELETE", + value = "/pet/{petId}", + accept = { "application/json" } + ) + ResponseEntity deletePet( + @PathVariable("petId") Long petId, + @RequestHeader(value = "api_key", required = false) String apiKey + ); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @HttpExchange( + method = "GET", + value = "/pet/findByStatus", + accept = { "application/json", "application/xml" } + ) + ResponseEntity> findPetsByStatus( + @RequestParam(value = "status", required = true) List status + ); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Deprecated + @HttpExchange( + method = "GET", + value = "/pet/findByTags", + accept = { "application/json", "application/xml" } + ) + ResponseEntity> findPetsByTags( + @RequestParam(value = "tags", required = true) Set tags + ); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/pet/{petId}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getPetById( + @PathVariable("petId") Long petId + ); + + + /** + * GET /fake/{petId}/response-object-different-names + * + * @param petId ID of pet to update (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/fake/{petId}/response-object-different-names", + accept = { "application/json" } + ) + ResponseEntity responseObjectDifferentNames( + @PathVariable("petId") Long petId + ); + + + /** + * PUT /pet : Update an existing pet + * + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @HttpExchange( + method = "PUT", + value = "/pet", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity updatePet( + @RequestBody Pet pet + ); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @HttpExchange( + method = "POST", + value = "/pet/{petId}", + accept = { "application/json" }, + contentType = "application/x-www-form-urlencoded" + ) + ResponseEntity updatePetWithForm( + @PathVariable("petId") Long petId, + @RequestParam(value = "name", required = false) String name, + @RequestParam(value = "status", required = false) String status + ); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/pet/{petId}/uploadImage", + accept = { "application/json" }, + contentType = "multipart/form-data" + ) + ResponseEntity uploadFile( + @PathVariable("petId") Long petId, + @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @RequestPart(value = "file", required = false) MultipartFile file + ); + + + /** + * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required) + * + * + * @param petId ID of pet to update (required) + * @param requiredFile file to upload (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/{petId}/uploadImageWithRequiredFile", + accept = { "application/json" }, + contentType = "multipart/form-data" + ) + ResponseEntity uploadFileWithRequiredFile( + @PathVariable("petId") Long petId, + @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata + ); + +} diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..891a805e2a8a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,95 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public interface StoreApi { + + /** + * DELETE /store/order/{order_id} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @HttpExchange( + method = "DELETE", + value = "/store/order/{order_id}", + accept = { "application/json" } + ) + ResponseEntity deleteOrder( + @PathVariable("order_id") String orderId + ); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/store/inventory", + accept = { "application/json" } + ) + ResponseEntity> getInventory( + + ); + + + /** + * GET /store/order/{order_id} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/store/order/{order_id}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getOrderById( + @PathVariable("order_id") Long orderId + ); + + + /** + * POST /store/order : Place an order for a pet + * + * + * @param order order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @HttpExchange( + method = "POST", + value = "/store/order", + accept = { "application/json", "application/xml" }, + contentType = "application/json" + ) + ResponseEntity placeOrder( + @RequestBody Order order + ); + +} diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..62bea1f0d655 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,171 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.service.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param user Created user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUser( + @RequestBody User user + ); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user/createWithArray", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUsersWithArrayInput( + @RequestBody List user + ); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/user/createWithList", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity createUsersWithListInput( + @RequestBody List user + ); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "DELETE", + value = "/user/{username}", + accept = { "application/json" } + ) + ResponseEntity deleteUser( + @PathVariable("username") String username + ); + + + /** + * GET /user/{username} : Get user by user name + * + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "GET", + value = "/user/{username}", + accept = { "application/json", "application/xml" } + ) + ResponseEntity getUserByName( + @PathVariable("username") String username + ); + + + /** + * GET /user/login : Logs user into the system + * + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @HttpExchange( + method = "GET", + value = "/user/login", + accept = { "application/json", "application/xml" } + ) + ResponseEntity loginUser( + @RequestParam(value = "username", required = true) String username, + @RequestParam(value = "password", required = true) String password + ); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "GET", + value = "/user/logout", + accept = { "application/json" } + ) + ResponseEntity logoutUser( + + ); + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @HttpExchange( + method = "PUT", + value = "/user/{username}", + accept = { "application/json" }, + contentType = "application/json" + ) + ResponseEntity updateUser( + @PathVariable("username") String username, + @RequestBody User user + ); + +} diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java new file mode 100644 index 000000000000..9df16725d421 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -0,0 +1,59 @@ +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +package org.openapitools.configuration; + +import org.openapitools.api.AnotherFakeApi; +import org.openapitools.api.FakeApi; +import org.openapitools.api.FakeClassnameTags123Api; +import org.openapitools.api.PetApi; +import org.openapitools.api.StoreApi; +import org.openapitools.api.UserApi; + +import org.springframework.context.annotation.Bean; +import org.springframework.web.client.RestClient; +import org.springframework.web.client.support.RestClientAdapter; +import org.springframework.web.service.invoker.HttpServiceProxyFactory; + +public abstract class HttpInterfacesAbstractConfigurator { + + private final HttpServiceProxyFactory factory; + + public HttpInterfacesAbstractConfigurator(final HttpServiceProxyFactory factory) { + this.factory = factory; + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.anotherFake") + AnotherFakeApi anotherFakeHttpProxy() { + return factory.createClient(AnotherFakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fake") + FakeApi fakeHttpProxy() { + return factory.createClient(FakeApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.fakeClassnameTags123") + FakeClassnameTags123Api fakeClassnameTags123HttpProxy() { + return factory.createClient(FakeClassnameTags123Api.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.pet") + PetApi petHttpProxy() { + return factory.createClient(PetApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.store") + StoreApi storeHttpProxy() { + return factory.createClient(StoreApi.class); + } + + @Bean(name = "org.openapitools.configuration.HttpInterfacesAbstractConfigurator.user") + UserApi userHttpProxy() { + return factory.createClient(UserApi.class); + } + + +} diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java new file mode 100644 index 000000000000..edb8f14b463e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -0,0 +1,124 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesAnyType + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AdditionalPropertiesAnyType { + + private String name; + + public AdditionalPropertiesAnyType name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; + return Objects.equals(this.name, additionalPropertiesAnyType.name) && + Objects.equals(this.additionalProperties, additionalPropertiesAnyType.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesAnyType {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java new file mode 100644 index 000000000000..ece7f532672d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesArray + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AdditionalPropertiesArray { + + private String name; + + public AdditionalPropertiesArray name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public List getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; + return Objects.equals(this.name, additionalPropertiesArray.name) && + Objects.equals(this.additionalProperties, additionalPropertiesArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesArray {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java new file mode 100644 index 000000000000..3af35089b92d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -0,0 +1,124 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesBoolean + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AdditionalPropertiesBoolean { + + private String name; + + public AdditionalPropertiesBoolean name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Boolean getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; + return Objects.equals(this.name, additionalPropertiesBoolean.name) && + Objects.equals(this.additionalProperties, additionalPropertiesBoolean.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesBoolean {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 000000000000..27bcb0024845 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,400 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * AdditionalPropertiesClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AdditionalPropertiesClass { + + + private Map mapString = new HashMap<>(); + + + private Map mapNumber = new HashMap<>(); + + + private Map mapInteger = new HashMap<>(); + + + private Map mapBoolean = new HashMap<>(); + + + private Map> mapArrayInteger = new HashMap<>(); + + + private Map> mapArrayAnytype = new HashMap<>(); + + + private Map> mapMapString = new HashMap<>(); + + + private Map> mapMapAnytype = new HashMap<>(); + + private Object anytype1; + + private JsonNullable anytype2 = JsonNullable.undefined(); + + private Object anytype3; + + public AdditionalPropertiesClass mapString(Map mapString) { + this.mapString = mapString; + return this; + } + + public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { + if (this.mapString == null) { + this.mapString = new HashMap<>(); + } + this.mapString.put(key, mapStringItem); + return this; + } + + /** + * Get mapString + * @return mapString + */ + + @JsonProperty("map_string") + public Map getMapString() { + return mapString; + } + + public void setMapString(Map mapString) { + this.mapString = mapString; + } + + public AdditionalPropertiesClass mapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + return this; + } + + public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { + if (this.mapNumber == null) { + this.mapNumber = new HashMap<>(); + } + this.mapNumber.put(key, mapNumberItem); + return this; + } + + /** + * Get mapNumber + * @return mapNumber + */ + + @JsonProperty("map_number") + public Map getMapNumber() { + return mapNumber; + } + + public void setMapNumber(Map mapNumber) { + this.mapNumber = mapNumber; + } + + public AdditionalPropertiesClass mapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + return this; + } + + public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { + if (this.mapInteger == null) { + this.mapInteger = new HashMap<>(); + } + this.mapInteger.put(key, mapIntegerItem); + return this; + } + + /** + * Get mapInteger + * @return mapInteger + */ + + @JsonProperty("map_integer") + public Map getMapInteger() { + return mapInteger; + } + + public void setMapInteger(Map mapInteger) { + this.mapInteger = mapInteger; + } + + public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + return this; + } + + public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { + if (this.mapBoolean == null) { + this.mapBoolean = new HashMap<>(); + } + this.mapBoolean.put(key, mapBooleanItem); + return this; + } + + /** + * Get mapBoolean + * @return mapBoolean + */ + + @JsonProperty("map_boolean") + public Map getMapBoolean() { + return mapBoolean; + } + + public void setMapBoolean(Map mapBoolean) { + this.mapBoolean = mapBoolean; + } + + public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + return this; + } + + public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { + if (this.mapArrayInteger == null) { + this.mapArrayInteger = new HashMap<>(); + } + this.mapArrayInteger.put(key, mapArrayIntegerItem); + return this; + } + + /** + * Get mapArrayInteger + * @return mapArrayInteger + */ + + @JsonProperty("map_array_integer") + public Map> getMapArrayInteger() { + return mapArrayInteger; + } + + public void setMapArrayInteger(Map> mapArrayInteger) { + this.mapArrayInteger = mapArrayInteger; + } + + public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + return this; + } + + public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { + if (this.mapArrayAnytype == null) { + this.mapArrayAnytype = new HashMap<>(); + } + this.mapArrayAnytype.put(key, mapArrayAnytypeItem); + return this; + } + + /** + * Get mapArrayAnytype + * @return mapArrayAnytype + */ + + @JsonProperty("map_array_anytype") + public Map> getMapArrayAnytype() { + return mapArrayAnytype; + } + + public void setMapArrayAnytype(Map> mapArrayAnytype) { + this.mapArrayAnytype = mapArrayAnytype; + } + + public AdditionalPropertiesClass mapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + return this; + } + + public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { + if (this.mapMapString == null) { + this.mapMapString = new HashMap<>(); + } + this.mapMapString.put(key, mapMapStringItem); + return this; + } + + /** + * Get mapMapString + * @return mapMapString + */ + + @JsonProperty("map_map_string") + public Map> getMapMapString() { + return mapMapString; + } + + public void setMapMapString(Map> mapMapString) { + this.mapMapString = mapMapString; + } + + public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + return this; + } + + public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { + if (this.mapMapAnytype == null) { + this.mapMapAnytype = new HashMap<>(); + } + this.mapMapAnytype.put(key, mapMapAnytypeItem); + return this; + } + + /** + * Get mapMapAnytype + * @return mapMapAnytype + */ + + @JsonProperty("map_map_anytype") + public Map> getMapMapAnytype() { + return mapMapAnytype; + } + + public void setMapMapAnytype(Map> mapMapAnytype) { + this.mapMapAnytype = mapMapAnytype; + } + + public AdditionalPropertiesClass anytype1(Object anytype1) { + this.anytype1 = anytype1; + return this; + } + + /** + * Get anytype1 + * @return anytype1 + */ + + @JsonProperty("anytype_1") + public Object getAnytype1() { + return anytype1; + } + + public void setAnytype1(Object anytype1) { + this.anytype1 = anytype1; + } + + public AdditionalPropertiesClass anytype2(Object anytype2) { + this.anytype2 = JsonNullable.of(anytype2); + return this; + } + + /** + * Get anytype2 + * @return anytype2 + */ + + @JsonProperty("anytype_2") + public JsonNullable getAnytype2() { + return anytype2; + } + + public void setAnytype2(JsonNullable anytype2) { + this.anytype2 = anytype2; + } + + public AdditionalPropertiesClass anytype3(Object anytype3) { + this.anytype3 = anytype3; + return this; + } + + /** + * Get anytype3 + * @return anytype3 + */ + + @JsonProperty("anytype_3") + public Object getAnytype3() { + return anytype3; + } + + public void setAnytype3(Object anytype3) { + this.anytype3 = anytype3; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && + Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && + Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && + Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && + Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && + Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && + Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && + Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && + Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && + equalsNullable(this.anytype2, additionalPropertiesClass.anytype2) && + Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, hashCodeNullable(anytype2), anytype3); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); + sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); + sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); + sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); + sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); + sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); + sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); + sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); + sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); + sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); + sb.append(" anytype3: ").append(toIndentedString(anytype3)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java new file mode 100644 index 000000000000..da9cae87770a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -0,0 +1,124 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesInteger + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AdditionalPropertiesInteger { + + private String name; + + public AdditionalPropertiesInteger name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Integer getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; + return Objects.equals(this.name, additionalPropertiesInteger.name) && + Objects.equals(this.additionalProperties, additionalPropertiesInteger.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesInteger {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java new file mode 100644 index 000000000000..46f95e0ff519 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesNumber + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AdditionalPropertiesNumber { + + private String name; + + public AdditionalPropertiesNumber name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public BigDecimal getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; + return Objects.equals(this.name, additionalPropertiesNumber.name) && + Objects.equals(this.additionalProperties, additionalPropertiesNumber.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesNumber {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java new file mode 100644 index 000000000000..b75533e73fac --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -0,0 +1,125 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesObject + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AdditionalPropertiesObject { + + private String name; + + public AdditionalPropertiesObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public Map getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; + return Objects.equals(this.name, additionalPropertiesObject.name) && + Objects.equals(this.additionalProperties, additionalPropertiesObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesString.java new file mode 100644 index 000000000000..1f0bd17b3d4e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -0,0 +1,124 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +/** + * AdditionalPropertiesString + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class AdditionalPropertiesString { + + private String name; + + public AdditionalPropertiesString name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + */ + @JsonAnySetter + public AdditionalPropertiesString putAdditionalProperty(String key, String value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + */ + public String getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; + return Objects.equals(this.name, additionalPropertiesString.name) && + Objects.equals(this.additionalProperties, additionalPropertiesString.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesString {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Animal.java new file mode 100644 index 000000000000..14f0262367ea --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Animal.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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 org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Animal + */ + +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Animal { + + private String className; + + private String color = "red"; + + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + */ + @NotNull + @JsonProperty("className") + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + */ + + @JsonProperty("color") + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Animal animal = (Animal) o; + return Objects.equals(this.className, animal.className) && + Objects.equals(this.color, animal.color); + } + + @Override + public int hashCode() { + return Objects.hash(className, color); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Animal {\n"); + sb.append(" className: ").append(toIndentedString(className)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 000000000000..517ea7351b1a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,93 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfArrayOfNumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ArrayOfArrayOfNumberOnly { + + + private List> arrayArrayNumber = new ArrayList<>(); + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + */ + + @JsonProperty("ArrayArrayNumber") + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; + return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayArrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfArrayOfNumberOnly {\n"); + sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 000000000000..699feb054c92 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,93 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayOfNumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ArrayOfNumberOnly { + + + private List arrayNumber = new ArrayList<>(); + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + */ + + @JsonProperty("ArrayNumber") + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; + return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + } + + @Override + public int hashCode() { + return Objects.hash(arrayNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayOfNumberOnly {\n"); + sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 000000000000..f6f10b80a3f4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,157 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ArrayTest + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ArrayTest { + + + private List arrayOfString = new ArrayList<>(); + + + private List> arrayArrayOfInteger = new ArrayList<>(); + + + private List> arrayArrayOfModel = new ArrayList<>(); + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + */ + + @JsonProperty("array_of_string") + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + */ + + @JsonProperty("array_array_of_integer") + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + */ + + @JsonProperty("array_array_of_model") + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArrayTest arrayTest = (ArrayTest) o; + return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && + Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && + Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); + } + + @Override + public int hashCode() { + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArrayTest {\n"); + sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); + sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); + sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/BigCat.java new file mode 100644 index 000000000000..b9736f97adcf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/BigCat.java @@ -0,0 +1,153 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import org.openapitools.model.Cat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * BigCat + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class BigCat extends Cat { + + /** + * Gets or Sets kind + */ + public enum KindEnum { + LIONS("lions"), + + TIGERS("tigers"), + + LEOPARDS("leopards"), + + JAGUARS("jaguars"); + + private String value; + + KindEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private KindEnum kind; + + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; + } + + /** + * Get kind + * @return kind + */ + + @JsonProperty("kind") + public KindEnum getKind() { + return kind; + } + + public void setKind(KindEnum kind) { + this.kind = kind; + } + + + public BigCat declawed(Boolean declawed) { + super.declawed(declawed); + return this; + } + + public BigCat className(String className) { + super.className(className); + return this; + } + + public BigCat color(String color) { + super.color(color); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BigCat bigCat = (BigCat) o; + return Objects.equals(this.kind, bigCat.kind) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(kind, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Capitalization.java new file mode 100644 index 000000000000..95fe6ea01eab --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,195 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Capitalization + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Capitalization { + + private String smallCamel; + + private String capitalCamel; + + private String smallSnake; + + private String capitalSnake; + + private String scAETHFlowPoints; + + private String ATT_NAME; + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + */ + + @JsonProperty("smallCamel") + public String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + */ + + @JsonProperty("CapitalCamel") + public String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + */ + + @JsonProperty("small_Snake") + public String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + */ + + @JsonProperty("Capital_Snake") + public String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + */ + + @JsonProperty("SCA_ETH_Flow_Points") + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + */ + + @JsonProperty("ATT_NAME") + public String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Capitalization capitalization = (Capitalization) o; + return Objects.equals(this.smallCamel, capitalization.smallCamel) && + Objects.equals(this.capitalCamel, capitalization.capitalCamel) && + Objects.equals(this.smallSnake, capitalization.smallSnake) && + Objects.equals(this.capitalSnake, capitalization.capitalSnake) && + Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && + Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); + } + + @Override + public int hashCode() { + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Capitalization {\n"); + sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); + sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); + sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); + sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); + sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); + sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Cat.java new file mode 100644 index 000000000000..74a93677bc12 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Cat.java @@ -0,0 +1,116 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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 org.openapitools.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Cat + */ + +@JsonIgnoreProperties( + value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the className to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Cat extends Animal { + + private Boolean declawed; + + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + */ + + @JsonProperty("declawed") + public Boolean getDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + + public Cat className(String className) { + super.className(className); + return this; + } + + public Cat color(String color) { + super.color(color); + return this; + } + @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) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(declawed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..f27d7fa4f232 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,114 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Category + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Category { + + private Long id; + + private String name = "default-name"; + + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..f5bb38e7cd15 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,111 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ClassModel.java new file mode 100644 index 000000000000..3369e07eb162 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ClassModel.java @@ -0,0 +1,80 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model with \"_class\" property + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ClassModel { + + private String propertyClass; + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + + @JsonProperty("_class") + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClassModel {\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Client.java new file mode 100644 index 000000000000..50c2e41373f9 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Client.java @@ -0,0 +1,80 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Client + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Client { + + private String client; + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + */ + + @JsonProperty("client") + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Client client = (Client) o; + return Objects.equals(this.client, client.client); + } + + @Override + public int hashCode() { + return Objects.hash(client); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Client {\n"); + sb.append(" client: ").append(toIndentedString(client)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ContainerDefaultValue.java new file mode 100644 index 000000000000..ea55ad54d7be --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -0,0 +1,213 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ContainerDefaultValue + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ContainerDefaultValue { + + + private JsonNullable> nullableArray = JsonNullable.>undefined(); + + + private JsonNullable> nullableRequiredArray = JsonNullable.>undefined(); + + + private List requiredArray = new ArrayList<>(); + + + private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined(); + + public ContainerDefaultValue() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ContainerDefaultValue(List nullableRequiredArray, List requiredArray) { + this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + this.requiredArray = requiredArray; + } + + public ContainerDefaultValue nullableArray(List nullableArray) { + this.nullableArray = JsonNullable.of(nullableArray); + return this; + } + + public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) { + if (this.nullableArray == null || !this.nullableArray.isPresent()) { + this.nullableArray = JsonNullable.of(new ArrayList<>()); + } + this.nullableArray.get().add(nullableArrayItem); + return this; + } + + /** + * Get nullableArray + * @return nullableArray + */ + + @JsonProperty("nullable_array") + public JsonNullable> getNullableArray() { + return nullableArray; + } + + public void setNullableArray(JsonNullable> nullableArray) { + this.nullableArray = nullableArray; + } + + public ContainerDefaultValue nullableRequiredArray(List nullableRequiredArray) { + this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray); + return this; + } + + public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) { + if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) { + this.nullableRequiredArray = JsonNullable.of(new ArrayList<>()); + } + this.nullableRequiredArray.get().add(nullableRequiredArrayItem); + return this; + } + + /** + * Get nullableRequiredArray + * @return nullableRequiredArray + */ + @NotNull + @JsonProperty("nullable_required_array") + public JsonNullable> getNullableRequiredArray() { + return nullableRequiredArray; + } + + public void setNullableRequiredArray(JsonNullable> nullableRequiredArray) { + this.nullableRequiredArray = nullableRequiredArray; + } + + public ContainerDefaultValue requiredArray(List requiredArray) { + this.requiredArray = requiredArray; + return this; + } + + public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) { + if (this.requiredArray == null) { + this.requiredArray = new ArrayList<>(); + } + this.requiredArray.add(requiredArrayItem); + return this; + } + + /** + * Get requiredArray + * @return requiredArray + */ + @NotNull + @JsonProperty("required_array") + public List getRequiredArray() { + return requiredArray; + } + + public void setRequiredArray(List requiredArray) { + this.requiredArray = requiredArray; + } + + public ContainerDefaultValue nullableArrayWithDefault(List nullableArrayWithDefault) { + this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault); + return this; + } + + public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) { + if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) { + this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar"))); + } + this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem); + return this; + } + + /** + * Get nullableArrayWithDefault + * @return nullableArrayWithDefault + */ + + @JsonProperty("nullable_array_with_default") + public JsonNullable> getNullableArrayWithDefault() { + return nullableArrayWithDefault; + } + + public void setNullableArrayWithDefault(JsonNullable> nullableArrayWithDefault) { + this.nullableArrayWithDefault = nullableArrayWithDefault; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContainerDefaultValue containerDefaultValue = (ContainerDefaultValue) o; + return equalsNullable(this.nullableArray, containerDefaultValue.nullableArray) && + Objects.equals(this.nullableRequiredArray, containerDefaultValue.nullableRequiredArray) && + Objects.equals(this.requiredArray, containerDefaultValue.requiredArray) && + equalsNullable(this.nullableArrayWithDefault, containerDefaultValue.nullableArrayWithDefault); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableArray), nullableRequiredArray, requiredArray, hashCodeNullable(nullableArrayWithDefault)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContainerDefaultValue {\n"); + sb.append(" nullableArray: ").append(toIndentedString(nullableArray)).append("\n"); + sb.append(" nullableRequiredArray: ").append(toIndentedString(nullableRequiredArray)).append("\n"); + sb.append(" requiredArray: ").append(toIndentedString(requiredArray)).append("\n"); + sb.append(" nullableArrayWithDefault: ").append(toIndentedString(nullableArrayWithDefault)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..3acdd273087c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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 org.openapitools.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Dog + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Dog extends Animal { + + private String breed; + + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + */ + + @JsonProperty("breed") + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + + + public Dog className(String className) { + super.className(className); + return this; + } + + public Dog color(String color) { + super.color(color); + return this; + } + @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.breed, dog.breed) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(breed, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" breed: ").append(toIndentedString(breed)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 000000000000..ea2691c6dcd3 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,186 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumArrays + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class EnumArrays { + + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String value) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private JustSymbolEnum justSymbol; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String value) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + + private List arrayEnum = new ArrayList<>(); + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + */ + + @JsonProperty("just_symbol") + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + */ + + @JsonProperty("array_enum") + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumArrays enumArrays = (EnumArrays) o; + return Objects.equals(this.justSymbol, enumArrays.justSymbol) && + Objects.equals(this.arrayEnum, enumArrays.arrayEnum); + } + + @Override + public int hashCode() { + return Objects.hash(justSymbol, arrayEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumArrays {\n"); + sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); + sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumClass.java new file mode 100644 index 000000000000..a778284781fb --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,56 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets EnumClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String value) { + for (EnumClass b : EnumClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumTest.java new file mode 100644 index 000000000000..931b8e756250 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,331 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +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.model.OuterEnum; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * EnumTest + */ + +@JsonTypeName("Enum_Test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class EnumTest { + + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String value) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private EnumStringEnum enumString; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String value) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private EnumStringRequiredEnum enumStringRequired; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(Integer value) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private EnumIntegerEnum enumInteger; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @JsonValue + public Double getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(Double value) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private EnumNumberEnum enumNumber; + + private OuterEnum outerEnum; + + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + */ + + @JsonProperty("enum_string") + public EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + */ + @NotNull + @JsonProperty("enum_string_required") + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + */ + + @JsonProperty("enum_integer") + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + */ + + @JsonProperty("enum_number") + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + */ + + @JsonProperty("outerEnum") + public OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnumTest enumTest = (EnumTest) o; + return Objects.equals(this.enumString, enumTest.enumString) && + Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && + Objects.equals(this.enumInteger, enumTest.enumInteger) && + Objects.equals(this.enumNumber, enumTest.enumNumber) && + Objects.equals(this.outerEnum, enumTest.outerEnum); + } + + @Override + public int hashCode() { + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EnumTest {\n"); + sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); + sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); + sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); + sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); + sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/File.java new file mode 100644 index 000000000000..f64ba0751ecf --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/File.java @@ -0,0 +1,80 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Must be named `File` for test. + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class File { + + private String sourceURI; + + public File sourceURI(String sourceURI) { + this.sourceURI = sourceURI; + return this; + } + + /** + * Test capitalization + * @return sourceURI + */ + + @JsonProperty("sourceURI") + public String getSourceURI() { + return sourceURI; + } + + public void setSourceURI(String sourceURI) { + this.sourceURI = sourceURI; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + File file = (File) o; + return Objects.equals(this.sourceURI, file.sourceURI); + } + + @Override + public int hashCode() { + return Objects.hash(sourceURI); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class File {\n"); + sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FileSchemaTestClass.java new file mode 100644 index 000000000000..43a6508ffa7c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -0,0 +1,116 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FileSchemaTestClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class FileSchemaTestClass { + + private File file; + + + private List files = new ArrayList<>(); + + public FileSchemaTestClass file(File file) { + this.file = file; + return this; + } + + /** + * Get file + * @return file + */ + + @JsonProperty("file") + public File getFile() { + return file; + } + + public void setFile(File file) { + this.file = file; + } + + public FileSchemaTestClass files(List files) { + this.files = files; + return this; + } + + public FileSchemaTestClass addFilesItem(File filesItem) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + */ + + @JsonProperty("files") + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; + return Objects.equals(this.file, fileSchemaTestClass.file) && + Objects.equals(this.files, fileSchemaTestClass.files); + } + + @Override + public int hashCode() { + return Objects.hash(file, files); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileSchemaTestClass {\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FormatTest.java new file mode 100644 index 000000000000..0ae935923aa0 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,413 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * FormatTest + */ + +@JsonTypeName("format_test") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class FormatTest { + + private Integer integer; + + private Integer int32; + + private Long int64; + + private BigDecimal number; + + private Float _float; + + private Double _double; + + private String string; + + private byte[] _byte; + + private org.springframework.core.io.Resource binary; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + private UUID uuid; + + private String password; + + private BigDecimal bigDecimal; + + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + */ + + @JsonProperty("integer") + public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + */ + + @JsonProperty("int32") + public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + */ + + @JsonProperty("int64") + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + */ + @NotNull + @JsonProperty("number") + public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + */ + + @JsonProperty("float") + public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + */ + + @JsonProperty("double") + public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + */ + + @JsonProperty("string") + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + */ + @NotNull + @JsonProperty("byte") + public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(org.springframework.core.io.Resource binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + */ + + @JsonProperty("binary") + public org.springframework.core.io.Resource getBinary() { + return binary; + } + + public void setBinary(org.springframework.core.io.Resource binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @NotNull + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + + @JsonProperty("dateTime") + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + + @JsonProperty("uuid") + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @NotNull + @JsonProperty("password") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + + /** + * Get bigDecimal + * @return bigDecimal + */ + + @JsonProperty("BigDecimal") + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormatTest formatTest = (FormatTest) o; + return Objects.equals(this.integer, formatTest.integer) && + Objects.equals(this.int32, formatTest.int32) && + Objects.equals(this.int64, formatTest.int64) && + Objects.equals(this.number, formatTest.number) && + Objects.equals(this._float, formatTest._float) && + Objects.equals(this._double, formatTest._double) && + Objects.equals(this.string, formatTest.string) && + Arrays.equals(this._byte, formatTest._byte) && + Objects.equals(this.binary, formatTest.binary) && + Objects.equals(this.date, formatTest.date) && + Objects.equals(this.dateTime, formatTest.dateTime) && + Objects.equals(this.uuid, formatTest.uuid) && + Objects.equals(this.password, formatTest.password) && + Objects.equals(this.bigDecimal, formatTest.bigDecimal); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormatTest {\n"); + sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); + sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); + sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); + sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" password: ").append("*").append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/HasOnlyReadOnly.java new file mode 100644 index 000000000000..a9fc477d9707 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -0,0 +1,105 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * HasOnlyReadOnly + */ + +@JsonTypeName("hasOnlyReadOnly") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class HasOnlyReadOnly { + + private String bar; + + private String foo; + + public HasOnlyReadOnly bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + + @JsonProperty("bar") + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public HasOnlyReadOnly foo(String foo) { + this.foo = foo; + return this; + } + + /** + * Get foo + * @return foo + */ + + @JsonProperty("foo") + public String getFoo() { + return foo; + } + + public void setFoo(String foo) { + this.foo = foo; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); + } + + @Override + public int hashCode() { + return Objects.hash(bar, foo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HasOnlyReadOnly {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MapTest.java new file mode 100644 index 000000000000..e36dde0db900 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MapTest.java @@ -0,0 +1,223 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MapTest + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class MapTest { + + + private Map> mapMapOfString = new HashMap<>(); + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String value) { + for (InnerEnum b : InnerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + + private Map mapOfEnumString = new HashMap<>(); + + + private Map directMap = new HashMap<>(); + + + private Map indirectMap = new HashMap<>(); + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + */ + + @JsonProperty("map_map_of_string") + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + */ + + @JsonProperty("map_of_enum_string") + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + public MapTest directMap(Map directMap) { + this.directMap = directMap; + return this; + } + + public MapTest putDirectMapItem(String key, Boolean directMapItem) { + if (this.directMap == null) { + this.directMap = new HashMap<>(); + } + this.directMap.put(key, directMapItem); + return this; + } + + /** + * Get directMap + * @return directMap + */ + + @JsonProperty("direct_map") + public Map getDirectMap() { + return directMap; + } + + public void setDirectMap(Map directMap) { + this.directMap = directMap; + } + + public MapTest indirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + return this; + } + + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + if (this.indirectMap == null) { + this.indirectMap = new HashMap<>(); + } + this.indirectMap.put(key, indirectMapItem); + return this; + } + + /** + * Get indirectMap + * @return indirectMap + */ + + @JsonProperty("indirect_map") + public Map getIndirectMap() { + return indirectMap; + } + + public void setIndirectMap(Map indirectMap) { + this.indirectMap = indirectMap; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MapTest mapTest = (MapTest) o; + return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && + Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && + Objects.equals(this.directMap, mapTest.directMap) && + Objects.equals(this.indirectMap, mapTest.indirectMap); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MapTest {\n"); + sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); + sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); + sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); + sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 000000000000..a0c29876948a --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,142 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class MixedPropertiesAndAdditionalPropertiesClass { + + private UUID uuid; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dateTime; + + + private Map map = new HashMap<>(); + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + */ + + @JsonProperty("uuid") + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + */ + + @JsonProperty("dateTime") + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + */ + + @JsonProperty("map") + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; + return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && + Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && + Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, dateTime, map); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" map: ").append(toIndentedString(map)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Model200Response.java new file mode 100644 index 000000000000..48fc81d79751 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,105 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model name starting with number + */ + +@JsonTypeName("200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Model200Response { + + private Integer name; + + private String propertyClass; + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + */ + + @JsonProperty("class") + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Model200Response _200response = (Model200Response) o; + return Objects.equals(this.name, _200response.name) && + Objects.equals(this.propertyClass, _200response.propertyClass); + } + + @Override + public int hashCode() { + return Objects.hash(name, propertyClass); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Model200Response {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..788ed45bf161 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,128 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ModelApiResponse + */ + +@JsonTypeName("ApiResponse") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ModelApiResponse { + + private Integer code; + + private String type; + + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @JsonProperty("code") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @JsonProperty("message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelList.java new file mode 100644 index 000000000000..62d16ec14325 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelList.java @@ -0,0 +1,82 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ModelList + */ + +@JsonTypeName("List") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ModelList { + + private String _123list; + + public ModelList _123list(String _123list) { + this._123list = _123list; + return this; + } + + /** + * Get _123list + * @return _123list + */ + + @JsonProperty("123-list") + public String get123list() { + return _123list; + } + + public void set123list(String _123list) { + this._123list = _123list; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelList _list = (ModelList) o; + return Objects.equals(this._123list, _list._123list); + } + + @Override + public int hashCode() { + return Objects.hash(_123list); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelList {\n"); + sb.append(" _123list: ").append(toIndentedString(_123list)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelReturn.java new file mode 100644 index 000000000000..39a05be87215 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelReturn.java @@ -0,0 +1,82 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing reserved words + */ + +@JsonTypeName("Return") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ModelReturn { + + private Integer _return; + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + */ + + @JsonProperty("return") + public Integer getReturn() { + return _return; + } + + public void setReturn(Integer _return) { + this._return = _return; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); + } + + @Override + public int hashCode() { + return Objects.hash(_return); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelReturn {\n"); + sb.append(" _return: ").append(toIndentedString(_return)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Name.java new file mode 100644 index 000000000000..712005adf672 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Name.java @@ -0,0 +1,160 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Model for testing model name same as property name + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Name { + + private Integer name; + + private Integer snakeCase; + + private String property; + + private Integer _123number; + + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Name snakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + return this; + } + + /** + * Get snakeCase + * @return snakeCase + */ + + @JsonProperty("snake_case") + public Integer getSnakeCase() { + return snakeCase; + } + + public void setSnakeCase(Integer snakeCase) { + this.snakeCase = snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + */ + + @JsonProperty("property") + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public Name _123number(Integer _123number) { + this._123number = _123number; + return this; + } + + /** + * Get _123number + * @return _123number + */ + + @JsonProperty("123Number") + public Integer get123number() { + return _123number; + } + + public void set123number(Integer _123number) { + this._123number = _123number; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Name name = (Name) o; + return Objects.equals(this.name, name.name) && + Objects.equals(this.snakeCase, name.snakeCase) && + Objects.equals(this.property, name.property) && + Objects.equals(this._123number, name._123number); + } + + @Override + public int hashCode() { + return Objects.hash(name, snakeCase, property, _123number); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Name {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); + sb.append(" property: ").append(toIndentedString(property)).append("\n"); + sb.append(" _123number: ").append(toIndentedString(_123number)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NullableMapProperty.java new file mode 100644 index 000000000000..51803b785016 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -0,0 +1,105 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NullableMapProperty + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class NullableMapProperty { + + + private JsonNullable> languageValues = JsonNullable.>undefined(); + + public NullableMapProperty languageValues(Map languageValues) { + this.languageValues = JsonNullable.of(languageValues); + return this; + } + + public NullableMapProperty putLanguageValuesItem(String key, String languageValuesItem) { + if (this.languageValues == null || !this.languageValues.isPresent()) { + this.languageValues = JsonNullable.of(new HashMap<>()); + } + this.languageValues.get().put(key, languageValuesItem); + return this; + } + + /** + * Get languageValues + * @return languageValues + */ + + @JsonProperty("languageValues") + public JsonNullable> getLanguageValues() { + return languageValues; + } + + public void setLanguageValues(JsonNullable> languageValues) { + this.languageValues = languageValues; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableMapProperty nullableMapProperty = (NullableMapProperty) o; + return equalsNullable(this.languageValues, nullableMapProperty.languageValues); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(languageValues)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableMapProperty {\n"); + sb.append(" languageValues: ").append(toIndentedString(languageValues)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NumberOnly.java new file mode 100644 index 000000000000..44499456b67e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NumberOnly.java @@ -0,0 +1,81 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * NumberOnly + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class NumberOnly { + + private BigDecimal justNumber; + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + */ + + @JsonProperty("JustNumber") + public BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); + } + + @Override + public int hashCode() { + return Objects.hash(justNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberOnly {\n"); + sb.append(" justNumber: ").append(toIndentedString(justNumber)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..32a2240f4b1e --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,236 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Order + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Order { + + private Long id; + + private Long petId; + + private Integer quantity; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private StatusEnum status; + + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + + @JsonProperty("petId") + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + + @JsonProperty("quantity") + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + + @JsonProperty("shipDate") + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + + @JsonProperty("complete") + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 000000000000..b8dd246a115d --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,127 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * OuterComposite + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class OuterComposite { + + private BigDecimal myNumber; + + private String myString; + + private Boolean myBoolean; + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + */ + + @JsonProperty("my_number") + public BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + */ + + @JsonProperty("my_string") + public String getMyString() { + return myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + */ + + @JsonProperty("my_boolean") + public Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterComposite outerComposite = (OuterComposite) o; + return Objects.equals(this.myNumber, outerComposite.myNumber) && + Objects.equals(this.myString, outerComposite.myString) && + Objects.equals(this.myBoolean, outerComposite.myBoolean); + } + + @Override + public int hashCode() { + return Objects.hash(myNumber, myString, myBoolean); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterComposite {\n"); + sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); + sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); + sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterEnum.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 000000000000..c2f06e9a7559 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,56 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnum + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String value) { + for (OuterEnum b : OuterEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..1972557b872c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,163 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ParentWithNullable + */ + +@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 = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILD_WITH_NULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..7a6620c85a68 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,279 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Pet + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Pet { + + private Long id; + + private Category category; + + private String name; + + + private Set photoUrls = new LinkedHashSet<>(); + + + private List tags = new ArrayList<>(); + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @Deprecated + private StatusEnum status; + + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + + @JsonProperty("category") + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new LinkedHashSet<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @NotNull + @JsonProperty("photoUrls") + public Set getPhotoUrls() { + return photoUrls; + } + + @JsonDeserialize(as = LinkedHashSet.class) + public void setPhotoUrls(Set photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + + @JsonProperty("tags") + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + */ + + @JsonProperty("status") + @Deprecated + public StatusEnum getStatus() { + return status; + } + + /** + * @deprecated + */ + @Deprecated + public void setStatus(StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 000000000000..10fd954f431c --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,103 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ReadOnlyFirst + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ReadOnlyFirst { + + private String bar; + + private String baz; + + public ReadOnlyFirst bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + */ + + @JsonProperty("bar") + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + */ + + @JsonProperty("baz") + public String getBaz() { + return baz; + } + + public void setBaz(String baz) { + this.baz = baz; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; + return Objects.equals(this.bar, readOnlyFirst.bar) && + Objects.equals(this.baz, readOnlyFirst.baz); + } + + @Override + public int hashCode() { + return Objects.hash(bar, baz); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadOnlyFirst {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append(" baz: ").append(toIndentedString(baz)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java new file mode 100644 index 000000000000..6c13e5974ff4 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -0,0 +1,149 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ResponseObjectWithDifferentFieldNames + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class ResponseObjectWithDifferentFieldNames { + + private String normalPropertyName; + + private String UPPER_CASE_PROPERTY_SNAKE; + + private String lowerCasePropertyDashes; + + private String propertyNameWithSpaces; + + public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPropertyName) { + this.normalPropertyName = normalPropertyName; + return this; + } + + /** + * Get normalPropertyName + * @return normalPropertyName + */ + + @JsonProperty("normalPropertyName") + public String getNormalPropertyName() { + return normalPropertyName; + } + + public void setNormalPropertyName(String normalPropertyName) { + this.normalPropertyName = normalPropertyName; + } + + public ResponseObjectWithDifferentFieldNames UPPER_CASE_PROPERTY_SNAKE(String UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + return this; + } + + /** + * Get UPPER_CASE_PROPERTY_SNAKE + * @return UPPER_CASE_PROPERTY_SNAKE + */ + + @JsonProperty("UPPER_CASE_PROPERTY_SNAKE") + public String getUPPERCASEPROPERTYSNAKE() { + return UPPER_CASE_PROPERTY_SNAKE; + } + + public void setUPPERCASEPROPERTYSNAKE(String UPPER_CASE_PROPERTY_SNAKE) { + this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE; + } + + public ResponseObjectWithDifferentFieldNames lowerCasePropertyDashes(String lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + return this; + } + + /** + * Get lowerCasePropertyDashes + * @return lowerCasePropertyDashes + */ + + @JsonProperty("lower-case-property-dashes") + public String getLowerCasePropertyDashes() { + return lowerCasePropertyDashes; + } + + public void setLowerCasePropertyDashes(String lowerCasePropertyDashes) { + this.lowerCasePropertyDashes = lowerCasePropertyDashes; + } + + public ResponseObjectWithDifferentFieldNames propertyNameWithSpaces(String propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; + return this; + } + + /** + * Get propertyNameWithSpaces + * @return propertyNameWithSpaces + */ + + @JsonProperty("property name with spaces") + public String getPropertyNameWithSpaces() { + return propertyNameWithSpaces; + } + + public void setPropertyNameWithSpaces(String propertyNameWithSpaces) { + this.propertyNameWithSpaces = propertyNameWithSpaces; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponseObjectWithDifferentFieldNames responseObjectWithDifferentFieldNames = (ResponseObjectWithDifferentFieldNames) o; + return Objects.equals(this.normalPropertyName, responseObjectWithDifferentFieldNames.normalPropertyName) && + Objects.equals(this.UPPER_CASE_PROPERTY_SNAKE, responseObjectWithDifferentFieldNames.UPPER_CASE_PROPERTY_SNAKE) && + Objects.equals(this.lowerCasePropertyDashes, responseObjectWithDifferentFieldNames.lowerCasePropertyDashes) && + Objects.equals(this.propertyNameWithSpaces, responseObjectWithDifferentFieldNames.propertyNameWithSpaces); + } + + @Override + public int hashCode() { + return Objects.hash(normalPropertyName, UPPER_CASE_PROPERTY_SNAKE, lowerCasePropertyDashes, propertyNameWithSpaces); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponseObjectWithDifferentFieldNames {\n"); + sb.append(" normalPropertyName: ").append(toIndentedString(normalPropertyName)).append("\n"); + sb.append(" UPPER_CASE_PROPERTY_SNAKE: ").append(toIndentedString(UPPER_CASE_PROPERTY_SNAKE)).append("\n"); + sb.append(" lowerCasePropertyDashes: ").append(toIndentedString(lowerCasePropertyDashes)).append("\n"); + sb.append(" propertyNameWithSpaces: ").append(toIndentedString(propertyNameWithSpaces)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 000000000000..a0bedcc4b291 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,82 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * SpecialModelName + */ + +@JsonTypeName("_special_model.name_") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class SpecialModelName { + + private Long $specialPropertyName; + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + */ + + @JsonProperty("$special[property.name]") + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); + } + + @Override + public int hashCode() { + return Objects.hash($specialPropertyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SpecialModelName {\n"); + sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..c0ed997fa827 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,103 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Tag + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class Tag { + + private Long id; + + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderDefault.java new file mode 100644 index 000000000000..2116efb59766 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -0,0 +1,200 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderDefault + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class TypeHolderDefault { + + private String stringItem = "what"; + + private BigDecimal numberItem = new BigDecimal("1.234"); + + private Integer integerItem = -2; + + private Boolean boolItem = true; + + + private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + + public TypeHolderDefault stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @NotNull + @JsonProperty("string_item") + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderDefault numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderDefault integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @NotNull + @JsonProperty("integer_item") + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderDefault boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @NotNull + @JsonProperty("bool_item") + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderDefault arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3)); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @NotNull + @JsonProperty("array_item") + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; + return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && + Objects.equals(this.numberItem, typeHolderDefault.numberItem) && + Objects.equals(this.integerItem, typeHolderDefault.integerItem) && + Objects.equals(this.boolItem, typeHolderDefault.boolItem) && + Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderDefault {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderExample.java new file mode 100644 index 000000000000..63afd43b8798 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -0,0 +1,224 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * TypeHolderExample + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class TypeHolderExample { + + private String stringItem; + + private BigDecimal numberItem; + + private Float floatItem; + + private Integer integerItem; + + private Boolean boolItem; + + + private List arrayItem = new ArrayList<>(); + + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + + public TypeHolderExample stringItem(String stringItem) { + this.stringItem = stringItem; + return this; + } + + /** + * Get stringItem + * @return stringItem + */ + @NotNull + @JsonProperty("string_item") + public String getStringItem() { + return stringItem; + } + + public void setStringItem(String stringItem) { + this.stringItem = stringItem; + } + + public TypeHolderExample numberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + return this; + } + + /** + * Get numberItem + * @return numberItem + */ + @NotNull + @JsonProperty("number_item") + public BigDecimal getNumberItem() { + return numberItem; + } + + public void setNumberItem(BigDecimal numberItem) { + this.numberItem = numberItem; + } + + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + + /** + * Get floatItem + * @return floatItem + */ + @NotNull + @JsonProperty("float_item") + public Float getFloatItem() { + return floatItem; + } + + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + public TypeHolderExample integerItem(Integer integerItem) { + this.integerItem = integerItem; + return this; + } + + /** + * Get integerItem + * @return integerItem + */ + @NotNull + @JsonProperty("integer_item") + public Integer getIntegerItem() { + return integerItem; + } + + public void setIntegerItem(Integer integerItem) { + this.integerItem = integerItem; + } + + public TypeHolderExample boolItem(Boolean boolItem) { + this.boolItem = boolItem; + return this; + } + + /** + * Get boolItem + * @return boolItem + */ + @NotNull + @JsonProperty("bool_item") + public Boolean getBoolItem() { + return boolItem; + } + + public void setBoolItem(Boolean boolItem) { + this.boolItem = boolItem; + } + + public TypeHolderExample arrayItem(List arrayItem) { + this.arrayItem = arrayItem; + return this; + } + + public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { + if (this.arrayItem == null) { + this.arrayItem = new ArrayList<>(); + } + this.arrayItem.add(arrayItemItem); + return this; + } + + /** + * Get arrayItem + * @return arrayItem + */ + @NotNull + @JsonProperty("array_item") + public List getArrayItem() { + return arrayItem; + } + + public void setArrayItem(List arrayItem) { + this.arrayItem = arrayItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TypeHolderExample typeHolderExample = (TypeHolderExample) o; + return Objects.equals(this.stringItem, typeHolderExample.stringItem) && + Objects.equals(this.numberItem, typeHolderExample.numberItem) && + Objects.equals(this.floatItem, typeHolderExample.floatItem) && + Objects.equals(this.integerItem, typeHolderExample.integerItem) && + Objects.equals(this.boolItem, typeHolderExample.boolItem) && + Objects.equals(this.arrayItem, typeHolderExample.arrayItem); + } + + @Override + public int hashCode() { + return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TypeHolderExample {\n"); + sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); + sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); + sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); + sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); + sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..11e893ed6712 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,241 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * User + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class User { + + private Long id; + + private String username; + + private String firstName; + + private String lastName; + + private String email; + + private String password; + + private String phone; + + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + + @JsonProperty("username") + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + + @JsonProperty("firstName") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + + @JsonProperty("lastName") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + + @JsonProperty("password") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + + @JsonProperty("phone") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + + @JsonProperty("userStatus") + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).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/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/XmlItem.java new file mode 100644 index 000000000000..300d1a000db7 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/XmlItem.java @@ -0,0 +1,809 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * XmlItem + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +public class XmlItem { + + private String attributeString; + + private BigDecimal attributeNumber; + + private Integer attributeInteger; + + private Boolean attributeBoolean; + + + private List wrappedArray = new ArrayList<>(); + + private String nameString; + + private BigDecimal nameNumber; + + private Integer nameInteger; + + private Boolean nameBoolean; + + + private List nameArray = new ArrayList<>(); + + + private List nameWrappedArray = new ArrayList<>(); + + private String prefixString; + + private BigDecimal prefixNumber; + + private Integer prefixInteger; + + private Boolean prefixBoolean; + + + private List prefixArray = new ArrayList<>(); + + + private List prefixWrappedArray = new ArrayList<>(); + + private String namespaceString; + + private BigDecimal namespaceNumber; + + private Integer namespaceInteger; + + private Boolean namespaceBoolean; + + + private List namespaceArray = new ArrayList<>(); + + + private List namespaceWrappedArray = new ArrayList<>(); + + private String prefixNsString; + + private BigDecimal prefixNsNumber; + + private Integer prefixNsInteger; + + private Boolean prefixNsBoolean; + + + private List prefixNsArray = new ArrayList<>(); + + + private List prefixNsWrappedArray = new ArrayList<>(); + + public XmlItem attributeString(String attributeString) { + this.attributeString = attributeString; + return this; + } + + /** + * Get attributeString + * @return attributeString + */ + + @JsonProperty("attribute_string") + public String getAttributeString() { + return attributeString; + } + + public void setAttributeString(String attributeString) { + this.attributeString = attributeString; + } + + public XmlItem attributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + return this; + } + + /** + * Get attributeNumber + * @return attributeNumber + */ + + @JsonProperty("attribute_number") + public BigDecimal getAttributeNumber() { + return attributeNumber; + } + + public void setAttributeNumber(BigDecimal attributeNumber) { + this.attributeNumber = attributeNumber; + } + + public XmlItem attributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + return this; + } + + /** + * Get attributeInteger + * @return attributeInteger + */ + + @JsonProperty("attribute_integer") + public Integer getAttributeInteger() { + return attributeInteger; + } + + public void setAttributeInteger(Integer attributeInteger) { + this.attributeInteger = attributeInteger; + } + + public XmlItem attributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + return this; + } + + /** + * Get attributeBoolean + * @return attributeBoolean + */ + + @JsonProperty("attribute_boolean") + public Boolean getAttributeBoolean() { + return attributeBoolean; + } + + public void setAttributeBoolean(Boolean attributeBoolean) { + this.attributeBoolean = attributeBoolean; + } + + public XmlItem wrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + return this; + } + + public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { + if (this.wrappedArray == null) { + this.wrappedArray = new ArrayList<>(); + } + this.wrappedArray.add(wrappedArrayItem); + return this; + } + + /** + * Get wrappedArray + * @return wrappedArray + */ + + @JsonProperty("wrapped_array") + public List getWrappedArray() { + return wrappedArray; + } + + public void setWrappedArray(List wrappedArray) { + this.wrappedArray = wrappedArray; + } + + public XmlItem nameString(String nameString) { + this.nameString = nameString; + return this; + } + + /** + * Get nameString + * @return nameString + */ + + @JsonProperty("name_string") + public String getNameString() { + return nameString; + } + + public void setNameString(String nameString) { + this.nameString = nameString; + } + + public XmlItem nameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + return this; + } + + /** + * Get nameNumber + * @return nameNumber + */ + + @JsonProperty("name_number") + public BigDecimal getNameNumber() { + return nameNumber; + } + + public void setNameNumber(BigDecimal nameNumber) { + this.nameNumber = nameNumber; + } + + public XmlItem nameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + return this; + } + + /** + * Get nameInteger + * @return nameInteger + */ + + @JsonProperty("name_integer") + public Integer getNameInteger() { + return nameInteger; + } + + public void setNameInteger(Integer nameInteger) { + this.nameInteger = nameInteger; + } + + public XmlItem nameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + return this; + } + + /** + * Get nameBoolean + * @return nameBoolean + */ + + @JsonProperty("name_boolean") + public Boolean getNameBoolean() { + return nameBoolean; + } + + public void setNameBoolean(Boolean nameBoolean) { + this.nameBoolean = nameBoolean; + } + + public XmlItem nameArray(List nameArray) { + this.nameArray = nameArray; + return this; + } + + public XmlItem addNameArrayItem(Integer nameArrayItem) { + if (this.nameArray == null) { + this.nameArray = new ArrayList<>(); + } + this.nameArray.add(nameArrayItem); + return this; + } + + /** + * Get nameArray + * @return nameArray + */ + + @JsonProperty("name_array") + public List getNameArray() { + return nameArray; + } + + public void setNameArray(List nameArray) { + this.nameArray = nameArray; + } + + public XmlItem nameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + return this; + } + + public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { + if (this.nameWrappedArray == null) { + this.nameWrappedArray = new ArrayList<>(); + } + this.nameWrappedArray.add(nameWrappedArrayItem); + return this; + } + + /** + * Get nameWrappedArray + * @return nameWrappedArray + */ + + @JsonProperty("name_wrapped_array") + public List getNameWrappedArray() { + return nameWrappedArray; + } + + public void setNameWrappedArray(List nameWrappedArray) { + this.nameWrappedArray = nameWrappedArray; + } + + public XmlItem prefixString(String prefixString) { + this.prefixString = prefixString; + return this; + } + + /** + * Get prefixString + * @return prefixString + */ + + @JsonProperty("prefix_string") + public String getPrefixString() { + return prefixString; + } + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public XmlItem prefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + return this; + } + + /** + * Get prefixNumber + * @return prefixNumber + */ + + @JsonProperty("prefix_number") + public BigDecimal getPrefixNumber() { + return prefixNumber; + } + + public void setPrefixNumber(BigDecimal prefixNumber) { + this.prefixNumber = prefixNumber; + } + + public XmlItem prefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + return this; + } + + /** + * Get prefixInteger + * @return prefixInteger + */ + + @JsonProperty("prefix_integer") + public Integer getPrefixInteger() { + return prefixInteger; + } + + public void setPrefixInteger(Integer prefixInteger) { + this.prefixInteger = prefixInteger; + } + + public XmlItem prefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + return this; + } + + /** + * Get prefixBoolean + * @return prefixBoolean + */ + + @JsonProperty("prefix_boolean") + public Boolean getPrefixBoolean() { + return prefixBoolean; + } + + public void setPrefixBoolean(Boolean prefixBoolean) { + this.prefixBoolean = prefixBoolean; + } + + public XmlItem prefixArray(List prefixArray) { + this.prefixArray = prefixArray; + return this; + } + + public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { + if (this.prefixArray == null) { + this.prefixArray = new ArrayList<>(); + } + this.prefixArray.add(prefixArrayItem); + return this; + } + + /** + * Get prefixArray + * @return prefixArray + */ + + @JsonProperty("prefix_array") + public List getPrefixArray() { + return prefixArray; + } + + public void setPrefixArray(List prefixArray) { + this.prefixArray = prefixArray; + } + + public XmlItem prefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + return this; + } + + public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { + if (this.prefixWrappedArray == null) { + this.prefixWrappedArray = new ArrayList<>(); + } + this.prefixWrappedArray.add(prefixWrappedArrayItem); + return this; + } + + /** + * Get prefixWrappedArray + * @return prefixWrappedArray + */ + + @JsonProperty("prefix_wrapped_array") + public List getPrefixWrappedArray() { + return prefixWrappedArray; + } + + public void setPrefixWrappedArray(List prefixWrappedArray) { + this.prefixWrappedArray = prefixWrappedArray; + } + + public XmlItem namespaceString(String namespaceString) { + this.namespaceString = namespaceString; + return this; + } + + /** + * Get namespaceString + * @return namespaceString + */ + + @JsonProperty("namespace_string") + public String getNamespaceString() { + return namespaceString; + } + + public void setNamespaceString(String namespaceString) { + this.namespaceString = namespaceString; + } + + public XmlItem namespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + return this; + } + + /** + * Get namespaceNumber + * @return namespaceNumber + */ + + @JsonProperty("namespace_number") + public BigDecimal getNamespaceNumber() { + return namespaceNumber; + } + + public void setNamespaceNumber(BigDecimal namespaceNumber) { + this.namespaceNumber = namespaceNumber; + } + + public XmlItem namespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + return this; + } + + /** + * Get namespaceInteger + * @return namespaceInteger + */ + + @JsonProperty("namespace_integer") + public Integer getNamespaceInteger() { + return namespaceInteger; + } + + public void setNamespaceInteger(Integer namespaceInteger) { + this.namespaceInteger = namespaceInteger; + } + + public XmlItem namespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + return this; + } + + /** + * Get namespaceBoolean + * @return namespaceBoolean + */ + + @JsonProperty("namespace_boolean") + public Boolean getNamespaceBoolean() { + return namespaceBoolean; + } + + public void setNamespaceBoolean(Boolean namespaceBoolean) { + this.namespaceBoolean = namespaceBoolean; + } + + public XmlItem namespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + return this; + } + + public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { + if (this.namespaceArray == null) { + this.namespaceArray = new ArrayList<>(); + } + this.namespaceArray.add(namespaceArrayItem); + return this; + } + + /** + * Get namespaceArray + * @return namespaceArray + */ + + @JsonProperty("namespace_array") + public List getNamespaceArray() { + return namespaceArray; + } + + public void setNamespaceArray(List namespaceArray) { + this.namespaceArray = namespaceArray; + } + + public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + return this; + } + + public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { + if (this.namespaceWrappedArray == null) { + this.namespaceWrappedArray = new ArrayList<>(); + } + this.namespaceWrappedArray.add(namespaceWrappedArrayItem); + return this; + } + + /** + * Get namespaceWrappedArray + * @return namespaceWrappedArray + */ + + @JsonProperty("namespace_wrapped_array") + public List getNamespaceWrappedArray() { + return namespaceWrappedArray; + } + + public void setNamespaceWrappedArray(List namespaceWrappedArray) { + this.namespaceWrappedArray = namespaceWrappedArray; + } + + public XmlItem prefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + return this; + } + + /** + * Get prefixNsString + * @return prefixNsString + */ + + @JsonProperty("prefix_ns_string") + public String getPrefixNsString() { + return prefixNsString; + } + + public void setPrefixNsString(String prefixNsString) { + this.prefixNsString = prefixNsString; + } + + public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + return this; + } + + /** + * Get prefixNsNumber + * @return prefixNsNumber + */ + + @JsonProperty("prefix_ns_number") + public BigDecimal getPrefixNsNumber() { + return prefixNsNumber; + } + + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + this.prefixNsNumber = prefixNsNumber; + } + + public XmlItem prefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + return this; + } + + /** + * Get prefixNsInteger + * @return prefixNsInteger + */ + + @JsonProperty("prefix_ns_integer") + public Integer getPrefixNsInteger() { + return prefixNsInteger; + } + + public void setPrefixNsInteger(Integer prefixNsInteger) { + this.prefixNsInteger = prefixNsInteger; + } + + public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + return this; + } + + /** + * Get prefixNsBoolean + * @return prefixNsBoolean + */ + + @JsonProperty("prefix_ns_boolean") + public Boolean getPrefixNsBoolean() { + return prefixNsBoolean; + } + + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + this.prefixNsBoolean = prefixNsBoolean; + } + + public XmlItem prefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + return this; + } + + public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { + if (this.prefixNsArray == null) { + this.prefixNsArray = new ArrayList<>(); + } + this.prefixNsArray.add(prefixNsArrayItem); + return this; + } + + /** + * Get prefixNsArray + * @return prefixNsArray + */ + + @JsonProperty("prefix_ns_array") + public List getPrefixNsArray() { + return prefixNsArray; + } + + public void setPrefixNsArray(List prefixNsArray) { + this.prefixNsArray = prefixNsArray; + } + + public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + return this; + } + + public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { + if (this.prefixNsWrappedArray == null) { + this.prefixNsWrappedArray = new ArrayList<>(); + } + this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); + return this; + } + + /** + * Get prefixNsWrappedArray + * @return prefixNsWrappedArray + */ + + @JsonProperty("prefix_ns_wrapped_array") + public List getPrefixNsWrappedArray() { + return prefixNsWrappedArray; + } + + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + this.prefixNsWrappedArray = prefixNsWrappedArray; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + XmlItem xmlItem = (XmlItem) o; + return Objects.equals(this.attributeString, xmlItem.attributeString) && + Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && + Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && + Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && + Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && + Objects.equals(this.nameString, xmlItem.nameString) && + Objects.equals(this.nameNumber, xmlItem.nameNumber) && + Objects.equals(this.nameInteger, xmlItem.nameInteger) && + Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && + Objects.equals(this.nameArray, xmlItem.nameArray) && + Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && + Objects.equals(this.prefixString, xmlItem.prefixString) && + Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && + Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && + Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && + Objects.equals(this.prefixArray, xmlItem.prefixArray) && + Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && + Objects.equals(this.namespaceString, xmlItem.namespaceString) && + Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && + Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && + Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && + Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && + Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && + Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && + Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && + Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && + Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && + Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && + Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); + } + + @Override + public int hashCode() { + return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class XmlItem {\n"); + sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); + sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); + sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); + sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); + sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); + sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); + sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); + sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); + sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); + sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); + sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); + sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); + sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); + sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); + sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); + sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); + sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); + sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); + sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); + sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); + sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); + sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); + sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); + sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); + sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); + sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); + sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); + sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); + sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).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 "); + } +} + From 02bb3c7dc77db6272893e0428026d83e41bb4074 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Sat, 30 Nov 2024 17:05:23 +0200 Subject: [PATCH 08/12] spring-http-interface: introduce `useHttpServiceProxyFactoryInterfacesConfigurator` config --- .github/workflows/samples-jdk17.yaml | 6 +++--- ...ServiceProxyFactoryInterfacesConfiguration.yaml | 6 +++--- docs/generators/java-camel.md | 2 +- docs/generators/spring.md | 2 +- .../codegen/languages/SpringCodegen.java | 14 +++++++------- .../.openapi-generator-ignore | 0 .../.openapi-generator/FILES | 1 + .../.openapi-generator/VERSION | 0 .../README.md | 0 .../pom.xml | 4 ++-- .../java/org/openapitools/api/AnotherFakeApi.java | 0 .../main/java/org/openapitools/api/FakeApi.java | 0 .../openapitools/api/FakeClassnameTags123Api.java | 0 .../src/main/java/org/openapitools/api/PetApi.java | 0 .../main/java/org/openapitools/api/StoreApi.java | 0 .../main/java/org/openapitools/api/UserApi.java | 0 .../HttpInterfacesAbstractConfigurator.java | 0 .../model/AdditionalPropertiesAnyType.java | 0 .../model/AdditionalPropertiesArray.java | 0 .../model/AdditionalPropertiesBoolean.java | 0 .../model/AdditionalPropertiesClass.java | 0 .../model/AdditionalPropertiesInteger.java | 0 .../model/AdditionalPropertiesNumber.java | 0 .../model/AdditionalPropertiesObject.java | 0 .../model/AdditionalPropertiesString.java | 0 .../main/java/org/openapitools/model/Animal.java | 0 .../model/ArrayOfArrayOfNumberOnly.java | 0 .../org/openapitools/model/ArrayOfNumberOnly.java | 0 .../java/org/openapitools/model/ArrayTest.java | 0 .../main/java/org/openapitools/model/BigCat.java | 0 .../org/openapitools/model/Capitalization.java | 0 .../src/main/java/org/openapitools/model/Cat.java | 0 .../main/java/org/openapitools/model/Category.java | 0 .../org/openapitools/model/ChildWithNullable.java | 0 .../java/org/openapitools/model/ClassModel.java | 0 .../main/java/org/openapitools/model/Client.java | 0 .../openapitools/model/ContainerDefaultValue.java | 0 .../src/main/java/org/openapitools/model/Dog.java | 0 .../java/org/openapitools/model/EnumArrays.java | 0 .../java/org/openapitools/model/EnumClass.java | 0 .../main/java/org/openapitools/model/EnumTest.java | 0 .../src/main/java/org/openapitools/model/File.java | 0 .../openapitools/model/FileSchemaTestClass.java | 0 .../java/org/openapitools/model/FormatTest.java | 0 .../org/openapitools/model/HasOnlyReadOnly.java | 0 .../main/java/org/openapitools/model/MapTest.java | 0 ...ixedPropertiesAndAdditionalPropertiesClass.java | 0 .../org/openapitools/model/Model200Response.java | 0 .../org/openapitools/model/ModelApiResponse.java | 0 .../java/org/openapitools/model/ModelList.java | 0 .../java/org/openapitools/model/ModelReturn.java | 0 .../src/main/java/org/openapitools/model/Name.java | 0 .../openapitools/model/NullableMapProperty.java | 0 .../java/org/openapitools/model/NumberOnly.java | 0 .../main/java/org/openapitools/model/Order.java | 0 .../org/openapitools/model/OuterComposite.java | 0 .../java/org/openapitools/model/OuterEnum.java | 0 .../org/openapitools/model/ParentWithNullable.java | 0 .../src/main/java/org/openapitools/model/Pet.java | 0 .../java/org/openapitools/model/ReadOnlyFirst.java | 0 .../ResponseObjectWithDifferentFieldNames.java | 0 .../org/openapitools/model/SpecialModelName.java | 0 .../src/main/java/org/openapitools/model/Tag.java | 0 .../org/openapitools/model/TypeHolderDefault.java | 0 .../org/openapitools/model/TypeHolderExample.java | 0 .../src/main/java/org/openapitools/model/User.java | 0 .../main/java/org/openapitools/model/XmlItem.java | 0 67 files changed, 18 insertions(+), 17 deletions(-) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/.openapi-generator-ignore (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/.openapi-generator/FILES (99%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/.openapi-generator/VERSION (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/README.md (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/pom.xml (97%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/api/AnotherFakeApi.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/api/FakeApi.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/api/PetApi.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/api/StoreApi.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/api/UserApi.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/AdditionalPropertiesString.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Animal.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ArrayTest.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/BigCat.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Capitalization.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Cat.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Category.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ChildWithNullable.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ClassModel.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Client.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ContainerDefaultValue.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Dog.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/EnumArrays.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/EnumClass.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/EnumTest.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/File.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/FileSchemaTestClass.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/FormatTest.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/HasOnlyReadOnly.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/MapTest.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Model200Response.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ModelApiResponse.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ModelList.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ModelReturn.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Name.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/NullableMapProperty.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/NumberOnly.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Order.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/OuterComposite.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/OuterEnum.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ParentWithNullable.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Pet.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ReadOnlyFirst.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/SpecialModelName.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/Tag.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/TypeHolderDefault.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/TypeHolderExample.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/User.java (100%) rename samples/client/petstore/{spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration => spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator}/src/main/java/org/openapitools/model/XmlItem.java (100%) diff --git a/.github/workflows/samples-jdk17.yaml b/.github/workflows/samples-jdk17.yaml index fe2580523e9e..755b25011f11 100644 --- a/.github/workflows/samples-jdk17.yaml +++ b/.github/workflows/samples-jdk17.yaml @@ -10,7 +10,7 @@ on: - samples/client/petstore/spring-http-interface/** - samples/client/petstore/spring-http-interface-reactive-noResponseEntity/** - samples/client/petstore/spring-http-interface-noResponseEntity/** - - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/** + - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/** - samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/microprofile-rest-client-outer-enum/** # servers @@ -28,7 +28,7 @@ on: - samples/client/petstore/spring-http-interface/** - samples/client/petstore/spring-http-interface-reactive-noResponseEntity/** - samples/client/petstore/spring-http-interface-noResponseEntity/** - - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/** + - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/** - samples/client/petstore/java/webclient-jakarta/** - samples/client/petstore/java/microprofile-rest-client-outer-enum/** # servers @@ -52,7 +52,7 @@ jobs: - samples/client/petstore/spring-http-interface - samples/client/petstore/spring-http-interface-reactive-noResponseEntity - samples/client/petstore/spring-http-interface-noResponseEntity - - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration + - samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator - samples/client/petstore/java/webclient-jakarta - samples/client/petstore/java/microprofile-rest-client-outer-enum # servers diff --git a/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml b/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml index ec26ee0adecf..32f15159d696 100644 --- a/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml +++ b/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml @@ -1,10 +1,10 @@ generatorName: spring library: spring-http-interface -outputDir: samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration +outputDir: samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/JavaSpring additionalProperties: - artifactId: spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration + artifactId: spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator snapshotVersion: "true" hideGenerationTimestamp: "true" # documentation provider should be ignored @@ -14,7 +14,7 @@ additionalProperties: # validation should be ignored useBeanValidation: "true" performBeanValidation: "true" - useHttpServiceProxyFactoryInterfacesConfiguration: "true" + useHttpServiceProxyFactoryInterfacesConfigurator: "true" # needed until updating the default parentVersion (3.1.3) to 3.2+ parentGroupId: "org.springframework.boot" parentArtifactId: "spring-boot-starter-parent" diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 7a4e478a1cdf..018aecda7593 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -99,7 +99,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useBeanValidation|Use BeanValidation API annotations| |true| |useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false| |useFeignClientUrl|Whether to generate Feign client with url parameter.| |true| -|useHttpServiceProxyFactoryInterfacesConfiguration|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.| |false| +|useHttpServiceProxyFactoryInterfacesConfigurator|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.| |false| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| |useOptional|Use Optional container for optional parameters| |false| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index c42a58115815..42d639814100 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -92,7 +92,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useBeanValidation|Use BeanValidation API annotations| |true| |useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false| |useFeignClientUrl|Whether to generate Feign client with url parameter.| |true| -|useHttpServiceProxyFactoryInterfacesConfiguration|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.| |false| +|useHttpServiceProxyFactoryInterfacesConfigurator|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.| |false| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| |useOptional|Use Optional container for optional parameters| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 7bbeae43ade5..1607891e3256 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -102,7 +102,7 @@ public class SpringCodegen extends AbstractJavaCodegen public static final String SPRING_BOOT = "spring-boot"; public static final String SPRING_CLOUD_LIBRARY = "spring-cloud"; public static final String SPRING_HTTP_INTERFACE = "spring-http-interface"; - public static final String USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION = "useHttpServiceProxyFactoryInterfacesConfiguration"; + public static final String USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATOR = "useHttpServiceProxyFactoryInterfacesConfigurator"; public static final String HTTP_INTERFACES_CONFIGURATOR_DEPENDENCY = "httpInterfacesConfiguratorDependency"; public static final String API_FIRST = "apiFirst"; public static final String SPRING_CONTROLLER = "useSpringController"; @@ -167,7 +167,7 @@ public class SpringCodegen extends AbstractJavaCodegen protected boolean generatedConstructorWithRequiredArgs = true; @Getter @Setter protected RequestMappingMode requestMappingMode = RequestMappingMode.controller; - @Setter boolean useHttpServiceProxyFactoryInterfacesConfiguration = false; + @Setter boolean useHttpServiceProxyFactoryInterfacesConfigurator = false; public SpringCodegen() { super(); @@ -271,7 +271,7 @@ public SpringCodegen() { generatedConstructorWithRequiredArgs)); cliOptions.add(new CliOption(RESOURCE_FOLDER, RESOURCE_FOLDER_DESC).defaultValue(this.getResourceFolder())); - cliOptions.add(CliOption.newString(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION, + cliOptions.add(CliOption.newString(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATOR, "Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.") .defaultValue("false") ); @@ -452,7 +452,7 @@ public void processOpts() { } convertPropertyToStringAndWriteBack(RESOURCE_FOLDER, this::setResourceFolder); - convertPropertyToBooleanAndWriteBack(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATION, this::setUseHttpServiceProxyFactoryInterfacesConfiguration); + convertPropertyToBooleanAndWriteBack(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATOR, this::setUseHttpServiceProxyFactoryInterfacesConfigurator); typeMapping.put("file", "org.springframework.core.io.Resource"); importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource"); @@ -537,8 +537,8 @@ public void processOpts() { } } } else if (SPRING_HTTP_INTERFACE.equals(library)) { - String httpInterfacesAbstractConfiguratorFile = useHttpServiceProxyFactoryInterfacesConfiguration ? - "httpServiceProxyFactoryInterfacesConfiguration.mustache" : + String httpInterfacesAbstractConfiguratorFile = useHttpServiceProxyFactoryInterfacesConfigurator ? + "httpServiceProxyFactoryInterfacesConfigurator.mustache" : "httpInterfacesConfiguration.mustache"; supportingFiles.add(new SupportingFile(httpInterfacesAbstractConfiguratorFile, @@ -547,7 +547,7 @@ public void processOpts() { writePropertyBack(USE_BEANVALIDATION, false); writePropertyBack(HTTP_INTERFACES_CONFIGURATOR_DEPENDENCY, - useHttpServiceProxyFactoryInterfacesConfiguration ? + useHttpServiceProxyFactoryInterfacesConfigurator ? "HttpServiceProxyFactory" : "WebClient" ); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator-ignore b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator-ignore similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator-ignore rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator-ignore diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/FILES similarity index 99% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/FILES rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/FILES index f91496ca5b57..52a5fc801199 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/FILES +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/FILES @@ -1,3 +1,4 @@ +.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/api/AnotherFakeApi.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/VERSION similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/.openapi-generator/VERSION rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/VERSION diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/README.md b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/README.md similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/README.md rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/README.md diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/pom.xml b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml similarity index 97% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/pom.xml rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml index 3d8a2136bbf5..84209b5cc1ce 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/pom.xml +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml @@ -1,9 +1,9 @@ 4.0.0 org.openapitools - spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration + spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator jar - spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration + spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator 1.0.0-SNAPSHOT 17 diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/AnotherFakeApi.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeApi.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/PetApi.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/StoreApi.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/api/UserApi.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/AdditionalPropertiesString.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Animal.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ArrayTest.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/BigCat.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Capitalization.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Cat.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Category.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ChildWithNullable.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ClassModel.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Client.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ContainerDefaultValue.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Dog.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumArrays.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumClass.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/EnumTest.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/File.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FileSchemaTestClass.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/FormatTest.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/HasOnlyReadOnly.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MapTest.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Model200Response.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelApiResponse.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelList.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ModelReturn.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Name.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NullableMapProperty.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/NumberOnly.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Order.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterComposite.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterEnum.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/OuterEnum.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ParentWithNullable.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Pet.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ReadOnlyFirst.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/SpecialModelName.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/Tag.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderDefault.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/TypeHolderExample.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/User.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java similarity index 100% rename from samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration/src/main/java/org/openapitools/model/XmlItem.java rename to samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java From c79efb9e18fa7308f9145a332469d0842e5716b5 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Sat, 30 Nov 2024 18:17:20 +0200 Subject: [PATCH 09/12] spring-http-interface: introduce `useHttpServiceProxyFactoryInterfacesConfigurator` config --- ...che => httpServiceProxyFactoryInterfacesConfigurator.mustache} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/{httpServiceProxyFactoryInterfacesConfiguration.mustache => httpServiceProxyFactoryInterfacesConfigurator.mustache} (100%) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfigurator.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfiguration.mustache rename to modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfigurator.mustache From 79fbb71ca58ec20308d1dc6169760d9eef6563b6 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Sat, 30 Nov 2024 18:33:46 +0200 Subject: [PATCH 10/12] spring-http-interface: fix generated files --- .../.openapi-generator/FILES | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/FILES index 52a5fc801199..f91496ca5b57 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/FILES +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/api/AnotherFakeApi.java From 71e28b318791b13f145782ce4f258abb2cd81b68 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Tue, 4 Mar 2025 19:58:06 +0200 Subject: [PATCH 11/12] remove unnecessary imports from httpServiceProxyFactoryInterfacesConfigurator.mustache and parentOverrides from spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml --- ...ceProxyFactoryInterfacesConfiguration.yaml | 4 -- ...roxyFactoryInterfacesConfigurator.mustache | 2 - .../.openapi-generator/VERSION | 2 +- .../pom.xml | 3 +- .../org/openapitools/api/AnotherFakeApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../api/FakeClassnameTags123Api.java | 4 +- .../java/org/openapitools/api/PetApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../HttpInterfacesAbstractConfigurator.java | 4 +- .../model/AdditionalPropertiesAnyType.java | 5 ++- .../model/AdditionalPropertiesArray.java | 5 ++- .../model/AdditionalPropertiesBoolean.java | 5 ++- .../model/AdditionalPropertiesClass.java | 7 +-- .../model/AdditionalPropertiesInteger.java | 5 ++- .../model/AdditionalPropertiesNumber.java | 5 ++- .../model/AdditionalPropertiesObject.java | 5 ++- .../model/AdditionalPropertiesString.java | 5 ++- .../java/org/openapitools/model/Animal.java | 3 +- .../model/ArrayOfArrayOfNumberOnly.java | 3 +- .../openapitools/model/ArrayOfNumberOnly.java | 3 +- .../org/openapitools/model/ArrayTest.java | 3 +- .../java/org/openapitools/model/BigCat.java | 5 ++- .../openapitools/model/Capitalization.java | 15 ++++--- .../main/java/org/openapitools/model/Cat.java | 5 ++- .../java/org/openapitools/model/Category.java | 5 ++- .../openapitools/model/ChildWithNullable.java | 5 ++- .../org/openapitools/model/ClassModel.java | 5 ++- .../java/org/openapitools/model/Client.java | 5 ++- .../model/ContainerDefaultValue.java | 3 +- .../main/java/org/openapitools/model/Dog.java | 5 ++- .../org/openapitools/model/EnumArrays.java | 5 ++- .../org/openapitools/model/EnumClass.java | 2 +- .../java/org/openapitools/model/EnumTest.java | 11 ++--- .../java/org/openapitools/model/File.java | 5 ++- .../model/FileSchemaTestClass.java | 5 ++- .../org/openapitools/model/FormatTest.java | 23 +++++----- .../openapitools/model/HasOnlyReadOnly.java | 7 +-- .../java/org/openapitools/model/MapTest.java | 3 +- ...ropertiesAndAdditionalPropertiesClass.java | 7 +-- .../openapitools/model/Model200Response.java | 7 +-- .../openapitools/model/ModelApiResponse.java | 9 ++-- .../org/openapitools/model/ModelList.java | 5 ++- .../org/openapitools/model/ModelReturn.java | 5 ++- .../java/org/openapitools/model/Name.java | 9 ++-- .../model/NullableMapProperty.java | 3 +- .../org/openapitools/model/NumberOnly.java | 5 ++- .../java/org/openapitools/model/Order.java | 13 +++--- .../openapitools/model/OuterComposite.java | 9 ++-- .../org/openapitools/model/OuterEnum.java | 2 +- .../model/ParentWithNullable.java | 5 ++- .../main/java/org/openapitools/model/Pet.java | 9 ++-- .../org/openapitools/model/ReadOnlyFirst.java | 7 +-- ...ResponseObjectWithDifferentFieldNames.java | 11 ++--- .../openapitools/model/SpecialModelName.java | 5 ++- .../main/java/org/openapitools/model/Tag.java | 7 +-- .../openapitools/model/TypeHolderDefault.java | 3 +- .../openapitools/model/TypeHolderExample.java | 3 +- .../java/org/openapitools/model/User.java | 19 ++++---- .../java/org/openapitools/model/XmlItem.java | 43 ++++++++++--------- 61 files changed, 217 insertions(+), 176 deletions(-) diff --git a/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml b/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml index 32f15159d696..980957a029af 100644 --- a/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml +++ b/bin/configs/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml @@ -15,7 +15,3 @@ additionalProperties: useBeanValidation: "true" performBeanValidation: "true" useHttpServiceProxyFactoryInterfacesConfigurator: "true" - # needed until updating the default parentVersion (3.1.3) to 3.2+ - parentGroupId: "org.springframework.boot" - parentArtifactId: "spring-boot-starter-parent" - parentVersion: "3.2.0" diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfigurator.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfigurator.mustache index 0439052130f1..66db22175959 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfigurator.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/httpServiceProxyFactoryInterfacesConfigurator.mustache @@ -12,8 +12,6 @@ import {{apiPackage}}.{{classname}}; {{/apiInfo}} import org.springframework.context.annotation.Bean; -import org.springframework.web.client.RestClient; -import org.springframework.web.client.support.RestClientAdapter; import org.springframework.web.service.invoker.HttpServiceProxyFactory; public abstract class HttpInterfacesAbstractConfigurator { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/VERSION index 884119126398..96cfbb19ae28 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/.openapi-generator/VERSION @@ -1 +1 @@ -7.11.0-SNAPSHOT +7.13.0-SNAPSHOT diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml index 84209b5cc1ce..41a35cd35de8 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/pom.xml @@ -12,7 +12,8 @@ org.springframework.boot spring-boot-starter-parent - 3.2.0 + 3.1.3 + diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java index 6fc595536876..df1db0383f5c 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.13.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -17,7 +17,7 @@ import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public interface AnotherFakeApi { /** diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java index f5cfab25c9d0..cf5f4be0383a 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.13.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -27,7 +27,7 @@ import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public interface FakeApi { /** diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index da248eedcce4..be032b822c68 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.13.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -17,7 +17,7 @@ import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public interface FakeClassnameTags123Api { /** diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java index 762d67c2374f..3e3315dc807a 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.13.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -20,7 +20,7 @@ import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public interface PetApi { /** diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java index 891a805e2a8a..6216578c548d 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.13.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -18,7 +18,7 @@ import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public interface StoreApi { /** diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java index 62bea1f0d655..90768bb55df2 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.13.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -18,7 +18,7 @@ import jakarta.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public interface UserApi { /** diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index 9df16725d421..6b5f6f684cc1 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.11.0-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.13.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ @@ -13,8 +13,6 @@ import org.openapitools.api.UserApi; import org.springframework.context.annotation.Bean; -import org.springframework.web.client.RestClient; -import org.springframework.web.client.support.RestClientAdapter; import org.springframework.web.service.invoker.HttpServiceProxyFactory; public abstract class HttpInterfacesAbstractConfigurator { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index edb8f14b463e..04885d7011ed 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,10 +21,10 @@ * AdditionalPropertiesAnyType */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class AdditionalPropertiesAnyType { - private String name; + private @Nullable String name; public AdditionalPropertiesAnyType name(String name) { this.name = name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index ece7f532672d..21944046dbd2 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.List; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -21,10 +22,10 @@ * AdditionalPropertiesArray */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class AdditionalPropertiesArray { - private String name; + private @Nullable String name; public AdditionalPropertiesArray name(String name) { this.name = name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 3af35089b92d..347025e55747 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,10 +21,10 @@ * AdditionalPropertiesBoolean */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class AdditionalPropertiesBoolean { - private String name; + private @Nullable String name; public AdditionalPropertiesBoolean name(String name) { this.name = name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 27bcb0024845..85fc2e05f82d 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -23,7 +24,7 @@ * AdditionalPropertiesClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class AdditionalPropertiesClass { @@ -50,11 +51,11 @@ public class AdditionalPropertiesClass { private Map> mapMapAnytype = new HashMap<>(); - private Object anytype1; + private @Nullable Object anytype1; private JsonNullable anytype2 = JsonNullable.undefined(); - private Object anytype3; + private @Nullable Object anytype3; public AdditionalPropertiesClass mapString(Map mapString) { this.mapString = mapString; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index da9cae87770a..b7d9808a0791 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,10 +21,10 @@ * AdditionalPropertiesInteger */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class AdditionalPropertiesInteger { - private String name; + private @Nullable String name; public AdditionalPropertiesInteger name(String name) { this.name = name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 46f95e0ff519..26513fbc90ba 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.math.BigDecimal; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -21,10 +22,10 @@ * AdditionalPropertiesNumber */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class AdditionalPropertiesNumber { - private String name; + private @Nullable String name; public AdditionalPropertiesNumber name(String name) { this.name = name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index b75533e73fac..bccce54ee86d 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Map; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -21,10 +22,10 @@ * AdditionalPropertiesObject */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class AdditionalPropertiesObject { - private String name; + private @Nullable String name; public AdditionalPropertiesObject name(String name) { this.name = name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 1f0bd17b3d4e..efe41ca2634a 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,10 +21,10 @@ * AdditionalPropertiesString */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class AdditionalPropertiesString { - private String name; + private @Nullable String name; public AdditionalPropertiesString name(String name) { this.name = name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java index 14f0262367ea..f36a47502f2a 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -30,7 +31,7 @@ @JsonSubTypes.Type(value = Dog.class, name = "Dog") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Animal { private String className; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 517ea7351b1a..adcdfa1e816f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,7 +21,7 @@ * ArrayOfArrayOfNumberOnly */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ArrayOfArrayOfNumberOnly { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 699feb054c92..7cd0279622bf 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,7 +21,7 @@ * ArrayOfNumberOnly */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ArrayOfNumberOnly { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java index f6f10b80a3f4..422cf118e534 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ArrayTest.java @@ -8,6 +8,7 @@ import java.util.Arrays; import java.util.List; import org.openapitools.model.ReadOnlyFirst; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,7 +21,7 @@ * ArrayTest */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ArrayTest { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java index b9736f97adcf..984d63c1a18a 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/BigCat.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.Cat; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -22,7 +23,7 @@ */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class BigCat extends Cat { /** @@ -64,7 +65,7 @@ public static KindEnum fromValue(String value) { } } - private KindEnum kind; + private @Nullable KindEnum kind; public BigCat() { super(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java index 95fe6ea01eab..5d5466c49b75 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Capitalization.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,20 +17,20 @@ * Capitalization */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Capitalization { - private String smallCamel; + private @Nullable String smallCamel; - private String capitalCamel; + private @Nullable String capitalCamel; - private String smallSnake; + private @Nullable String smallSnake; - private String capitalSnake; + private @Nullable String capitalSnake; - private String scAETHFlowPoints; + private @Nullable String scAETHFlowPoints; - private String ATT_NAME; + private @Nullable String ATT_NAME; public Capitalization smallCamel(String smallCamel) { this.smallCamel = smallCamel; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java index 74a93677bc12..f7c0380bca25 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Cat.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -29,10 +30,10 @@ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Cat extends Animal { - private Boolean declawed; + private @Nullable Boolean declawed; public Cat() { super(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java index f27d7fa4f232..7ff4c8b2efde 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,10 +17,10 @@ * Category */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Category { - private Long id; + private @Nullable Long id; private String name = "default-name"; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java index f5bb38e7cd15..5923c1adc22f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -11,6 +11,7 @@ import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; import org.openapitools.model.ParentWithNullable; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -24,10 +25,10 @@ */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ChildWithNullable extends ParentWithNullable { - private String otherProperty; + private @Nullable String otherProperty; public ChildWithNullable otherProperty(String otherProperty) { this.otherProperty = otherProperty; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java index 3369e07eb162..f309cf4aa587 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ClassModel.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,10 +17,10 @@ * Model for testing model with \"_class\" property */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ClassModel { - private String propertyClass; + private @Nullable String propertyClass; public ClassModel propertyClass(String propertyClass) { this.propertyClass = propertyClass; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java index 50c2e41373f9..3a9b0d76f1b7 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Client.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,10 +17,10 @@ * Client */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Client { - private String client; + private @Nullable String client; public Client client(String client) { this.client = client; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java index ea55ad54d7be..589075725e33 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java @@ -8,6 +8,7 @@ import java.util.Arrays; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,7 +22,7 @@ * ContainerDefaultValue */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ContainerDefaultValue { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java index 3acdd273087c..3f4223071822 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Dog.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.openapitools.model.Animal; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -21,10 +22,10 @@ */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Dog extends Animal { - private String breed; + private @Nullable String breed; public Dog() { super(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java index ea2691c6dcd3..95e836ffa43b 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumArrays.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,7 +21,7 @@ * EnumArrays */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class EnumArrays { /** @@ -58,7 +59,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private JustSymbolEnum justSymbol; + private @Nullable JustSymbolEnum justSymbol; /** * Gets or Sets arrayEnum diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java index a778284781fb..ca1a19b7bccd 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumClass.java @@ -18,7 +18,7 @@ * Gets or Sets EnumClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public enum EnumClass { _ABC("_abc"), diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java index 931b8e756250..0084d3b89e97 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/EnumTest.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.model.OuterEnum; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,7 +21,7 @@ */ @JsonTypeName("Enum_Test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class EnumTest { /** @@ -60,7 +61,7 @@ public static EnumStringEnum fromValue(String value) { } } - private EnumStringEnum enumString; + private @Nullable EnumStringEnum enumString; /** * Gets or Sets enumStringRequired @@ -136,7 +137,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private EnumIntegerEnum enumInteger; + private @Nullable EnumIntegerEnum enumInteger; /** * Gets or Sets enumNumber @@ -173,9 +174,9 @@ public static EnumNumberEnum fromValue(Double value) { } } - private EnumNumberEnum enumNumber; + private @Nullable EnumNumberEnum enumNumber; - private OuterEnum outerEnum; + private @Nullable OuterEnum outerEnum; public EnumTest() { super(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java index f64ba0751ecf..1af18d99892c 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/File.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,10 +17,10 @@ * Must be named `File` for test. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class File { - private String sourceURI; + private @Nullable String sourceURI; public File sourceURI(String sourceURI) { this.sourceURI = sourceURI; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 43a6508ffa7c..a915c6a26a31 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,10 +21,10 @@ * FileSchemaTestClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class FileSchemaTestClass { - private File file; + private @Nullable File file; private List files = new ArrayList<>(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java index 0ae935923aa0..3662bd053dbb 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,7 @@ import java.util.Arrays; import java.util.UUID; import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -24,38 +25,38 @@ */ @JsonTypeName("format_test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class FormatTest { - private Integer integer; + private @Nullable Integer integer; - private Integer int32; + private @Nullable Integer int32; - private Long int64; + private @Nullable Long int64; private BigDecimal number; - private Float _float; + private @Nullable Float _float; - private Double _double; + private @Nullable Double _double; - private String string; + private @Nullable String string; private byte[] _byte; - private org.springframework.core.io.Resource binary; + private @Nullable org.springframework.core.io.Resource binary; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private OffsetDateTime dateTime; + private @Nullable OffsetDateTime dateTime; - private UUID uuid; + private @Nullable UUID uuid; private String password; - private BigDecimal bigDecimal; + private @Nullable BigDecimal bigDecimal; public FormatTest() { super(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index a9fc477d9707..1acbb0f7c2d7 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -18,12 +19,12 @@ */ @JsonTypeName("hasOnlyReadOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class HasOnlyReadOnly { - private String bar; + private @Nullable String bar; - private String foo; + private @Nullable String foo; public HasOnlyReadOnly bar(String bar) { this.bar = bar; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java index e36dde0db900..820bf8dcd51d 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MapTest.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.util.HashMap; import java.util.Map; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -19,7 +20,7 @@ * MapTest */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class MapTest { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index a0c29876948a..b73c9947cc9b 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.UUID; import org.openapitools.model.Animal; import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -22,13 +23,13 @@ * MixedPropertiesAndAdditionalPropertiesClass */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class MixedPropertiesAndAdditionalPropertiesClass { - private UUID uuid; + private @Nullable UUID uuid; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private OffsetDateTime dateTime; + private @Nullable OffsetDateTime dateTime; private Map map = new HashMap<>(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java index 48fc81d79751..78ed6a5c900f 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Model200Response.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -18,12 +19,12 @@ */ @JsonTypeName("200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Model200Response { - private Integer name; + private @Nullable Integer name; - private String propertyClass; + private @Nullable String propertyClass; public Model200Response name(Integer name) { this.name = name; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java index 788ed45bf161..12d63489388d 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -18,14 +19,14 @@ */ @JsonTypeName("ApiResponse") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ModelApiResponse { - private Integer code; + private @Nullable Integer code; - private String type; + private @Nullable String type; - private String message; + private @Nullable String message; public ModelApiResponse code(Integer code) { this.code = code; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java index 62d16ec14325..ec8423fc7f51 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelList.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -18,10 +19,10 @@ */ @JsonTypeName("List") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ModelList { - private String _123list; + private @Nullable String _123list; public ModelList _123list(String _123list) { this._123list = _123list; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java index 39a05be87215..2f2e10d14615 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ModelReturn.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -18,10 +19,10 @@ */ @JsonTypeName("Return") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ModelReturn { - private Integer _return; + private @Nullable Integer _return; public ModelReturn _return(Integer _return) { this._return = _return; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java index 712005adf672..616043e5bbca 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Name.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,16 +17,16 @@ * Model for testing model name same as property name */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Name { private Integer name; - private Integer snakeCase; + private @Nullable Integer snakeCase; - private String property; + private @Nullable String property; - private Integer _123number; + private @Nullable Integer _123number; public Name() { super(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java index 51803b785016..ba3a3b3edc60 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NullableMapProperty.java @@ -8,6 +8,7 @@ import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,7 +22,7 @@ * NullableMapProperty */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class NullableMapProperty { diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java index 44499456b67e..1e0abf99df74 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/NumberOnly.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.math.BigDecimal; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -17,10 +18,10 @@ * NumberOnly */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class NumberOnly { - private BigDecimal justNumber; + private @Nullable BigDecimal justNumber; public NumberOnly justNumber(BigDecimal justNumber) { this.justNumber = justNumber; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java index 32a2240f4b1e..d45801fc65c7 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Order.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -19,17 +20,17 @@ * Order */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Order { - private Long id; + private @Nullable Long id; - private Long petId; + private @Nullable Long petId; - private Integer quantity; + private @Nullable Integer quantity; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private OffsetDateTime shipDate; + private @Nullable OffsetDateTime shipDate; /** * Order Status @@ -68,7 +69,7 @@ public static StatusEnum fromValue(String value) { } } - private StatusEnum status; + private @Nullable StatusEnum status; private Boolean complete = false; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java index b8dd246a115d..70b8fff35609 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterComposite.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.math.BigDecimal; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -17,14 +18,14 @@ * OuterComposite */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class OuterComposite { - private BigDecimal myNumber; + private @Nullable BigDecimal myNumber; - private String myString; + private @Nullable String myString; - private Boolean myBoolean; + private @Nullable Boolean myBoolean; public OuterComposite myNumber(BigDecimal myNumber) { this.myNumber = myNumber; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java index c2f06e9a7559..40cf34b308d6 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/OuterEnum.java @@ -18,7 +18,7 @@ * Gets or Sets OuterEnum */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public enum OuterEnum { PLACED("placed"), diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java index 1972557b872c..b486430f8cd1 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; +import org.springframework.lang.Nullable; import java.util.NoSuchElementException; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -32,7 +33,7 @@ @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") }) -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ParentWithNullable { /** @@ -68,7 +69,7 @@ public static TypeEnum fromValue(String value) { } } - private TypeEnum type; + private @Nullable TypeEnum type; private JsonNullable nullableProperty = JsonNullable.undefined(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java index 7a6620c85a68..cfece569f4e7 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java @@ -13,6 +13,7 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -25,12 +26,12 @@ * Pet */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Pet { - private Long id; + private @Nullable Long id; - private Category category; + private @Nullable Category category; private String name; @@ -78,7 +79,7 @@ public static StatusEnum fromValue(String value) { } @Deprecated - private StatusEnum status; + private @Nullable StatusEnum status; public Pet() { super(); diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 10fd954f431c..5f6acd1b0862 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,12 +17,12 @@ * ReadOnlyFirst */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ReadOnlyFirst { - private String bar; + private @Nullable String bar; - private String baz; + private @Nullable String baz; public ReadOnlyFirst bar(String bar) { this.bar = bar; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java index 6c13e5974ff4..8dc1e33fba28 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,16 +17,16 @@ * ResponseObjectWithDifferentFieldNames */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class ResponseObjectWithDifferentFieldNames { - private String normalPropertyName; + private @Nullable String normalPropertyName; - private String UPPER_CASE_PROPERTY_SNAKE; + private @Nullable String UPPER_CASE_PROPERTY_SNAKE; - private String lowerCasePropertyDashes; + private @Nullable String lowerCasePropertyDashes; - private String propertyNameWithSpaces; + private @Nullable String propertyNameWithSpaces; public ResponseObjectWithDifferentFieldNames normalPropertyName(String normalPropertyName) { this.normalPropertyName = normalPropertyName; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java index a0bedcc4b291..ed028075a49d 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/SpecialModelName.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -18,10 +19,10 @@ */ @JsonTypeName("_special_model.name_") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class SpecialModelName { - private Long $specialPropertyName; + private @Nullable Long $specialPropertyName; public SpecialModelName $specialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java index c0ed997fa827..87e47898ba58 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Tag.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,12 +17,12 @@ * Tag */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class Tag { - private Long id; + private @Nullable Long id; - private String name; + private @Nullable String name; public Tag id(Long id) { this.id = id; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java index 2116efb59766..c1f5b537b708 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,7 +21,7 @@ * TypeHolderDefault */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class TypeHolderDefault { private String stringItem = "what"; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java index 63afd43b8798..906693b16809 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,7 +21,7 @@ * TypeHolderExample */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class TypeHolderExample { private String stringItem; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java index 11e893ed6712..2565176c2944 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/User.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -16,24 +17,24 @@ * User */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class User { - private Long id; + private @Nullable Long id; - private String username; + private @Nullable String username; - private String firstName; + private @Nullable String firstName; - private String lastName; + private @Nullable String lastName; - private String email; + private @Nullable String email; - private String password; + private @Nullable String password; - private String phone; + private @Nullable String phone; - private Integer userStatus; + private @Nullable Integer userStatus; public User id(Long id) { this.id = id; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java index 300d1a000db7..eea30b3473c1 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/XmlItem.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import jakarta.validation.constraints.NotNull; @@ -20,27 +21,27 @@ * XmlItem */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.11.0-SNAPSHOT") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.13.0-SNAPSHOT") public class XmlItem { - private String attributeString; + private @Nullable String attributeString; - private BigDecimal attributeNumber; + private @Nullable BigDecimal attributeNumber; - private Integer attributeInteger; + private @Nullable Integer attributeInteger; - private Boolean attributeBoolean; + private @Nullable Boolean attributeBoolean; private List wrappedArray = new ArrayList<>(); - private String nameString; + private @Nullable String nameString; - private BigDecimal nameNumber; + private @Nullable BigDecimal nameNumber; - private Integer nameInteger; + private @Nullable Integer nameInteger; - private Boolean nameBoolean; + private @Nullable Boolean nameBoolean; private List nameArray = new ArrayList<>(); @@ -48,13 +49,13 @@ public class XmlItem { private List nameWrappedArray = new ArrayList<>(); - private String prefixString; + private @Nullable String prefixString; - private BigDecimal prefixNumber; + private @Nullable BigDecimal prefixNumber; - private Integer prefixInteger; + private @Nullable Integer prefixInteger; - private Boolean prefixBoolean; + private @Nullable Boolean prefixBoolean; private List prefixArray = new ArrayList<>(); @@ -62,13 +63,13 @@ public class XmlItem { private List prefixWrappedArray = new ArrayList<>(); - private String namespaceString; + private @Nullable String namespaceString; - private BigDecimal namespaceNumber; + private @Nullable BigDecimal namespaceNumber; - private Integer namespaceInteger; + private @Nullable Integer namespaceInteger; - private Boolean namespaceBoolean; + private @Nullable Boolean namespaceBoolean; private List namespaceArray = new ArrayList<>(); @@ -76,13 +77,13 @@ public class XmlItem { private List namespaceWrappedArray = new ArrayList<>(); - private String prefixNsString; + private @Nullable String prefixNsString; - private BigDecimal prefixNsNumber; + private @Nullable BigDecimal prefixNsNumber; - private Integer prefixNsInteger; + private @Nullable Integer prefixNsInteger; - private Boolean prefixNsBoolean; + private @Nullable Boolean prefixNsBoolean; private List prefixNsArray = new ArrayList<>(); From 640837469068298553a6c31bbc8a149b08af8fb7 Mon Sep 17 00:00:00 2001 From: Ionut Baranga Date: Thu, 6 Mar 2025 19:24:40 +0200 Subject: [PATCH 12/12] remove unnecessary paramDoc.mustache, update `useHttpServiceProxyFactoryInterfacesConfigurator` parameter docs of `spring-http-interface` library --- docs/generators/java-camel.md | 2 +- docs/generators/spring.md | 2 +- .../java/org/openapitools/codegen/languages/SpringCodegen.java | 2 +- .../libraries/spring-http-interface/paramDoc.mustache | 0 4 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/paramDoc.mustache diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index efbc7b425476..046fa7b77332 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -100,7 +100,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useBeanValidation|Use BeanValidation API annotations| |true| |useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false| |useFeignClientUrl|Whether to generate Feign client with url parameter.| |true| -|useHttpServiceProxyFactoryInterfacesConfigurator|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.| |false| +|useHttpServiceProxyFactoryInterfacesConfigurator|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces.| |false| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| |useOptional|Use Optional container for optional parameters| |false| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 5e438d3d3338..03b67aa1c1d1 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -93,7 +93,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useBeanValidation|Use BeanValidation API annotations| |true| |useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false| |useFeignClientUrl|Whether to generate Feign client with url parameter.| |true| -|useHttpServiceProxyFactoryInterfacesConfigurator|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.| |false| +|useHttpServiceProxyFactoryInterfacesConfigurator|Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces.| |false| |useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false| |useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false| |useOptional|Use Optional container for optional parameters| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index f4f1177838c6..0724a10f1a73 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -264,7 +264,7 @@ public SpringCodegen() { optionalAcceptNullable)); cliOptions.add(CliOption.newString(USE_HTTP_SERVICE_PROXY_FACTORY_INTERFACES_CONFIGURATOR, - "Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces. Requires spring-web 6.1+.") + "Generate HttpInterfacesAbstractConfigurator based on an HttpServiceProxyFactory instance (as opposed to a WebClient instance, when disabled) for generating Spring HTTP interfaces.") .defaultValue("false") ); supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application."); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/paramDoc.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-http-interface/paramDoc.mustache deleted file mode 100644 index e69de29bb2d1..000000000000