swagger-api / swagger-api/swagger-parser
Parse anything takes too long
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
Parsing an invalid yaml / openAPI file results in a long computation eventually resulting in null returned by parse(...) function.
Just take an XML file as example, the parser should imediately detect, that the document is of invalid syntax and just return an error "invalid syntax" or if more preferred return null.
So why is the swagger parser not working like this?
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 long computation through the parse(...) function with an invalid YAML or OpenAPI document, using the XML example described in the issue as a comparison. Trace where invalid syntax is detected and record the resulting error or null behavior. Done means invalid input is rejected promptly rather than spending a long time computing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100