OpenAPITools / OpenAPITools/openapi-generator
[BUG] Cannot extract specific library template for Rust generator
Open
@kay-schecker is already working on this.
Since Jul 21, 2025.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
🐛 Bug Report:
Describe the bug
The Rust generator supports 4 library templates:
- reqwest (default)
- reqwest-trait
- hyper
- hyper0x
Source: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/rust.md#config-options
However, the command openapi-generator-cli author template does not seem to recognise any of the above names:
openapi-generator-cli author template -g rust --library reqwest
[main] WARN o.o.codegen.cmd.AuthorTemplate - The library 'out/libraries/reqwest' was not extracted. Please verify the spelling and retry.
[main] INFO o.o.codegen.cmd.AuthorTemplate - Extracted templates to 'out' directory. Refer to https://openapi-generator.tech/docs/templating for customization details.
Instead, the templates for all libraries are generated, as if openapi-generator-cli author template -g rust had been ran.
Steps to Reproduce
Steps to reproduce the behavior:
- Run
openapi-generator-cli author template -g rust --library reqwest - See error
Expected behavior
Only the specified library templates should be generated.
Operation System (please complete the following information):
- OS: Ubuntu
- Version 24.04.2
- kernel: 6.8.0-64-generic
Package System (please complete the following information):
- Version 7.14.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.