2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

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

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",