forked from M-Labs/artiq
1
0
Fork 0

jsonschema: validate hw_dev depending on target

This commit is contained in:
Astro 2021-02-11 23:43:52 +01:00 committed by Sébastien Bourdeauducq
parent 22ce5b0299
commit 3844cde97b
1 changed files with 27 additions and 2 deletions

View File

@ -11,7 +11,6 @@
},
"target": {
"type": "string",
"enum": ["kasli", "kasli_soc"],
"description": "Target board"
},
"variant": {
@ -24,7 +23,6 @@
},
"hw_rev": {
"type": "string",
"enum": ["v1.0", "v1.1", "v2.0"],
"description": "Hardware revision"
},
"base": {
@ -76,6 +74,33 @@
"required": ["target", "variant", "hw_rev", "base", "peripherals"],
"additionalProperties": false,
"oneOf": [
{
"properties": {
"target": {
"type": "string",
"const": "kasli"
},
"hw_rev": {
"type": "string",
"enum": ["v1.0", "v1.1", "v2.0"]
}
}
},
{
"properties": {
"target": {
"type": "string",
"const": "kasli_soc"
},
"hw_rev": {
"type": "string",
"enum": ["v1.0"]
}
}
}
],
"definitions": {
"peripheral": {
"type": "object",