Is it possible to validate one JSON schema structure with another JSON schema with Java? #156
-
I need to validate JSON schema structure with referenced JSON schema. I need to make sure that JSON schema adhere reference structure. Example - Below JSON schema uses reference of "$schema": "https://json-schema.org/draft/2020-12/schema" . I need to make sure that below Json schema is valid against "$schema": "https://json-schema.org/draft/2020-12/schema" Is It possible to validate one JSON schema structure with another JSON schema ? I haven't found any Java SDK/library yet to validate one schema against another json schema. It will be great if anyone can provide any input to validate Json schema against another json schema
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
A JSON Schema is "just JSON", so treat the schema like JSON and do validation as you usually would. |
Beta Was this translation helpful? Give feedback.
-
I already answered this for you yesterday: https://stackoverflow.com/questions/71326806/how-to-validate-json-schema-structure-with-another-json-schema-with-java/71328611#71328611 |
Beta Was this translation helpful? Give feedback.
A JSON Schema is "just JSON", so treat the schema like JSON and do validation as you usually would.
You should download the meta-schema, although this can be updated without notice or versioning (unlikely, but possible).