swagger-api / swagger-api/swagger-parser
Wrong error is given when opening an invalid OpenAPI YAML
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
Opening an invalid OpenAPI 3 YAML produces Wrong specification url/path: .. error message.
Issue appears to be with the general handling of any error with in the io.swagger.v3.parser.OpenAPIV3Parser#readWithInfo(java.lang.String, java.util.List<io.swagger.v3.parser.core.models.AuthorizationValue>) method. There should be a try/catch around the Object mapper to handle parse exceptions and provide a better error to the console.
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 in io.swagger.v3.parser.OpenAPIV3Parser#readWithInfo(java.lang.String, java.util.List<io.swagger.v3.parser.core.models.AuthorizationValue>) and reproduce the invalid OpenAPI 3 YAML case. Inspect how the Object mapper handles parse exceptions. Done means the console reports the YAML parsing problem instead of “Wrong specification url/path: ..”.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100