alterschema
Version:
Convert between schema specifications
40 lines (39 loc) • 1.18 kB
JSON
{
"walker": "jsonschema-2019-09",
"rules": [
{
"vocabulary": "https://json-schema.org/draft/2019-09/vocab/applicator",
"condition": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/sourcemeta/alterschema/rules/jsonschema-2019-09-to-2019-09/empty-dependent-schemas",
"type": "object",
"required": [ "dependentSchemas" ],
"properties": {
"dependentSchemas": {
"const": {}
}
}
},
"transform": {
"$eval": "omit(schema, 'dependentSchemas')"
}
},
{
"vocabulary": "https://json-schema.org/draft/2019-09/vocab/applicator",
"condition": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/sourcemeta/alterschema/rules/jsonschema-2019-09-to-2019-09/empty-dependent-required",
"type": "object",
"required": [ "dependentRequired" ],
"properties": {
"dependentRequired": {
"const": {}
}
}
},
"transform": {
"$eval": "omit(schema, 'dependentRequired')"
}
}
]
}