blob: ad5006038fd3282b1e6c42605c3fd17057490844 [file]
{
"$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": {
"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": {
"contentSchema": { "type": "number" }
},
"tests": [
{
"instance": "42",
"assertions": [
{
"location": "",
"keyword": "contentSchema",
"expected": {}
}
]
}
]
}
]
}