Closed ismailBsd closed 6 months ago
If I'm not mistaken this feature was added in https://github.com/quarkiverse/quarkus-openapi-generator/pull/457. @ismailBsd have you tried that with the latest version?
@hbelmiro Sorry for the late reply, yes I tried with v1.3.13, I think it may be a template bug because compositeAuthenticationProvider.qute still uses {quarkus-generator.openApiSpecId} instead of {configKey}
Hi @ismailBsd and @hbelmiro, really the compositeAuthenticationProvider.qute
uses quarkus-generator.openApiSpecId
.
@ismailBsd, are you willing to send a PR?
Hi @hbelmiro I am working on this issue.
Currently, as the readme file indicates, to provide the credentials, the configuration key is composed using this template.: quarkus.openapi-generator.[filename].auth.[security_scheme_name].[auth_property_name]. Where:
filename is the sanitized name of file containing the OpenAPI spec, for example petstore_json.
It would be nice if we could use the config key if present instead of the openapi spec file.
For example if I set the config key to:
quarkus.openapi-generator.codegen.spec.petstore_json.config-key=petstore
I would like my configuration keys for authentication to look like this:
for api key authentication:
quarkus.openapi-generator.**petstore**.auth.api_key.api-key
for basic http authentication
and for bearer token authentication
quarkus.openapi-generator.petstore.auth.bearer.bearer-token
looking at the code I found that to implement it, {quarkus-generator.openApiSpecId} in the compositeAuthenticationProvider.qute template file must be replaced with {configKey} like in the api.qute file