json-schema-validator icon indicating copy to clipboard operation
json-schema-validator copied to clipboard

Is it possible to use custom meta schema or vocabulary?

Open SridharSubramaniam opened this issue 6 years ago • 2 comments

Didn't find a method in code - but thought of asking - does the library support custom meta schemas?

similar to addMetaSchema in ajv. https://github.com/epoberezkin/ajv

SridharSubramaniam avatar Dec 19 '19 19:12 SridharSubramaniam

Yes. It does support customized meta schema with this builder method. We have provided default instances for v4, v6, v7, and v2019-09 but users can always create their own JsonMetaSchema instance with customized meta schema.

https://github.com/networknt/json-schema-validator/blob/master/src/main/java/com/networknt/schema/JsonMetaSchema.java#L188

stevehu avatar Dec 20 '19 02:12 stevehu

That's good to know. Will test it out. Thanks!

SridharSubramaniam avatar Dec 20 '19 15:12 SridharSubramaniam