Skip to content

No recursion limit #9

@GLeurquin

Description

@GLeurquin

I tried your package with a schema that has recursivity, but I get a max recursion reached error. By looking into the code, I think there is a statement missing in the ´convert_type_to_json_schema´ function. It calls itself, but never actually increases the recursion current_depth parameter. Which makes it loop forever in case of recursion, and ends up exhausting the call stack max depth.
Adding ´current_depth += 1´ to the beginning of the function should solve the issue.

if current_depth > max_depth:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions