Skip to content

Issue resolving a circular dependency #56

Description

@bambamboole

We found an issue, that json-schema-ref-parser is not able to reoslve circular dependencies.
Here the example:

{
    "openapi": "3.1.0",
    "info": { "title": "", "version": "" },
    "paths": {...},
    "components": {
        "schemas": {
            "Item": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "id": { "type": "string" },
                    "description": { "type": "string", "nullable": true },
                    "items": {
                        "type": "array",
                        "items": { "$ref": "#/components/schemas/Item" }
                    }
                },
                "example": {
                    "id": "main-menu-id",
                    "description": null,
                    "items": [
                        {
                            "id": "sub-menu-id",
                            "description": null,
                            "items": []
                        }
                    ]
                }
            }
        }
    }
}

I think the easiest would be to resolve them and let the user hit the issue if he builds up a memory leak with that.

Maybe I am also missing something. If yes, additional info would be awesome :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions