swagger-api / swagger-api/swagger-codegen
Failed to generate python library for HewlettPackard/hpe-globaldashboard-swagger
Open
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
Command line used for generation
- java -jar ./swagger-codegen-cli.jar generate -i ./swagger.json -l python
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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