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

[REQ] [CORE] Prevent Stack Overflows when cycles present in spec #5229

Closed
spacether opened this issue Feb 6, 2020 · 2 comments
Closed

[REQ] [CORE] Prevent Stack Overflows when cycles present in spec #5229

spacether opened this issue Feb 6, 2020 · 2 comments

Comments

@spacether
Copy link
Contributor

spacether commented Feb 6, 2020

Is your feature request related to a problem? Please describe.

Per a discussion in: #4906
It is possible to create stack overflows with some of the below cases:

  • a oneof model which alloF includes the composed schema that includes it
    There are probably other cases here.
  • what about a grandparent, a parent which allof inherrits the grandparent, a child which allof inherrits the parent AND allof inherrits the grandparent

Our code should detect these cycles and stop, warning the user to fix their spec rather than hitting the stack overflow.
Currently we hit a stack overflow.

Describe the solution you'd like

Perhaps error out and warn the user?
Or allow the cycle but stop moving through it after we detect the cycle?

@dtam-atl
Copy link

dtam-atl commented Oct 9, 2020

Hey! I have a question related to this as I'm bumping into this bug right now. Is a cycle uncompliant with the spec? It doesn't seem to be mentioned anywhere in the spec what's meant to happen in that case.

@spacether
Copy link
Contributor Author

Hey! I have a question related to this as I'm bumping into this bug right now. Is a cycle uncompliant with the spec? It doesn't seem to be mentioned anywhere in the spec what's meant to happen in that case.

Cycles are allowed and compliant with the spec as far as I know. As you said it is not mentioned there.

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