Skip to content

feat: pass maxRefDepth to tree to limit recursion#243

Merged
daniel-white merged 1 commit intomasterfrom
feat/limit-recursion
Nov 15, 2023
Merged

feat: pass maxRefDepth to tree to limit recursion#243
daniel-white merged 1 commit intomasterfrom
feat/limit-recursion

Conversation

@daniel-white
Copy link
Copy Markdown

upgrade json-schema-tree and pass the new option around

@daniel-white daniel-white requested review from a team and mallachari and removed request for a team November 15, 2023 19:21
Copy link
Copy Markdown
Contributor

@EdVinyard EdVinyard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had only one question, but this looks reasonable to me.

const jsonSchemaTree = new JsonSchemaTree(schema, {
mergeAllOf: true,
refResolver: resolveRef,
maxRefDepth,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct that JsonSchemaTree already had an optional maxRefDepth parameter, and this PR just allows the caller to specify that when instantiating a JsonSchemaViewer component? (And if it's not specified, there's no limit?)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it did not have the parameter, i added it and didn't set a limit for backwards compatability

@daniel-white daniel-white merged commit c467ab1 into master Nov 15, 2023
@daniel-white daniel-white deleted the feat/limit-recursion branch November 15, 2023 19:55
@stoplight-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants