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

Configure RefResolver:$maxDepth? #181

Closed
eschwartz opened this issue Jul 27, 2015 · 8 comments
Closed

Configure RefResolver:$maxDepth? #181

eschwartz opened this issue Jul 27, 2015 · 8 comments

Comments

@eschwartz
Copy link

I kept getting The maximum stack depth has been exceeded errors, and I couldn't figure out what was going on. Finally, I found a public static RefResolver$maxDepth resolver property. I tried setting it to 20 (default was 7), and the schema validated fine.

I feel a little funny overriding a public static property on a test utility. What would you think about making this a configurable property on the RefResolver instance?

@vdespa
Copy link

vdespa commented Jul 28, 2015

Same issue here.

Because of the commit #161 we started having issues.

edisonthk added a commit to edisonthk/json-schema that referenced this issue Aug 20, 2015
@micahgodbolt
Copy link

This is also required for our project. We either have to manually change the file after installation, or we'll need to fork the project. Would much rather just have a param we could set.

@bighappyface
Copy link
Collaborator

@micahgodbolt why not submit a PR instead of working from a fork? If you are going to make a change that will help others, you should consider giving it back.

@micahgodbolt
Copy link

@bighappyface oh I certainly would! I totally agree with contributing > complaining :) I was going to say that #184 already submitted one, but it seems you already closed that.

I'll check with out PHP devs to see how they'd prefer to code that up. Do you have a preferred approach?

@bighappyface
Copy link
Collaborator

I'll help with any PR that has support from the community. I don't think #184 accomplishes anything and closed it predicting that it would not pass community scrutiny.

PRs are very welcome and the exclusive source of maintenance on this project. My only ask is that you submit changes with suitable tests and consider helping review other PRs in need of a review.

@mathroc
Copy link
Contributor

mathroc commented Jan 14, 2016

RefResolver:$maxDepth is a public (static) property so it's already configurable:

RefResolver:$maxDepth = 42;

@eschwartz
Copy link
Author

Yes, you can do that. I guess my point was that I felt kind of dirty overriding a global static property, that is used by all instances of RefResolver.

@bighappyface
Copy link
Collaborator

Closed with https://github.com/justinrainbow/json-schema/releases/tag/2.0.0

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

5 participants