quarkiverse / quarkus-openapi-generator

OpenAPI Generator - REST Client Generator
Apache License 2.0
112 stars 77 forks source link

Client Generator: Custom config-key with minus (-) get translated to underscore (_) in the generated code. #778

Open ddelbondio opened 3 weeks ago

ddelbondio commented 3 weeks ago

If a custom config-key setting is used, the value of config-key gets its "-" replaced with "_".

Example:

quarkus.openapi-generator.codegen.spec.my_json-config-key=my-api

results in

@RegisterRestClient(baseUri="...", configKey="my_api")
ricardozanini commented 3 weeks ago

Hi! Thanks for reporting it. Can you open a PR to fix it? It should be reasonably straightforward. The key might follow the same rules for name sanitization we use for the OpenAPI ID.

ddelbondio commented 2 weeks ago

Sure, will have a look. Earliest next week though.