swagger-parser icon indicating copy to clipboard operation
swagger-parser copied to clipboard

Definitions which hang the parser/resolver - infinite loop?

Open MikeRalphson opened this issue 8 years ago • 3 comments

Seems to affect both the v3.4 and v4 branches.

  • https://api.swaggerhub.com/apis/rftrein/site-express_s_mark_api/v1
  • https://api.swaggerhub.com/apis/rthiney/test/1.0.0
  • https://api.swaggerhub.com/apis/vkszn/smart-web_web_api/v1

Each seem to have quite deeply nested circular references (I used a topological sorting algorithm to check).

MikeRalphson avatar Apr 03 '17 08:04 MikeRalphson

Thanks for letting me know. I'll try to reproduce the problem locally and look into the cause

JamesMessinger avatar Apr 03 '17 16:04 JamesMessinger

I encountered this today, and I have made a minimal reproduction case here: https://github.com/BigstickCarpet/json-schema-ref-parser/issues/36

bbqsrc avatar Apr 04 '17 09:04 bbqsrc

Otherwise, maybe try settings the option $refs.circular to false....?

https://github.com/BigstickCarpet/swagger-parser/blob/master/docs/options.md#options

JamesMGreene avatar Oct 18 '17 19:10 JamesMGreene