Skip to content

[BUG] Cannot extract specific library template for Rust generator #953

@AntoineSebert

Description

@AntoineSebert

🐛 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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions