[BUG] [Java] [vertx] ApiClient.AuthInfo
breaks on hyphen-separated security schemes
#18629
Closed
5 of 6 tasks
Labels
Bug Report Checklist
Description
The Java generator's Vertx client breaks (with syntax errors) when any of the OpenAPI
securitySchemes
is hyphen-separated. For example, a security schemepetstore-auth
will result in the following:Actual output:
Expected output:
openapi-generator version
7.5.0
OpenAPI declaration file content or url
Here's a gist containing an OpenAPI spec to reproduce this bug. In particular, this is the section that breaks the generated
AuthInfo
class:Generation Details
./mvnw clean package
to generate the JAR file.Steps to reproduce
After generating the project with the steps above, navigate to
src/main/java/org/openapitools/client/ApiClient.java
and look theAuthInfo
class.Related issues/PRs
None
Suggest a fix
Use
camelcase
macro instead oftitlecase
in the template forApiClient.java
(see code linked below). The camelcase macro handles hyphen separated values.openapi-generator/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache
Lines 683 to 732 in 29cfa33
The text was updated successfully, but these errors were encountered: