Open pgrinaway opened 5 years ago
👍 Thanks for opening this issue! 🏷 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
I'm seeing this issue with OpenAPI generator v4.3.1 and v5.0.0-SNAPSHOT. I tried with both v1.36 and v1.40 of the Docker API.
Bug Report Checklist
Description
openapi-generator
successfully generates an output for the Docker engine v1.39 spec, albeit with a number of warnings such asFull output here.
Upon attempting to compile the resulting code, there are numerous errors from the Rust compiler such as:
Full compiler output here.
openapi-generator version
OpenAPI declaration file content or url
The OpenAPI declaration can be found here
Command line used for generation
I ran:
openapi-generator generate -i https://docs.docker.com/engine/api/v1.39/swagger.yaml -g rust -o rust_client/
Using openapi-generator version
3.3.4
on Mac OS X Mojave 10.14.3. Cargo versioncargo 1.32.0 (8610973aa 2019-01-02)
Steps to reproduce
Generate the rust code:
Attempt to compile:
Related issues/PRs
I'm not sure if #2527 is related, since it is trying to also generate a client for this API. Possibly PR #2244 is related, but again I am unsure.
Suggest a fix
I am relatively new to rust, but manually inserting a
use serde_json::Value;
in the generated code did make the error about theValue
go away. However, I'm not quite sure how to fix the other errors.