-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
Description
When generating java client, it seem its not possible to use gradleProperties to set gradle.properties values.
tries with java.yaml config file, and directly as argument using CLI, nothing work
the generated gradle.properties is EMPTY.
using the openapi-generator-cli author template -g java -o ./templates/java and editing the gradle.properties templates, specifying this directory in my CLI command does not change anything
I'm actually using the npm library on a OSX environement
openapi-generator version
@openapitools/openapi-generator-cli : 2.19.1
OpenAPI declaration file content or url
generatorName: java
additionalProperties:
library: native
dateLibrary: java8-localdatetime
developerName: MyName
developerEmail: "support@MyCompany.fr"
developerOrganization: MyCompany
developerOrganizationUrl: "https://MyCompany.fr"
annotationLibrary: "swagger2"
hideGenerationTimestamp: "true"
gradleProperties:
- "spotless_java_formatter=../format/eclipse-java-formatter-1.0.0.xml"
- "spotless_java_importorder=../format/eclipse-java-importorder-1.0.0.importorder"
- "spotless_gradle_formatter=../format/eclipse-groovy-formatter-1.0.0.properties"Generation Details
using preview config file and a swagger.json i use:
openapi-generator-cli generate -i ./dist/swagger.json -g java -o dist/clients/petstore-core-sdk-client-java -c ./src/configs/java.yaml
Client is generated using most of the yaml settings, except gradleProperties which remain empty.
Steps to reproduce
- use the previous yaml, or use the
gradlePropertiesdirectly from the CLI - generate the client using, as example:
openapi-generator-cli generate -i ./dist/swagger.json -g java -o dist/clients/petstore-core-sdk-client-java -c ./src/configs/java.yaml - look for dist/clients/petstore-core-sdk-client-java/gradle.properties content
- it's empty, it must contain the
gradlePropertiesarray from the yaml, 1 item per line
Suggest a fix
I dont know how to fix it actually, but maybe it could be a nice idea to add it to the tests