swagger-api / swagger-api/swagger-codegen

[Rust] Running ./bin/rust-petstore.sh gives an error on 3.0.0

Open
#7,374 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

Running ./bin/rust-petstore.sh on 3.0.0 fails with:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
usage: swagger-codegen generate [-h] [-v []] [-l] [-o] [-i] [-t] [-a] [-c] [-s] [--api-package] [--model-package] [--model-name-prefix] [--model-name-suffix]
                       [--instantiation-types [ [ ...]]] [--type-mappings [ [ ...]]] [--additional-properties [ [ ...]]] [--import-mappings [ [ ...]]]
                       [--invoker-package] [--group-id] [--artifact-id] [--artifact-version] [--library] [--git-user-id] [--git-repo-id] [--release-note]
                       [--http-user-agent] [--reserved-words-mappings [ [ ...]]] [--ignore-file-override] [--remove-operation-id-prefix]
swagger-codegen: error: unrecognized arguments: '-DpackageName=petstore_client'
Swagger-codegen version

3.0.0

Steps to reproduce

Run ./bin/rust-petstore.sh on 3.0.0

Suggest a fix/enhancement

The command line arguments to swagger-codegen have probably changed with 3.0.0, and they need to be updated in the petstore script to work correctly.

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 bin/rust-petstore.sh and run it with swagger-codegen 3.0.0 to reproduce the unrecognized -DpackageName argument. Inspect the command-line invocation and update the script's arguments, then rerun the script to confirm the Rust petstore generation completes without the error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, shell
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.