You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [kotlin] add additionalEnumTypeAnnotations option
AbstractKotlinCodegen only implemented additionalModelTypeAnnotations, and the
kotlin-server jaxrs-spec enum_class template included that partial, so an
annotation that is only valid on classes was also emitted on generated enums
and the output did not compile.
Add additionalEnumTypeAnnotations to AbstractKotlinCodegen, mirroring
AbstractJavaCodegen, and let the jaxrs-spec enum template use it instead.
Fixes#24978
* update ktorm-schema generator doc
Copy file name to clipboardExpand all lines: docs/generators/kotlin-misk.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
25
25
|actionRequestContentType|Request ContentType for Action||@RequestContentType|
26
26
|actionRequestContentTypePrefix|Request ContentType Prefix for Action||MediaTypes|
27
27
|addModelMoshiJsonAnnotation|Add a Moshi JSON adapter annotation to all model classes||true|
28
+
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
28
29
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
29
30
|artifactId|Generated artifact id (name of jar).||null|
Copy file name to clipboardExpand all lines: docs/generators/kotlin-server.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
18
18
19
19
| Option | Description | Values | Default |
20
20
| ------ | ----------- | ------ | ------- |
21
+
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
21
22
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
22
23
|artifactId|Generated artifact id (name of jar).||kotlin-server|
Copy file name to clipboardExpand all lines: docs/generators/kotlin-spring.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
18
18
19
19
| Option | Description | Values | Default |
20
20
| ------ | ----------- | ------ | ------- |
21
+
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
21
22
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
22
23
|annotationLibrary|Select the complementary documentation annotation library.|<dl><dt>**none**</dt><dd>Do not annotate Model and Api with complementary annotations.</dd><dt>**swagger1**</dt><dd>Annotate Model and Api using the Swagger Annotations 1.x library.</dd><dt>**swagger2**</dt><dd>Annotate Model and Api using the Swagger Annotations 2.x library.</dd></dl>|swagger2|
23
24
|apiPackage|api package for generated code||org.openapitools.api|
Copy file name to clipboardExpand all lines: docs/generators/kotlin-vertx.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
18
18
19
19
| Option | Description | Values | Default |
20
20
| ------ | ----------- | ------ | ------- |
21
+
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
21
22
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
22
23
|artifactId|Generated artifact id (name of jar).||null|
Copy file name to clipboardExpand all lines: docs/generators/kotlin-wiremock.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
18
18
19
19
| Option | Description | Values | Default |
20
20
| ------ | ----------- | ------ | ------- |
21
+
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
21
22
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
22
23
|artifactId|Generated artifact id (name of jar).||null|
Copy file name to clipboardExpand all lines: docs/generators/kotlin.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
18
18
19
19
| Option | Description | Values | Default |
20
20
| ------ | ----------- | ------ | ------- |
21
+
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
21
22
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
22
23
|artifactId|Generated artifact id (name of jar).||kotlin-client|
Copy file name to clipboardExpand all lines: docs/generators/ktorm-schema.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
19
19
| Option | Description | Values | Default |
20
20
| ------ | ----------- | ------ | ------- |
21
21
|addSurrogateKey|Adds the surrogate key for all models that don't already have a primary key (named by the above convention)||false|
22
+
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
22
23
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)||null|
23
24
|artifactId|Generated artifact id (name of jar).||ktorm|
cliOptions.add(CliOption.newString(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)"));
332
+
cliOptions.add(CliOption.newString(ADDITIONAL_ENUM_TYPE_ANNOTATIONS, "Additional annotations for enum type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)"));
329
333
cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Skip header parameters in the generated API methods.", implicitHeaders));
330
334
}
331
335
@@ -487,6 +491,13 @@ public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> objs)
0 commit comments