Skip to content

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

@spacether

Description

@spacether

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions