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

Issue resolving a circular dependency #56

Open
bambamboole opened this issue Dec 11, 2023 · 0 comments
Open

Issue resolving a circular dependency #56

bambamboole opened this issue Dec 11, 2023 · 0 comments

Comments

@bambamboole
Copy link

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 :)

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

No branches or pull requests

1 participant