Replies: 3 comments 3 replies
-
So JSON Schema out of the box isn't able to solve this, but it may be possible with a vocabulary extension: https://json-everything.net/json-schema#schema-data-2022 To be clear, which do you want to do?
The first can be achieved, but not the second. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. For example, I would like to describe a table in a database as an array of fields. Each field has a "name" property. Next, I'd like to set a clustering option that references a list of field names. When validating my json schema, I would like to be able to check that the values of the "cluster" element are all defined as names in the "fields" document. |
Beta Was this translation helpful? Give feedback.
-
ok thanks for your answers |
Beta Was this translation helpful? Give feedback.
-
Hello,
please, I'd like to check the following json data and verify that "cluster" values are defined as "name" from "fields".
I'd like to use some kind of dynamic enum
Is this possible?
Thanks in advance
{ "fields": [ { "name": "first" }, { "name": "second" } ], "cluster": [ "first" ] }
Beta Was this translation helpful? Give feedback.
All reactions