The jsonschema package is part of of the API of the mcp package, so it should not be internal. Change-Id: I9520797837329fc2cda09c2f46ec4d48d031b9d3 Reviewed-on: https://go-review.googlesource.com/c/tools/+/669996 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
37 lines
1 KiB
JSON
37 lines
1 KiB
JSON
[
|
|
{
|
|
"description": "evaluating the same schema location against the same data location twice is not a sign of an infinite loop",
|
|
"schema": {
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$defs": {
|
|
"int": { "type": "integer" }
|
|
},
|
|
"allOf": [
|
|
{
|
|
"properties": {
|
|
"foo": {
|
|
"$ref": "#/$defs/int"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"additionalProperties": {
|
|
"$ref": "#/$defs/int"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"tests": [
|
|
{
|
|
"description": "passing case",
|
|
"data": { "foo": 1 },
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "failing case",
|
|
"data": { "foo": "a string" },
|
|
"valid": false
|
|
}
|
|
]
|
|
}
|
|
]
|