blob: 07c17a69180dc9e1f13ddee1267bc2d98c0eed4c [file] [log] [blame]
{
"$schema": "../test-suite.schema.json",
"description": "The content vocabulary",
"suite": [
{
"description": "`contentMediaType` is an annotation for string instances",
"compatibility": "7",
"schema": {
"contentMediaType": "application/json"
},
"tests": [
{
"instance": "{ \"foo\": \"bar\" }",
"assertions": [
{
"location": "",
"keyword": "contentMediaType",
"expected": {
"#": "application/json"
}
}
]
},
{
"instance": 42,
"assertions": [
{
"location": "",
"keyword": "contentMediaType",
"expected": {}
}
]
}
]
},
{
"description": "`contentEncoding` is an annotation for string instances",
"compatibility": "7",
"schema": {
"contentEncoding": "base64"
},
"tests": [
{
"instance": "SGVsbG8gZnJvbSBKU09OIFNjaGVtYQ==",
"assertions": [
{
"location": "",
"keyword": "contentEncoding",
"expected": {
"#": "base64"
}
}
]
},
{
"instance": 42,
"assertions": [
{
"location": "",
"keyword": "contentEncoding",
"expected": {}
}
]
}
]
},
{
"description": "`contentSchema` is an annotation for string instances",
"compatibility": "2019",
"schema": {
"$id": "https://annotations.json-schema.org/test/contentSchema-is-an-annotation",
"contentMediaType": "application/json",
"contentSchema": { "type": "number" }
},
"tests": [
{
"instance": "42",
"assertions": [
{
"location": "",
"keyword": "contentSchema",
"expected": {
"#": { "type": "number" }
}
}
]
},
{
"instance": 42,
"assertions": [
{
"location": "",
"keyword": "contentSchema",
"expected": {}
}
]
}
]
},
{
"description": "`contentSchema` requires `contentMediaType`",
"compatibility": "2019",
"schema": {
"$id": "https://annotations.json-schema.org/test/contentSchema-is-an-annotation",
"contentSchema": { "type": "number" }
},
"tests": [
{
"instance": "42",
"assertions": [
{
"location": "",
"keyword": "contentSchema",
"expected": {}
}
]
}
]
}
]
}