Skip to content

[BUG][Rust server] Can't find client example, specify example.path when running server stub #9023

@kubajal

Description

@kubajal

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

I'm developing a small project here: https://github.com/kubajal/minimax-in-rust
I cannot run code generated by openapi-generator-cli v5.0.1 through cargo run --example server in Docker image rust:1.50 . I get the following error:

root@67eadc0267a7:/rust-app# cargo run --example server
error: failed to parse manifest at `/rust-app/Cargo.toml`

Caused by:
  can't find `client` example, specify example.path

I'd expect this to succeed as that is the step described in the README.md generated by npx @openapitools/openapi-generator-cli generate -i swagger.yml -g rust-server.

openapi-generator version

v5.0.1
I downloaded it through https://openapi-generator.tech/docs/installation/.

OpenAPI declaration file content or url

https://github.com/kubajal/minimax-in-rust/blob/main/swagger.yml

Generation Details

I just used npx @openapitools/openapi-generator-cli generate -i swagger.yml -g rust-server.

Steps to reproduce
git clone https://github.com/kubajal/minimax-in-rust.git
cd minimax-in-rust
docker build -t rust-app
docker run -it rust-app
# in the container
cd /rust-app
cargo run --example server
Related issues/PRs

None that I found.

Suggest a fix

I have no idea. I am a beginner in Rust.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions