swagger-api / swagger-api/swagger-parser

Parse anything takes too long

Open
#496 0 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.