swagger-api / swagger-api/swagger-codegen

Failed to generate python library for HewlettPackard/hpe-globaldashboard-swagger

Open
#9,030 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

Encountered the following error:
io.swagger.models.parameters.RefParameter cannot be cast to io.swagger.models.parameters.BodyParameter

Swagger-codegen version

2.3.1, 2.4.0

Swagger declaration file content or url

https://raw.githubusercontent.com/HewlettPackard/hpe-globaldashboard-swagger/master/hpe-globaldashboard-swagger.json

Command line used for generation
  1. java -jar ./swagger-codegen-cli.jar generate -i ./swagger.json -l python
  2. curl -X POST -H "content-type:application/json" -d '{"swaggerUrl":"https://raw.githubusercontent.com/HewlettPackard/hpe-globaldashboard-swagger/master/hpe-globaldashboard-swagger.json"}' https://generator.swagger.io/api/gen/clients/python
Steps to reproduce

Same as command lines

Related issues/PRs

7176

Suggest a fix/enhancement

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 by reproducing the failure with the swagger-codegen CLI or generator API using the linked hpe-globaldashboard-swagger.json and the Python target. Read related issue 7176 and trace the generation path that raises the RefParameter-to-BodyParameter cast error; done means the Python library generates successfully for this declaration.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.