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

Maximum call stack size & refDepthMax not work #584

Closed
justintien opened this issue May 18, 2020 · 3 comments
Closed

Maximum call stack size & refDepthMax not work #584

justintien opened this issue May 18, 2020 · 3 comments

Comments

@justintien
Copy link

{
  "$ref": "#/definitions/A",
  "definitions": {
    "A": {
      "type": "object",
      "properties": {
        "nodeA": {
          "type":"array",
          "items": {
            "$ref": "#/definitions/A"
          }
        },
        "nodeB": {
          "type":"array",
          "$ref": "#/definitions/B"
        }
      }
    },
    "B": {
      "type": "object",
      "properties": {
        "nodeB": {
          "type":"array",
          "items": {
            "$ref": "#/definitions/B"
          }
        }
      }
    }
  }
}

https://json-schema-faker.js.org/... I think it's down...white screen
image

It seems Maximum call stack size and refDepthMax not work for diff $ref node ...

@pateketrueke
Copy link
Member

Interesting, thank you!

@pateketrueke
Copy link
Member

Still hanging on RC 28 🐛

@pateketrueke
Copy link
Member

Fixed on develop, notice that the following prop is not valid:

        "nodeB": {
          "type":"array",
          "$ref": "#/definitions/B"
        }

Here, the target #/definitions/B is of type object, so is not compatible after merge, causing validation failures.

pateketrueke added a commit that referenced this issue Nov 2, 2020
* fix: shuffle extra props to generate, closes #601

* fix: rework recursive references, closes #584

* fix: rework depth, closes #592

* chore: add missing tests

* chore: pass json-path flag

* cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants