66 lines
2.0 KiB
JSON
66 lines
2.0 KiB
JSON
[
|
|
{
|
|
"description": "title metadata override logic",
|
|
"enums": [],
|
|
"types": [
|
|
{
|
|
"name": "base_with_title",
|
|
"schemas": [
|
|
{
|
|
"$id": "base_with_title",
|
|
"type": "object",
|
|
"title": "Base Title",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "override_with_title",
|
|
"schemas": [
|
|
{
|
|
"$id": "override_with_title",
|
|
"base": "base_with_title",
|
|
"$ref": "base_with_title",
|
|
"title": "Override Title"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"puncs": [],
|
|
"tests": [
|
|
{
|
|
"description": "valid instance with title override schema",
|
|
"schema_id": "override_with_title",
|
|
"data": {
|
|
"name": "test",
|
|
"type": "base_with_title"
|
|
},
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "invalid instance - missing name required by base schema",
|
|
"schema_id": "override_with_title",
|
|
"data": {
|
|
"type": "override_with_title"
|
|
},
|
|
"valid": false,
|
|
"expect_errors": [
|
|
{
|
|
"code": "REQUIRED_FIELD_MISSING",
|
|
"path": "/name"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
] |