[BUG][RUST][CLIENT] Generated default_api.rs
doesn't import referenced type
#16974
Closed
5 of 6 tasks
Labels
Bug Report Checklist
Description
If an endpoint uses an enum as the path parameter, and the enum is defined in
components
rather than inline, then the generateddefault_api.rs
uses the generated Rust enum without importing it first, resulting in a compilation error.I've found that using the enum in the schema like this:
instead of
fixes the issue. But still, it should work in both cases.
openapi-generator version
I'm using the Docker
openapitools/openapi-generator-cli:latest
image.openapi-generator-cli version
prints7.1.0-SNAPSHOT
.OpenAPI declaration file content or url
Generation Details
The text was updated successfully, but these errors were encountered: