swagger-api / swagger-api/swagger-codegen
Online generator always indicates that the Swagger is not valid
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I wanted to use the online generator to generate codes. I'm using the Zuora swagger definition but whichever file I choose, it always returns this message:
{"code":1,"type":"error","message":"The swagger specification supplied was not valid"}%
In fact, I have used different validators (like api validator, swagger editor) to validate the file I want to use, and they all say it's a valid file.
Swagger-codegen version
Online generator
Swagger declaration file content or url
https://www.zuora.com/developer/yaml/swagger.yaml
Command line used for generation
curl -X POST -H "content-type:application/json" -d '{"swaggerUrl":"https://www.zuora.com/developer/yaml/swagger.yaml"}' https://generator.swagger.io/api/gen/clients/python
Steps to reproduce
Run the following commands in terminal (I'm using macOS Monterey version 12.4):
curl -X POST -H "content-type:application/json" -d '{"swaggerUrl":"https://www.zuora.com/developer/yaml/swagger.yaml"}' https://generator.swagger.io/api/gen/clients/python
Related issues/PRs
Didn't find any
Suggest a fix/enhancement
Not sure if it's a bug or it's the problem on my end. I would really appreciate if you could add more description in the error message rather than just saying the file is invalid.
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 provided curl request against generator.swagger.io using the Zuora swagger.yaml URL, then inspect the online generator's validation path and its error handling. Done means the valid specification is accepted or the response identifies the actual validation problem instead of only reporting that it is invalid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100