diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 5926e10b4b4..8643d6d2d3f 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -39,7 +39,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index d0b7bf3391e..90a2971c994 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -55,7 +55,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springfox**
Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generatedConstructorWithRequiredArgs|Whether to generate constructors with required args for models| |true| |groupId|groupId in generated pom.xml| |org.openapitools| |hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md index 2bd748883bb..1308bcad82b 100644 --- a/docs/generators/java-helidon-client.md +++ b/docs/generators/java-helidon-client.md @@ -37,7 +37,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |fullProject|If set to true, it will generate all files; if set to false, it will only generate API files. If unspecified, the behavior depends on whether a project exists or not: if it does not, same as true; if it does, same as false. Note that test files are never overwritten.| || |groupId|groupId in generated pom.xml| |org.openapitools| |helidonVersion|Helidon version for generated code| |3.0.1| diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md index 0d2eba8a19b..d7298972082 100644 --- a/docs/generators/java-helidon-server.md +++ b/docs/generators/java-helidon-server.md @@ -36,7 +36,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |fullProject|If set to true, it will generate all files; if set to false, it will only generate API files. If unspecified, the behavior depends on whether a project exists or not: if it does not, same as true; if it does, same as false. Note that test files are never overwritten.| || |gradleProject|Whether to generate gradle project instead of maven.| |false| |groupId|groupId in generated pom.xml| |org.openapitools| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index ebfedc4e37b..f7aae04fd87 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index e7febf4a352..52af7c2cf05 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -50,7 +50,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateOperationOnlyForFirstTag|When false, the operation method will be duplicated in each of the tags if multiple tags are assigned to this operation. If true, each operation will be generated only once in the first assigned tag.| |false| |generateSwaggerAnnotations|Specify if you want to generate swagger annotations and which version|
**swagger2**
Use io.swagger.core.v3:swagger-annotations for annotating operations and schemas
**true**
Equivalent to "swagger2"
**false**
Do not generate swagger annotations
**swagger1**
Use io.swagger:swagger-annotations for annotating operations and schemas
|false| |groupId|groupId in generated pom.xml| |org.openapitools| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 8d98c6dd7b0..54cafb5ca40 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -45,7 +45,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateControllerAsAbstract|Generate an abstract class for controller to be extended. (apiPackage is then used for the abstract class, and controllerPackage is used for implementation that extends it.)| |false| |generateControllerFromExamples|Generate the implementation of controller and tests from parameter and return examples that will verify that the api works as desired (for testing)| |false| |generateOperationOnlyForFirstTag|When false, the operation method will be duplicated in each of the tags if multiple tags are assigned to this operation. If true, each operation will be generated only once in the first assigned tag.| |true| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index d17922581d2..6276bb6a343 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 5e8d83112c3..50f7de28358 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -43,7 +43,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |eurekaUri|Eureka URI| |null| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |com.prokarma| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 2306556318e..53538775e34 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -44,7 +44,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 979615ab392..a7961dba585 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 5702c0f7dd3..a078a520f11 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 5288e1f00c7..703926d080a 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/java.md b/docs/generators/java.md index d69cf231f1b..7f7f6391bf5 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -48,7 +48,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |errorObjectType|Error Object type. (This option is for okhttp-gson-next-gen only)| |null| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateClientAsBean|For resttemplate, configure whether to create `ApiClient.java` and Apis clients as bean (with `@Component` annotation).| |false| |gradleProperties|Append additional Gradle properties to the gradle.properties file| |null| |groupId|groupId in generated pom.xml| |org.openapitools| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 16a21e89cf9..2902f859086 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateBuilders|Whether to generate builders for models.| |false| |generatePom|Whether to generate pom.xml if the file does not already exist.| |true| |groupId|groupId in generated pom.xml| |org.openapitools| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index ef0e1214f53..bae71979f19 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 8dca1f9074c..f0979dca4da 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -42,7 +42,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| |generateNonSpringApplication|Generate non-Spring application| |false| |generateOperationBody|Generate fully functional operation bodies| |false| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 8a10bb5c38b..5dc0c63900a 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -42,7 +42,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| |generateNonSpringApplication|Generate non-Spring application| |false| |generateSpringApplication|Generate Spring application| |false| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 6c34957e2df..cc1b660e186 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 8dd40b9d35a..28ea903e277 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index a3748a8f74f..e5112631f67 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 76fc132f27f..f30ae37e81a 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateBuilders|Whether to generate builders for models.| |false| |generatePom|Whether to generate pom.xml if the file does not already exist.| |true| |groupId|groupId in generated pom.xml| |org.openapitools| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 32e546edf5c..132e2aaad63 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -48,7 +48,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |documentationProvider|Select the OpenAPI documentation provider.|
**none**
Do not publish an OpenAPI specification.
**source**
Publish the original input OpenAPI specification.
**springfox**
Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.
**springdoc**
Generate an OpenAPI 3 specification using SpringDoc.
|springdoc| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generatedConstructorWithRequiredArgs|Whether to generate constructors with required args for models| |true| |groupId|groupId in generated pom.xml| |org.openapitools| |hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 8cd71b83755..a282b920af4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -65,7 +65,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code private final Logger LOGGER = LoggerFactory.getLogger(AbstractJavaCodegen.class); private static final String ARTIFACT_VERSION_DEFAULT_VALUE = "1.0.0"; - public static final String FULL_JAVA_UTIL = "fullJavaUtil"; public static final String DEFAULT_LIBRARY = ""; public static final String DATE_LIBRARY = "dateLibrary"; public static final String SUPPORT_ASYNC = "supportAsync"; @@ -115,9 +114,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code // this must not be OS-specific protected String sourceFolder = projectFolder + "/java"; protected String testFolder = projectTestFolder + "/java"; - protected boolean fullJavaUtil; protected boolean discriminatorCaseSensitive = true; // True if the discriminator value lookup should be case-sensitive. - protected String javaUtilPrefix = ""; protected Boolean serializableModel = false; protected boolean serializeBigDecimalAsString = false; protected String apiDocPath = "docs/"; @@ -253,7 +250,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC).defaultValue(this.getSourceFolder())); cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC, this.getSerializableModel())); cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING_DESC, serializeBigDecimalAsString)); - cliOptions.add(CliOption.newBoolean(FULL_JAVA_UTIL, "whether to use fully qualified name for classes under java.util. This option only works for Java API client", fullJavaUtil)); cliOptions.add(CliOption.newBoolean(DISCRIMINATOR_CASE_SENSITIVE, "Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client", discriminatorCaseSensitive)); cliOptions.add(CliOption.newBoolean(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC, this.isHideGenerationTimestamp())); cliOptions.add(CliOption.newBoolean(WITH_XML, "whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)")); @@ -523,9 +519,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code // need to put back serializableModel (boolean) into additionalProperties as value in additionalProperties is string additionalProperties.put(CodegenConstants.SERIALIZABLE_MODEL, serializableModel); - if (additionalProperties.containsKey(FULL_JAVA_UTIL)) { - this.setFullJavaUtil(Boolean.parseBoolean(additionalProperties.get(FULL_JAVA_UTIL).toString())); - } if (additionalProperties.containsKey(DISCRIMINATOR_CASE_SENSITIVE)) { this.setDiscriminatorCaseSensitive(Boolean.parseBoolean(additionalProperties.get(DISCRIMINATOR_CASE_SENSITIVE).toString())); } else { @@ -536,12 +529,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code } additionalProperties.put(DISCRIMINATOR_CASE_SENSITIVE, this.discriminatorCaseSensitive); - if (fullJavaUtil) { - javaUtilPrefix = "java.util."; - } - additionalProperties.put(FULL_JAVA_UTIL, fullJavaUtil); - additionalProperties.put("javaUtilPrefix", javaUtilPrefix); - if (additionalProperties.containsKey(WITH_XML)) { this.setWithXml(Boolean.parseBoolean(additionalProperties.get(WITH_XML).toString())); } @@ -591,27 +578,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code importMapping.put("List", "java.util.List"); importMapping.put("Set", "java.util.Set"); - if (fullJavaUtil) { - typeMapping.put("array", "java.util.List"); - typeMapping.put("set", "java.util.Set"); - typeMapping.put("map", "java.util.Map"); - typeMapping.put("DateTime", "java.util.Date"); - typeMapping.put("UUID", "java.util.UUID"); - typeMapping.remove("List"); - importMapping.remove("Date"); - importMapping.remove("Map"); - importMapping.remove("HashMap"); - importMapping.remove("Array"); - importMapping.remove("ArrayList"); - importMapping.remove("List"); - importMapping.remove("Set"); - importMapping.remove("DateTime"); - importMapping.remove("UUID"); - instantiationTypes.put("array", "java.util.ArrayList"); - instantiationTypes.put("set", "java.util.LinkedHashSet"); - instantiationTypes.put("map", "java.util.HashMap"); - } - this.sanitizeConfig(); // optional jackson mappings for BigDecimal support @@ -1478,19 +1444,17 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code } } - if (!fullJavaUtil) { - if ("array".equals(property.containerType)) { - model.imports.add("ArrayList"); - } else if ("set".equals(property.containerType)) { - model.imports.add("LinkedHashSet"); - boolean canNotBeWrappedToNullable = !openApiNullable || !property.isNullable; - if (canNotBeWrappedToNullable) { - model.imports.add("JsonDeserialize"); - property.vendorExtensions.put("x-setter-extra-annotation", "@JsonDeserialize(as = LinkedHashSet.class)"); - } - } else if ("map".equals(property.containerType)) { - model.imports.add("HashMap"); + if ("array".equals(property.containerType)) { + model.imports.add("ArrayList"); + } else if ("set".equals(property.containerType)) { + model.imports.add("LinkedHashSet"); + boolean canNotBeWrappedToNullable = !openApiNullable || !property.isNullable; + if (canNotBeWrappedToNullable) { + model.imports.add("JsonDeserialize"); + property.vendorExtensions.put("x-setter-extra-annotation", "@JsonDeserialize(as = LinkedHashSet.class)"); } + } else if ("map".equals(property.containerType)) { + model.imports.add("HashMap"); } if (!BooleanUtils.toBoolean(model.isEnum)) { @@ -1954,10 +1918,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code return p.replaceAll("\"", "%22"); } - public void setFullJavaUtil(boolean fullJavaUtil) { - this.fullJavaUtil = fullJavaUtil; - } - /** * Set whether discriminator value lookup is case-sensitive or not. * diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java index ac6ce1e43f7..843eab71a63 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java @@ -160,9 +160,6 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen { this.setTitle((String) this.additionalProperties.get(TITLE)); } this.additionalProperties.put(CodegenConstants.SERIALIZABLE_MODEL, serializableModel); - if (this.additionalProperties.containsKey(FULL_JAVA_UTIL)) { - this.setFullJavaUtil(Boolean.parseBoolean(this.additionalProperties.get(FULL_JAVA_UTIL).toString())); - } if (this.additionalProperties.containsKey(EUREKA_URI)) { this.setEurekaUri((String) this.additionalProperties.get(EUREKA_URI)); @@ -173,11 +170,6 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen { if (this.additionalProperties.containsKey(SPRINGADMIN_URI)) { this.setSpringBootAdminUri((String) this.additionalProperties.get(SPRINGADMIN_URI)); } - if (fullJavaUtil) { - javaUtilPrefix = "java.util."; - } - this.additionalProperties.put(FULL_JAVA_UTIL, fullJavaUtil); - this.additionalProperties.put("javaUtilPrefix", javaUtilPrefix); this.additionalProperties.put(SUPPORT_JAVA6, false); this.additionalProperties.put("java8", true); diff --git a/modules/openapi-generator/src/main/resources/Java/api.mustache b/modules/openapi-generator/src/main/resources/Java/api.mustache index 28b18e2d16f..98f6d0cbaea 100644 --- a/modules/openapi-generator/src/main/resources/Java/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api.mustache @@ -13,12 +13,10 @@ import {{invokerPackage}}.Pair; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} {{>generatedAnnotation}} {{#operations}} @@ -76,11 +74,11 @@ public class {{classname}} { .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; // query params - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}List localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); {{#queryParams}} {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{.}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); diff --git a/modules/openapi-generator/src/main/resources/Java/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/api_test.mustache index b9573eb260e..a579d7412b6 100644 --- a/modules/openapi-generator/src/main/resources/Java/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api_test.mustache @@ -11,13 +11,11 @@ import org.junit.Assert; import java.time.LocalDate; import java.time.OffsetDateTime; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache index 4b542299a52..d1bd6792adc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache @@ -13,14 +13,12 @@ import {{invokerPackage}}.Pair; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.StringJoiner; -{{/fullJavaUtil}} {{>generatedAnnotation}} {{#operations}} @@ -106,13 +104,13 @@ public class {{classname}} { String localVarPath = "{{{path}}}"{{#pathParams}} .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; - {{javaUtilPrefix}}StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}List localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); {{#queryParams}} {{#isDeepObject}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api_test.mustache index ca6173a61c0..0281b4d80ce 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api_test.mustache @@ -11,13 +11,11 @@ import org.junit.Assert; import java.time.LocalDate; import java.time.OffsetDateTime; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache index ee14898cce7..c89c557d634 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache @@ -10,12 +10,10 @@ import {{modelPackage}}.ApiResponse; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} import feign.*; {{>generatedAnnotation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api_test.mustache index c579a5c9db8..de27c161011 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api_test.mustache @@ -8,12 +8,10 @@ import org.junit.jupiter.api.BeforeEach; import java.time.LocalDate; import java.time.OffsetDateTime; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/model_test.mustache index 0d75e120b09..2759ff5252f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/model_test.mustache @@ -6,13 +6,6 @@ package {{package}}; {{/imports}} import org.junit.jupiter.api.Test; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api_test.mustache index e81a6cf29c5..f4bac8ac543 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api_test.mustache @@ -10,12 +10,10 @@ import org.junit.Ignore; import java.io.IOException; import java.time.LocalDate; import java.time.OffsetDateTime; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache index 0c2130d2e3e..5f8019da4f4 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache @@ -11,14 +11,12 @@ import {{javaxPackage}}.ws.rs.core.GenericType; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} {{>generatedAnnotation}} {{#operations}} public class {{classname}} { @@ -137,7 +135,7 @@ public class {{classname}} { {{#queryParams}} {{#-first}} // Query parameters - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList<>( + List localVarQueryParams = new ArrayList<>( apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}) ); {{/-first}} @@ -151,7 +149,7 @@ public class {{classname}} { {{#headerParams}} {{#-first}} // Header parameters - {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}LinkedHashMap<>(); + Map localVarHeaderParams = new LinkedHashMap<>(); {{/-first}} {{^required}}if ({{paramName}} != null) { {{/required}}localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}} @@ -163,7 +161,7 @@ public class {{classname}} { {{#cookieParams}} {{#-first}} // Cookie parameters - {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}LinkedHashMap<>(); + Map localVarCookieParams = new LinkedHashMap<>(); {{/-first}} {{^required}}if ({{paramName}} != null) { {{/required}}localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}} @@ -175,7 +173,7 @@ public class {{classname}} { {{#formParams}} {{#-first}} // Form parameters - {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}LinkedHashMap<>(); + Map localVarFormParams = new LinkedHashMap<>(); {{/-first}} {{^required}}if ({{paramName}} != null) { {{/required}}localVarFormParams.put("{{baseName}}", {{paramName}});{{^required}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache index eb5101b1a60..fc4ecf4d470 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache @@ -11,13 +11,11 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model_test.mustache index 2d4ccdd1a14..acd659b6662 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/model_test.mustache @@ -9,13 +9,6 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -{{/fullJavaUtil}} /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache index 0c2130d2e3e..5f8019da4f4 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api.mustache @@ -11,14 +11,12 @@ import {{javaxPackage}}.ws.rs.core.GenericType; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} {{>generatedAnnotation}} {{#operations}} public class {{classname}} { @@ -137,7 +135,7 @@ public class {{classname}} { {{#queryParams}} {{#-first}} // Query parameters - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList<>( + List localVarQueryParams = new ArrayList<>( apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}) ); {{/-first}} @@ -151,7 +149,7 @@ public class {{classname}} { {{#headerParams}} {{#-first}} // Header parameters - {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}LinkedHashMap<>(); + Map localVarHeaderParams = new LinkedHashMap<>(); {{/-first}} {{^required}}if ({{paramName}} != null) { {{/required}}localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}} @@ -163,7 +161,7 @@ public class {{classname}} { {{#cookieParams}} {{#-first}} // Cookie parameters - {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}LinkedHashMap<>(); + Map localVarCookieParams = new LinkedHashMap<>(); {{/-first}} {{^required}}if ({{paramName}} != null) { {{/required}}localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}} @@ -175,7 +173,7 @@ public class {{classname}} { {{#formParams}} {{#-first}} // Form parameters - {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}LinkedHashMap<>(); + Map localVarFormParams = new LinkedHashMap<>(); {{/-first}} {{^required}}if ({{paramName}} != null) { {{/required}}localVarFormParams.put("{{baseName}}", {{paramName}});{{^required}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_test.mustache index eb5101b1a60..fc4ecf4d470 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/api_test.mustache @@ -11,13 +11,11 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_test.mustache index 2d4ccdd1a14..acd659b6662 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey3/model_test.mustache @@ -9,13 +9,6 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -{{/fullJavaUtil}} /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache index abefee7308a..a6567c3eba0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache @@ -12,15 +12,11 @@ import org.eclipse.microprofile.rest.client.RestClientBuilder; import java.net.URL; import java.net.MalformedURLException; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -{{/fullJavaUtil}} - - /** {{#appName}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index 756face0ddf..e8bc9326509 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -36,14 +36,12 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.StringJoiner; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Consumer; -{{/fullJavaUtil}} {{#asyncNative}} import java.util.concurrent.CompletableFuture; @@ -55,10 +53,10 @@ public class {{classname}} { private final HttpClient memberVarHttpClient; private final ObjectMapper memberVarObjectMapper; private final String memberVarBaseUri; - private final {{#fullJavaUtil}}java.util.function.{{/fullJavaUtil}}Consumer memberVarInterceptor; + private final Consumer memberVarInterceptor; private final Duration memberVarReadTimeout; - private final {{#fullJavaUtil}}java.util.function.{{/fullJavaUtil}}Consumer> memberVarResponseInterceptor; - private final {{#fullJavaUtil}}java.util.function.{{/fullJavaUtil}}Consumer> memberVarAsyncResponseInterceptor; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; public {{classname}}() { this(new ApiClient()); @@ -352,8 +350,8 @@ public class {{classname}} { .replace({{=<% %>=}}"{<%baseName%>}"<%={{ }}=%>, ApiClient.urlEncode({{{paramName}}}.toString())){{/pathParams}}; {{#hasQueryParams}} - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList<>(); - {{javaUtilPrefix}}StringJoiner localVarQueryStringJoiner = new {{javaUtilPrefix}}StringJoiner("&"); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; {{#queryParams}} localVarQueryParameterBaseName = "{{{baseName}}}"; @@ -402,7 +400,7 @@ public class {{classname}} { {{/queryParams}} if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { - {{javaUtilPrefix}}StringJoiner queryJoiner = new {{javaUtilPrefix}}StringJoiner("&"); + StringJoiner queryJoiner = new StringJoiner("&"); localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); if (localVarQueryStringJoiner.length() != 0) { queryJoiner.add(localVarQueryStringJoiner.toString()); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api_test.mustache index ffcf05ec30f..dc56ce78474 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api_test.mustache @@ -8,13 +8,11 @@ import {{invokerPackage}}.ApiException; import org.junit.Test; import org.junit.Ignore; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -{{/fullJavaUtil}} {{#asyncNative}} import java.util.concurrent.CompletableFuture; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index d8047a61c01..b86f781baf6 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -42,7 +42,6 @@ import java.lang.reflect.Type; {{/imports}} import java.lang.reflect.Type; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -50,7 +49,6 @@ import java.util.Map; {{#supportStreaming}} import java.io.InputStream; {{/supportStreaming}} -{{/fullJavaUtil}} import {{javaxPackage}}.ws.rs.core.GenericType; {{#operations}} @@ -156,11 +154,11 @@ public class {{classname}} { {{/allParams}} {{/dynamicOperations}} - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}List localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); {{#formParams}} if ({{paramName}} != null) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache index f14f2cbc196..bf1ac11aa48 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache @@ -8,7 +8,6 @@ import {{invokerPackage}}.ApiException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -16,7 +15,6 @@ import java.util.Map; {{#supportStreaming}} import java.io.InputStream; {{/supportStreaming}} -{{/fullJavaUtil}} /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache index ac4bf9a418c..040d319bf11 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/model_test.mustache @@ -7,13 +7,6 @@ package {{package}}; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache index 2a0f41737c6..aa84b2b9eca 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache @@ -6,7 +6,6 @@ import {{apiPackage}}.*; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import io.restassured.builder.RequestSpecBuilder; import java.util.function.Consumer; import java.util.function.Supplier; @@ -15,8 +14,6 @@ import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; import static io.restassured.config.RestAssuredConfig.config; import static {{invokerPackage}}.{{#gson}}GsonObjectMapper.gson{{/gson}}{{#jackson}}JacksonObjectMapper.jackson{{/jackson}}; -{{/fullJavaUtil}} - public class ApiClient { {{#basePath}} public static final String BASE_URI = "{{.}}"; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache index 0c8736061e7..6365d31583e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache @@ -8,7 +8,6 @@ import com.google.gson.reflect.TypeToken; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -30,7 +29,6 @@ import java.lang.reflect.Type; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; -{{/fullJavaUtil}} {{#gson}} import {{invokerPackage}}.JSON; {{/gson}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_test.mustache index af38dc83365..aa1c47a2684 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_test.mustache @@ -14,12 +14,10 @@ import org.junit.Ignore; import java.time.LocalDate; import java.time.OffsetDateTime; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; import static io.restassured.config.RestAssuredConfig.config; import static {{invokerPackage}}.{{#gson}}GsonObjectMapper.gson{{/gson}}{{#jackson}}JacksonObjectMapper.jackson{{/jackson}}; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache index 74094c551fa..773fc51cedc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache @@ -10,12 +10,10 @@ import {{javaxPackage}}.ws.rs.core.GenericType; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} {{>generatedAnnotation}} {{#operations}} @@ -69,10 +67,10 @@ public class {{classname}} { .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; // query params - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); {{#queryParams}} localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache index ff79da61e66..92f45260a06 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache @@ -5,12 +5,12 @@ import {{invokerPackage}}.ApiClient; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}}import java.util.Collections; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.stream.Collectors;{{/fullJavaUtil}} +import java.util.stream.Collectors; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache index c4551ca7af4..56d4e216866 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache @@ -9,12 +9,10 @@ import org.junit.Ignore; import java.time.LocalDate; import java.time.OffsetDateTime; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api.mustache index 79e4ff1374b..bd3d62f8b7a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api.mustache @@ -9,12 +9,10 @@ import retrofit.mime.*; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} {{#operations}} public interface {{classname}} { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api_test.mustache index 112d7f73a80..8698cdcb84d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api_test.mustache @@ -6,12 +6,10 @@ import {{invokerPackage}}.ApiClient; import org.junit.Before; import org.junit.Test; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache index 75418b07c16..001b3170086 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache @@ -28,13 +28,11 @@ import okhttp3.MultipartBody; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -{{/fullJavaUtil}} {{#operations}} public interface {{classname}} { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api_test.mustache index 8b547d9e970..8ca8724b4ce 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api_test.mustache @@ -8,12 +8,10 @@ import org.junit.Test; import java.time.LocalDate; import java.time.OffsetDateTime; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache index 2b7512d192d..f793699bea2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache @@ -14,12 +14,10 @@ import okhttp3.MultipartBody; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} import play.libs.F; import retrofit2.Response; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache index d4e97cc347b..de6a6f6d91f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache @@ -14,12 +14,10 @@ import okhttp3.MultipartBody; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} import java.util.concurrent.*; import retrofit2.Response; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache index dd3339ff840..a450a583cf5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache @@ -17,12 +17,10 @@ import okhttp3.MultipartBody; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} import java.util.concurrent.*; import retrofit2.Response; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/api_test.mustache index f4fee565f4f..df1c211856e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/api_test.mustache @@ -23,12 +23,10 @@ import io.vertx.ext.unit.Async; import java.time.LocalDate; import java.time.OffsetDateTime; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache index 974f306340c..0545c991a84 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache @@ -4,14 +4,12 @@ import {{invokerPackage}}.ApiClient; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.stream.Collectors; -{{/fullJavaUtil}} import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.LinkedMultiValueMap; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache index 62a89973bb3..f32a1042f71 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache @@ -7,13 +7,11 @@ package {{package}}; import org.junit.Test; import org.junit.Ignore; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -{{/fullJavaUtil}} /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/Java/model_test.mustache b/modules/openapi-generator/src/main/resources/Java/model_test.mustache index 07468db5657..d5c03d1e1a7 100644 --- a/modules/openapi-generator/src/main/resources/Java/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/model_test.mustache @@ -8,13 +8,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache index da7dff4a07e..85c4dd5b695 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache @@ -27,13 +27,11 @@ import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; import com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvider; import org.apache.cxf.jaxrs.provider.MultipartProvider; -{{^fullJavaUtil}} import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -{{/fullJavaUtil}} {{#generateSpringBootApplication}} import org.junit.runner.RunWith; @@ -44,9 +42,7 @@ import org.springframework.boot.web.server.LocalServerPort; {{/generateSpringBootApplication}} {{#generateOperationBody}} import java.io.File; -{{^fullJavaUtil}} import java.util.Set; -{{/fullJavaUtil}} import {{javaxPackage}}.validation.ConstraintViolation; import {{javaxPackage}}.validation.Validation; import {{javaxPackage}}.validation.Validator; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache index 1b2c3fc1b23..8606cf7fb63 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache @@ -23,12 +23,10 @@ import org.apache.cxf.interceptor.LoggingOutInterceptor; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} {{#generateSpringBootApplication}} import org.junit.runner.RunWith; diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/api_test.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/api_test.mustache index cbe676a88ba..b2c5c23e14c 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/api_test.mustache @@ -12,13 +12,11 @@ import org.eclipse.microprofile.rest.client.RestClientBuilder; import java.net.URL; import java.net.MalformedURLException; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -{{/fullJavaUtil}} /** {{#appName}} diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/model_test.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/model_test.mustache index 92c1e7ee2e3..e4c821627f0 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/model_test.mustache @@ -7,13 +7,6 @@ package {{package}}; import org.junit.jupiter.api.Test; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/api_impl.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/api_impl.mustache index 4da8503056b..bf07918ba34 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/api_impl.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/api_impl.mustache @@ -85,7 +85,7 @@ public class {{classname}}Impl implements {{classname}} { .method("{{httpMethod}}"); {{#hasQueryParams}} - {{javaUtilPrefix}}List queryParams = new {{javaUtilPrefix}}ArrayList<>(); + List queryParams = new ArrayList<>(); {{#queryParams}} {{#collectionFormat}} queryParams.addAll(ApiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/api_test.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/api_test.mustache index de7bb1db80e..94682b05955 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/api_test.mustache @@ -11,12 +11,10 @@ import {{invokerPackage}}.ApiResponse; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} import io.helidon.common.reactive.Single; import io.helidon.webclient.WebClientResponse; diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/model_test.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/model_test.mustache index 92c1e7ee2e3..e4c821627f0 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/model_test.mustache @@ -7,13 +7,6 @@ package {{package}}; import org.junit.jupiter.api.Test; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/java-helidon/server/libraries/mp/api_test.mustache b/modules/openapi-generator/src/main/resources/java-helidon/server/libraries/mp/api_test.mustache index 431834b779b..4bf52a59eb9 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/server/libraries/mp/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/server/libraries/mp/api_test.mustache @@ -13,13 +13,11 @@ import io.helidon.microprofile.tests.junit5.HelidonTest; import java.net.URL; import java.net.MalformedURLException; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -{{/fullJavaUtil}} /** {{#appName}} diff --git a/modules/openapi-generator/src/main/resources/java-helidon/server/model_test.mustache b/modules/openapi-generator/src/main/resources/java-helidon/server/model_test.mustache index c0fa11d1810..69e487934d0 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/server/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/server/model_test.mustache @@ -5,13 +5,6 @@ package {{package}}; {{/imports}} import org.junit.jupiter.api.Test; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache index fa531874e73..9f0b70835f4 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache @@ -18,12 +18,11 @@ import io.micronaut.http.HttpResponse; import {{import}}; {{/imports}} import {{javaxPackage}}.annotation.Generated; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}}{{#useBeanValidation}} +{{#useBeanValidation}} import {{javaxPackage}}.validation.Valid; import {{javaxPackage}}.validation.constraints.*; {{/useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.groovy.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.groovy.mustache index 5f5b61b87a8..bed27f6653a 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.groovy.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.groovy.mustache @@ -9,14 +9,12 @@ import spock.lang.Ignore {{#wrapInHttpResponse}} import io.micronaut.http.HttpResponse {{/wrapInHttpResponse}} -{{^fullJavaUtil}} import java.util.Arrays import java.util.ArrayList import java.util.HashMap import java.util.List import java.util.Map import java.util.HashSet -{{/fullJavaUtil}} /** diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.mustache index 7dc77203b80..dd43100b91b 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/api_test.mustache @@ -10,15 +10,12 @@ import jakarta.inject.Inject; {{#wrapInHttpResponse}} import io.micronaut.http.HttpResponse; {{/wrapInHttpResponse}} -{{^fullJavaUtil}} import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.HashSet; -{{/fullJavaUtil}} - /** * API tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.groovy.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.groovy.mustache index fd5068a0947..5fbca0db662 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.groovy.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.groovy.mustache @@ -5,12 +5,6 @@ package {{package}} import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} /** * Model tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.mustache index 7a213ec56fa..feeeeaa18cb 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/test/model_test.mustache @@ -6,13 +6,6 @@ import io.micronaut.test.extensions.junit5.annotation.MicronautTest; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.groovy.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.groovy.mustache index fb94253573c..7a7a80ad71c 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.groovy.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.groovy.mustache @@ -5,12 +5,6 @@ package {{package}} import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} /** * Model tests for {{classname}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.mustache index 2a49ac94670..0879e420aa2 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/test/model_test.mustache @@ -6,13 +6,6 @@ import io.micronaut.test.extensions.junit5.annotation.MicronautTest; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; -{{#fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - /** * Model tests for {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache index 0148785df6b..5cd9e5b15b0 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache @@ -22,7 +22,6 @@ import io.micronaut.http.exceptions.HttpStatusException; import {{import}}; {{/imports}} import {{javaxPackage}}.annotation.Generated; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -30,7 +29,6 @@ import java.util.Map; {{#generateControllerFromExamples}} import java.util.Arrays; {{/generateControllerFromExamples}} -{{/fullJavaUtil}} {{#useBeanValidation}} import {{javaxPackage}}.validation.Valid; import {{javaxPackage}}.validation.constraints.*; diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerImplementation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerImplementation.mustache index e11de9861c5..16c93c6ed94 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerImplementation.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/controllerImplementation.mustache @@ -12,7 +12,6 @@ import {{package}}.{{classname}}; {{#imports}} import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -20,7 +19,6 @@ import java.util.Map; {{#generateControllerFromExamples}} import java.util.Arrays; {{/generateControllerFromExamples}} -{{/fullJavaUtil}} @Controller diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.mustache index ffacd3ee795..75cb7bd30b8 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/test/controller_test.mustache @@ -26,14 +26,12 @@ import reactor.core.publisher.Mono; import java.io.File; import java.io.FileReader; import java.io.IOException; -{{^fullJavaUtil}} import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.HashSet; -{{/fullJavaUtil}} /** diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/api_test.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/api_test.mustache index 399b22ab821..32d370cc31e 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/api_test.mustache @@ -8,12 +8,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Test; import org.junit.Ignore; -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java index 543861eadd5..de9f0b3d9a8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSCXFExtServerCodegenTest.java @@ -45,11 +45,6 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { return disableHtmlEscaping; } - // AbstractJavaCodegen.FULL_JAVA_UTIL - public boolean isFullJavaUtil() { - return fullJavaUtil; - } - // JbossFeature.GENERATE_JBOSS_DEPLOYMENT_DESCRIPTOR public boolean isGenerateJbossDeploymentDescriptor() { return generateJbossDeploymentDescriptor; @@ -222,7 +217,6 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { additionalProperties.put(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX, "isIt"); additionalProperties.put(AbstractJavaCodegen.DATE_LIBRARY, "MyDateLibrary"); additionalProperties.put(AbstractJavaCodegen.DISABLE_HTML_ESCAPING, "true"); - additionalProperties.put(AbstractJavaCodegen.FULL_JAVA_UTIL, "true"); additionalProperties.put(AbstractJavaCodegen.SUPPORT_ASYNC, "true"); additionalProperties.put(AbstractJavaCodegen.SUPPORT_JAVA6, "false"); additionalProperties.put(AbstractJavaCodegen.WITH_XML, "true"); @@ -297,7 +291,6 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { assertEquals(testerCodegen.getBooleanGetterPrefix(), "isIt"); assertEquals(testerCodegen.getDateLibrary(), "MyDateLibrary"); assertEquals(testerCodegen.isDisableHtmlEscaping(), true); - assertEquals(testerCodegen.isFullJavaUtil(), true); assertEquals(testerCodegen.isSupportAsync(), true); assertEquals(testerCodegen.isWithXml(), true); assertEquals(testerCodegen.isOpenApiNullable(), false); @@ -474,7 +467,6 @@ public class JavaJAXRSCXFExtServerCodegenTest extends JavaJaxrsBaseTest { assertEquals(additionalProperties.get(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX), "get"); assertNull(additionalProperties.get(AbstractJavaCodegen.DATE_LIBRARY)); assertEquals(additionalProperties.get(AbstractJavaCodegen.DISABLE_HTML_ESCAPING), Boolean.FALSE); - assertEquals(additionalProperties.get(AbstractJavaCodegen.FULL_JAVA_UTIL), Boolean.FALSE); assertNull(additionalProperties.get(AbstractJavaCodegen.SUPPORT_ASYNC)); assertEquals(additionalProperties.get(AbstractJavaCodegen.SUPPORT_JAVA6), Boolean.FALSE); assertEquals(additionalProperties.get(AbstractJavaCodegen.WITH_XML), false); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index 0b2f0464245..6bb4c3d0c90 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -1652,7 +1652,6 @@ public class SpringCodegenTest { @Test public void testResponseWithArray_issue11897() throws Exception { Map additionalProperties = new HashMap<>(); - additionalProperties.put(AbstractJavaCodegen.FULL_JAVA_UTIL, "true"); additionalProperties.put(SpringCodegen.USE_TAGS, "true"); additionalProperties.put(SpringCodegen.INTERFACE_ONLY, "true"); additionalProperties.put(SpringCodegen.SKIP_DEFAULT_INTERFACE, "true"); @@ -1678,7 +1677,6 @@ public class SpringCodegenTest { @Test public void shouldGenerateMethodsWithoutUsingResponseEntityAndWithoutDelegation_issue11537() throws IOException { Map additionalProperties = new HashMap<>(); - additionalProperties.put(AbstractJavaCodegen.FULL_JAVA_UTIL, "true"); additionalProperties.put(SpringCodegen.USE_TAGS, "true"); additionalProperties.put(SpringCodegen.INTERFACE_ONLY, "true"); additionalProperties.put(SpringCodegen.SKIP_DEFAULT_INTERFACE, "true"); @@ -1710,7 +1708,6 @@ public class SpringCodegenTest { @Test public void shouldGenerateMethodsWithoutUsingResponseEntityAndDelegation_issue11537() throws IOException { Map additionalProperties = new HashMap<>(); - additionalProperties.put(AbstractJavaCodegen.FULL_JAVA_UTIL, "true"); additionalProperties.put(SpringCodegen.USE_TAGS, "true"); additionalProperties.put(SpringCodegen.SKIP_DEFAULT_INTERFACE, "true"); additionalProperties.put(SpringCodegen.PERFORM_BEANVALIDATION, "true"); @@ -1794,7 +1791,6 @@ public class SpringCodegenTest { @Test public void shouldSetDefaultValueForMultipleArrayItems() throws IOException { Map additionalProperties = new HashMap<>(); - additionalProperties.put(AbstractJavaCodegen.FULL_JAVA_UTIL, "true"); additionalProperties.put(SpringCodegen.USE_TAGS, "true"); additionalProperties.put(SpringCodegen.INTERFACE_ONLY, "true"); additionalProperties.put(SpringCodegen.SKIP_DEFAULT_INTERFACE, "true"); diff --git a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/api.mustache index 3bc22f36a3b..8554cff7627 100644 --- a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/api.mustache +++ b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/api.mustache @@ -11,13 +11,11 @@ import javax.ws.rs.core.GenericType; {{#imports}}import {{import}}; {{/imports}} -{{^fullJavaUtil}} import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -{{/fullJavaUtil}} {{>generatedAnnotation}} {{#operations}} public class {{classname}} { @@ -128,10 +126,10 @@ public class {{classname}} { .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; // query params - {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarCookieParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); {{#queryParams}} localVarQueryParams.addAll(apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9aa8dbcee11..ac74f0d91d9 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import javax.validation.Valid; import javax.validation.constraints.*; diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java index bf573e43dff..aa8e4d5fc15 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java @@ -31,7 +31,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import javax.validation.Valid; import javax.validation.constraints.*; diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index ec85b9286d3..9510947e90d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import javax.validation.Valid; import javax.validation.constraints.*; diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java index 589f10b7239..a85cb8433e3 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java @@ -26,7 +26,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import javax.validation.Valid; import javax.validation.constraints.*; diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java index 6f5b0014812..607712d94b7 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import javax.validation.Valid; import javax.validation.constraints.*; diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java index e4c1285a981..fc76d17cfd6 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java @@ -24,7 +24,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import javax.validation.Valid; import javax.validation.constraints.*; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ApiClient.java index 2af3090b72d..56e23c43af9 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/ApiClient.java @@ -23,7 +23,6 @@ import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; import static io.restassured.config.RestAssuredConfig.config; import static org.openapitools.client.JacksonObjectMapper.jackson; - public class ApiClient { public static final String BASE_URI = "http://petstore.swagger.io:80/v2"; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ApiClient.java index 623f135280e..ec1d9a433cc 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ApiClient.java @@ -23,7 +23,6 @@ import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; import static io.restassured.config.RestAssuredConfig.config; import static org.openapitools.client.GsonObjectMapper.gson; - public class ApiClient { public static final String BASE_URI = "http://petstore.swagger.io:80/v2";