Skip to content

Commit 5fbd932

Browse files
authored
[Java] Annotation on List items, @NotNull for example (#25049)
* Feature: possibility to annotate type arguments in java List<> * Regenerate doc * Use standard x-field-extra-annotation instead of a new annotation * Test annotation with items allOf * regenerate doc * regenerate doc * Rollback invalid commit * Fix jakarta.validation.constraint.NotNull * Do not remove the @NotNull annotation if it was explicity provided * Rename tests
1 parent 81fb7a0 commit 5fbd932

30 files changed

Lines changed: 190 additions & 10 deletions

‎docs/generators/groovy.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

‎docs/generators/java-camel.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalNotNullAnnotations|Add @NotNull to path variables (required by default) and requestBody.| |false|
2425
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|

‎docs/generators/java-dubbo.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

‎docs/generators/java-helidon-client.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

‎docs/generators/java-helidon-server.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

‎docs/generators/java-inflector.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

‎docs/generators/java-micronaut-client.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalClientTypeAnnotations|Additional annotations for client type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2222
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
23+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2526
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

‎docs/generators/java-micronaut-server.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

‎docs/generators/java-microprofile.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

‎docs/generators/java-msf4j.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
2121
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
22+
|additionalItemsAnnotations|Additional annotations for list items. List separated by semicolon(;) or new line (Linux or Windows)| |null|
2223
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2324
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
2425
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|

0 commit comments

Comments
 (0)