Skip to content

Commit 4b87606

Browse files
Autoset constants (Required fields having single valid enum value) Java (OkHttp) Implementation of #16547 (#16550)
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required * Autosets the parameters with the only value specified as enum if the parameter is also marked as required * Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client. * Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client. * Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client. * Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.
1 parent d671fe2 commit 4b87606

28 files changed

Lines changed: 798 additions & 369 deletions

docs/generators/groovy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2525
|apiPackage|package for generated api classes| |org.openapitools.api|
2626
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy|
2727
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
28+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
2829
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
2930
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
3031
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|

docs/generators/java-camel.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3030
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
3131
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
3232
|async|use async Callable controllers| |false|
33+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3334
|basePackage|base package (invokerPackage) for generated code| |org.openapitools|
3435
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3536
|booleanGetterPrefix|Set booleanGetterPrefix| |get|

docs/generators/java-helidon-client.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2727
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client|
2828
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
2929
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
30+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3031
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3132
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
3233
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|

docs/generators/java-helidon-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2727
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-server|
2828
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
2929
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
30+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3031
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3132
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
3233
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|

docs/generators/java-inflector.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2727
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-inflector-server|
2828
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
2929
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
30+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3031
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3132
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
3233
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|

docs/generators/java-micronaut-client.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
3030
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
3131
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
3232
|authorizationFilterPattern|Configure the authorization filter pattern for the client. Generally defined when generating clients from multiple specification files| |null|
33+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3334
|basePathSeparator|Configure the separator to use between the application name and base path when referencing the property| |-|
3435
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3536
|booleanGetterPrefix|Set booleanGetterPrefix| |get|

docs/generators/java-micronaut-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2727
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-micronaut|
2828
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
2929
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
30+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3031
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3132
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
3233
|build|Specify for which build tool to generate files|<dl><dt>**gradle**</dt><dd>Gradle configuration is generated for the project</dd><dt>**all**</dt><dd>Both Gradle and Maven configurations are generated</dd><dt>**maven**</dt><dd>Maven configuration is generated for the project</dd></dl>|all|

docs/generators/java-msf4j.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2727
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server|
2828
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
2929
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
30+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3031
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3132
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
3233
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|

docs/generators/java-pkmst.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2727
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |pkmst-microservice|
2828
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
2929
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
30+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3031
|basePackage|base package for java source code| |null|
3132
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3233
|booleanGetterPrefix|Set booleanGetterPrefix| |get|

docs/generators/java-play-framework.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2727
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-playframework|
2828
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
2929
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
30+
|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false|
3031
|basePackage|base package for generated code| |org.openapitools|
3132
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
3233
|booleanGetterPrefix|Set booleanGetterPrefix| |get|

0 commit comments

Comments
 (0)