openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG][kotlin-client] Vertx API: Bad enum class name for default parameters

Open okarmazin opened this issue 2 months ago • 0 comments

Bug Report Checklist

  • [X] Have you provided a full/minimal spec to reproduce the issue?
  • [X] Have you validated the input using an OpenAPI validator?
  • [X] Have you tested with the latest master to confirm the issue still exists?
  • [X] Have you searched for related issues/PRs?
  • [X] What's the actual output vs expected output?
  • [ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

The Vert.x API mustache template does not handle enum class name construction for default values of operation parameters.

It currently outputs {{{defaultValue}}} which does not contain properly constructed class name, leading to invalid code.

It should be {{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}} as in every other client API template.

openapi-generator version

master, bug discovered by accident while fixing a different issue.

I'll fix this.

okarmazin avatar Dec 07 '25 16:12 okarmazin