swagger-api / swagger-api/swagger-codegen

[RUST] Generated code does not compile

Open
#7,964 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

I generated rust code from the docker API specification, but the resulting code does not compile.

The code, including the API spec downloaded from the docker website, is here: https://github.com/matthiasbeyer/shiplift-swagger

Swagger-codegen version

2.3.1

Swagger declaration file content or url

https://github.com/matthiasbeyer/shiplift-swagger/blob/master/docker-swagger.yaml

Command line used for generation

In the repository:

swagger-codegen generate -i ./docker-swagger.yaml -l rust -o ./
Steps to reproduce

(All given above)

Related issues/PRs

None (as far as I can see).

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.

Research direction

Start with the docker-swagger.yaml specification and the linked shiplift-swagger repository, then reproduce generation using the shown swagger-codegen 2.3.1 command with the Rust target. Inspect the generated Rust project and its compiler output to identify why it fails to compile; done means the generated code builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, rust
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.