Comments (14)
@rhwood That warning message can be ignored. We are loading the JSON schema draft v4 for validation and that particular keyword is not supported yet. We are planning to refactor the library to support both v4 and v6 in the near future and this issue will be resolved at the same time. Let's keep this open until it is resolved. Thanks for bringing it up.
from json-schema-validator.
@stevehu resolved the original issue regarding exclusiveMinimum
with a commit on 2019-11-14.
@ionutalex88 added then
and else
in #592
@[email protected] Added $defs
in #539
@tomasbjerre We have many open requests to support custom keywords. Please add your requirements to one of those or open a new one.
from json-schema-validator.
Has this been resolved yet?
from json-schema-validator.
@alisrael I just mark the issue with help wanted
and hope someone from the community can pick it up and get it resolved. Thanks for bringing it up.
from json-schema-validator.
Can the warning be suppressed? (I suppose I could maybe just configure my logger to only show errors from this library, but then I wouldn't see other warnings...)
from json-schema-validator.
If exclusiveMinimum is the keyword in draft 4 only, we can map this keyword to TrueValidator for v6, v7 and 2019-09. Let's wait for the test result on this issue and make the same change if it works.
from json-schema-validator.
Since this issue was raised, we have added a lot more NonValidationKeyword to each version of specifications. Here is an example. https://github.com/networknt/json-schema-validator/blob/master/src/main/java/com/networknt/schema/JsonMetaSchema.java#L172
I am wondering if you guys could try it again and add your warned keyword to the list. Just be sure that don't add anything that is a validation keyword but not implemented yet. Thanks.
from json-schema-validator.
still not fixed?
2021-11-30 18:09:38.189 [main] WARN com.networknt.schema.JsonMetaSchema - Unknown keyword $defs - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
2021-11-30 18:09:39.192 [main] WARN com.networknt.schema.JsonMetaSchema - Could not load validator maxLength
from json-schema-validator.
@bomzheg I think people are fixing the issue in a particular version they are using. That is why you might still see this. Which version are you using?
from json-schema-validator.
@stevehu could we have the "else" keyword also added to the NonValidationKeywork list for V2019, or V2020, just like it was done for "then" in https://github.com/networknt/json-schema-validator/pull/418/files ?
Currently there is no version on which none of the "if", "then", "else" keywords trigger the warning message.
from json-schema-validator.
@ionutalex88 Yes. I think we can do it safely. Would you like to open a PR?
from json-schema-validator.
@ionutalex88 Yes. I think we can do it safely. Would you like to open a PR?
@stevehu I could do that. Should I be added to the contributors list?
from json-schema-validator.
@ionutalex88 I have sent you an invite to grant you the write permission. Please create a branch for your PR. Thanks.
from json-schema-validator.
I would expect there to be some way to, given SchemaValidatorsConfig
or JsonSchema
, add a keyword.
I have a custom keyword in my schema that I use in a JsonSchemaWalkListener
:
@Override
public WalkFlow onWalkStart(WalkEvent walkEvent)
{
JsonNode schemaNode = walkEvent.getSchemaNode();
JsonNode kindNode = schemaNode.get("MY_CUSTOM_KEYWORD");
do stuff with kindNode....
It works totally fine (great job with this library!) but I keep getting this warn-logging.
from json-schema-validator.
Related Issues (20)
- the errors is garbled characters HOT 1
- Keyword Walker not walking root of then/else HOT 1
- JSON Schema validation failed against custom JSON Meta Schema after update 1.2.0 -> 1.3.0 HOT 2
- 1.4.0: Is there a way to perform local verification? HOT 5
- Recursive calls leading to an OOM when parsing a valid schema HOT 6
- Bidi rule validation implementation does not match the specification HOT 2
- Additional i18n language(spanish) support related (#847) HOT 7
- We Need Additional Spanish Language support can you please add the spanish langauge our customers need it we already in PROD HOT 7
- Schema from String HOT 1
- change example.com connection error IOException
- improve outputUnits with all assertion fields HOT 3
- V1.4.0 ValidatorTypeCode.getKeywords(SpecVersion.VersionFlag.V201909) has missing keywords HOT 2
- Error occurs if OneOf and AllOf are nested HOT 3
- Do the values of allOf need to be validated as arrays?
- Add an option to toggle debug message HOT 1
- Impossible to construct a SchemaLocation containing a json pointer with an escaped fragment
- Impossible to construct a SchemaLocation containing a json pointer with an escaped fragment HOT 1
- Validate JSON Schema itself? HOT 5
- upgrade undertow to 2.2.31.Final
- Question about JSON validation: Type "object" can be null? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-schema-validator.