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

201909 false flag keywords "additonalItems", "then" #418

Merged
merged 1 commit into from
Jul 4, 2021

Conversation

pgalbraith
Copy link
Contributor

No description provided.

@stevehu
Copy link
Contributor

stevehu commented Jul 3, 2021

@pgalbraith Thanks a lot for your help. It makes perfect sense to add then to the list as we only check the if keyword in our implementation. However, I think we should implement additionalItems if possible. What do you think? Compare with items, it is not popular. But if it is present in your schema, I think we need to respect the validation rule defined here.

https://json-schema.org/draft/2019-09/json-schema-core.html#additionalItems

@pgalbraith
Copy link
Contributor Author

Hmmm the details of the spec are beyond me, I'm afraid. My goal is just to prevent the non-keyword warning message from showing (i.e. #79) when I'm validating a simple json doc. My schema references the 2019-09 meta schema, and I'm getting these warning messages when validating documents:

WARN com.networknt.schema.JsonMetaSchema - Unknown keyword then - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
WARN com.networknt.schema.JsonMetaSchema - Unknown keyword additionalItems - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword

@stevehu
Copy link
Contributor

stevehu commented Jul 4, 2021

@pgalbraith Let's first prevent the message shown up. The additionalItems keyword is defined in the spec, but I don't think anybody is using it. We can implement it when someone needs it.

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

Successfully merging this pull request may close these issues.

2 participants