OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.3k stars 6.44k forks source link

[BUG] [Kotlin] `gradlew.bat` is not a valid batch file #19163

Closed takkiraz closed 2 months ago

takkiraz commented 2 months ago
Description

The gradlew.bat file generated by the OpenAPI Generator is not a valid Windows Batch file. Instead, it contains content meant for Unix-like systems, specifically a Bash script, which makes it non-executable on Windows systems. This issue prevents users from running Gradle commands using the gradlew.bat file on Windows.

openapi-generator version

7.7.0

Generation Details
generatorName: kotlin
outputDir: samples/client/petstore/kotlin-jvm-spring-3-restclient
library: jvm-spring-restclient
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-client
additionalProperties:
  artifactId: kotlin-petstore-spring-restclient
  serializationLibrary: jackson
  useSpringBoot3: true
Steps to reproduce
  1. Generate a kotlin client project
  2. Navigate to the generated directory
  3. Attempt to run gradlew.bat on a Windows system