Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cyclic references (browser infinite loop) #34

Closed
shumy opened this issue Sep 2, 2015 · 3 comments
Closed

Cyclic references (browser infinite loop) #34

shumy opened this issue Sep 2, 2015 · 3 comments
Milestone

Comments

@shumy
Copy link

shumy commented Sep 2, 2015

I have been testing docson, but reached a problem of browser entering in a infinite loop, when I have cyclic references. There are a lot of events "MessageEvent".
It seems like the references are pre-fetched. Is there any way to disable this pre-fetched behavior?

@rom1504
Copy link

rom1504 commented Sep 3, 2015

I can confirm this happens. For example with this schema :

 {
    "description": "circular defintions",
    "schema": {
      "definitions": {
        "a": {
          "properties":{
           "prop3":{"$ref": "#/definitions/b"}
            }
        },
        "b": {
          "properties":{
            "prop2":{"$ref": "#/definitions/a"}
           }
        }
      },
      "properties":{
        "prop1":{"$ref": "#/definitions/b"}
      }
    }

I'm not sure how to fix this cleanly (something about detecting the cycle at the appropriate time)

@JulienPalard
Copy link

It's also happening to me, I have an article.json having a body attribute of type articlebody.json which a list of articleparts.json which is an "anyOf" some items like text, image, etc, and also iarticleparts.json to allow recursion, which is our definition of mixed lists of elements in our article bodies.

Encontering this, docson downloads my json definitions in an infinite loop :-(

@yanick yanick added this to the Next release milestone Feb 10, 2018
@yanick
Copy link
Collaborator

yanick commented Feb 10, 2018

Infinite loops should be fixed in the dev branch (and part of the next release)

@yanick yanick closed this as completed Feb 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants