OpenAPITools / OpenAPITools/openapi-generator

[BUG] Cannot extract specific library template for Rust generator

Open
#21,705 0 comments 0 reactions 1 assignee View on GitHub

@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:

  1. Run openapi-generator-cli author template -g rust --library reqwest
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.