-
Notifications
You must be signed in to change notification settings - Fork 281
44: Add possibility to check if field exists in schema #45
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
Conversation
Hello, basically don't mind the idea, but I have a number of concerns regarding the implementation:
Sent from my phone, sorry about the typos. |
@v1ctor are you going to continue working on this? |
@erosb yes, sure. I will verify schemaDependencies and change format to pointer notation soon. |
Awesome. Please go on with Please wait a bit with the JSON Pointer notation. The problem there is that we already have some sort of duplication in the library regarding JSON pointers, since
So I think the best would be to wait for the next release of the org.json lib (coming soon) and use that class for this purpose. I will also try to remove the my half-baked implementations from this schema library. |
I've written code to validate schemaDependencies and decided to keep default realisation in NotSchema. |
return false; | ||
} | ||
|
||
private boolean definesPatternProperty(String field) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can rewrite this method to use the java8 stream API. It isn't a necessary change, but it could be good for practicing it (if you are not familiar yet with streams), due to the simplicity of the task. The same goes for definesSchemaDependencyProperty()
Great job. In the meanwhile the new version of |
@erosb Thanks! I've changed realisation to use JSONPointer notation. |
All looks fine, I will add some javadoc, then it is ready to be released. Thank you for your contribution. |
#44