I would like to have a schema, which describes a value, which is a JSON schema itself, for example
{
"title": "Schema modification event",
"description": "Describes and event of modification of another (arbitrary) JSON schema",
"type": "object",
"properties": {
"field_name": {
"type": "string",
"format": "json-pointer",
"description": "Location where change occurred"
},
"field_schema": {
"$ref": "https://json-schema.org/draft-07/schema",
"description": "New schema of the location"
}
},
"required": [
"field_name",
"field_schema"
]
}
There isn't a type for a schema, but what you've done with field_schema
should work to ensure that field_schema
is a JSON Schema.
You wouldn't be able to process field_name
using the schema in field_schema
within the same operation, though. You'd have to do it in several steps:
field_name
is pointing and the schema at field_schema
.field_schema
schema.