Skip to content

Commit 9ece1b5

Browse files
[Java] refactor: improve additionalModelTypeAnnotations generation (#8269)
* refactor: improve additionalModelTypeAnnotations generation Split by ';' and/or newline Trim value fix: #7032 Run ./bin/generate-samples.sh to regenerate model files Revert "Run ./bin/generate-samples.sh to regenerate model files" This reverts commit da509c39f363da046fbd457e1ab67ef0f62f3561. refector: remove unnecessary import test: multiples tests for AdditionalModelTypeAnnotations Add a getter to test the list refactor: remove duplicate AdditionalModelTypeAnnotations Without using Set to avoid any side effect somewhere, I use stream and distinct to avoid duplicates refactor: using Set instead of stream Remove stream distinct for performance reason, use newHashSet Keep AdditionalModelTypeAnnotations as List doc: update info additionalModelTypeAnnotations refactor: move doc in code for autogen style: tab in java class doc: run ensure-up-to-date refactor: add imports lost in rebase docs: regenerate docs docs: update * fix: docs
1 parent da5d611 commit 9ece1b5

21 files changed

Lines changed: 162 additions & 22 deletions

docs/generators/groovy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.api|
1414
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy|

docs/generators/java-inflector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.controllers|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

docs/generators/java-micronaut-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.api|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

docs/generators/java-msf4j.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.api|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

docs/generators/java-pkmst.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |com.prokarma.pkmst.controller|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

docs/generators/java-play-framework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |controllers|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

docs/generators/java-undertow-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |null|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

docs/generators/java-vertx-web.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.vertxweb.server.api|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

docs/generators/java-vertx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.server.api.verticle|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

docs/generators/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.client.api|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

0 commit comments

Comments
 (0)