Skip to content

Commit

Permalink
Add driver.json schema
Browse files Browse the repository at this point in the history
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
  • Loading branch information
kostyanf14 authored and YanVugenfirer committed Feb 9, 2024
1 parent db04940 commit ebe550e
Showing 1 changed file with 119 additions and 0 deletions.
119 changes: 119 additions & 0 deletions drivers.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"patternProperties": {
".*": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"device": {
"type": "string"
},
"inf": {
"type": "string"
},
"sys": {
"type": "string"
},
"install_method": {
"type": "string",
"enum": [
"PNP",
"no-drv",
"custom"
]
},
"install_cert": {
"type": "boolean"
},
"install_command": {
"type": "string"
},
"type": {
"type": "integer"
},
"support": {
"type": "boolean"
},
"enlightenments_state": {
"type": "boolean"
},
"pretestcommands": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"desc": {
"type": "string"
},
"run": {
"type": "string"
}
},
"required": [
"desc",
"run"
]
}
]
},
"extra_software": {
"type": "array",
"items": [
{
"type": "string"
}
]
},
"reject_test_names": {
"type": "array",
"items": [
{
"type": "string"
}
]
},
"select_test_names": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"if": {
"properties": {
"install_method": {
"const": "custom"
}
}
},
"then": {
"required": [
"install_cert",
"install_command"
]
},
"else": {
"not": {
"required": [
"install_cert",
"install_command"
]
}
},
"required": [
"name",
"device",
"install_method",
"type"
],
"additionalProperties": false
}
},
"additionalProperties": false
}

0 comments on commit ebe550e

Please sign in to comment.