Endless loop caused by json-schema-ref-parser
See original GitHub issueHello!
For some strange reason I yet not know, the “bundle” method of the class “$RefParser” seems to cause an endless loop on line 16: https://github.com/cdimascio/express-openapi-validator/blob/b8e34304ab5c2821a51c986e43b4b6ae4db51d05/src/framework/json.ref.schema.ts#L16
As I am the first one with this issue, maybe it is caused by my setup.
Those are my dependencies:
{
"@typegoose/typegoose": "^6.1.5",
"cors": "^2.8.5",
"express": "^4.17.1",
"express-openapi-validator": "^2.17.2",
"express-session": "^1.17.0",
"mongoose": "^5.7.12",
"openid-client": "^3.8.3",
"react": "^16.11.0",
"react-dom": "^16.11.0",
"swagger-ui-express": "^4.1.2",
"webpack-pwa-manifest": "^4.0.0",
"workbox-webpack-plugin": "^3.6.3",
"yamljs": "^0.3.0"
}
I also tried using different OpenAPI specs (also the one in the tests directory of this repo), with the same result.
Maybe it’s a dependecy conflict somehow?
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Switch to APIDevTools/json-schema-ref-parser #1054 - GitHub
yaml it will run into an infinite loop and eat up your memory. Not sure if this is a known issue but it...
Read more >json-schema-ref-parser - Bountysource
Parse, Resolve, and Dereference JSON Schema $ref pointers in Node and browsers ... API causes the dereference() method to spin forever in an...
Read more >Infinite Recursion with Jackson JSON and Hibernate JPA issue
If you try to send to the view the class B or A with @ResponseBody it may cause an infinite loop. You can...
Read more >Understanding JSON Schema
JSON Schema is a powerful tool for validating the structure of JSON ... to another $ref could cause an infinite loop in the...
Read more >JSON Schema $Ref Parser - API Dev Tools
JSON Schema $Ref Parser is a full JSON Reference and JSON Pointer implementation that crawls even the most complex JSON Schemas and gives...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll create a minimal example today after work. Thanks in the mean time!
Yeah, agreed, assuming a top level await its nice; almost no difference in the usage feel. The order of middleware matters, thus the validator needs to be set up prior your routes