Skip to content

Commit

Permalink
Added JSON schema for autoyast-compat.json
Browse files Browse the repository at this point in the history
zypper install python3-jsonschema.rpm
jsonschema -i autoyast-compat.json autoyast-compat.schema.json

TODO: check in CI, maybe make `agama profile validate` a bit more
generic
  • Loading branch information
mvidner committed Feb 7, 2025
1 parent 9044b34 commit 3fefbf5
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions service/share/autoyast-compat.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://github.com/openSUSE/agama/blob/master/service/share/autoyast-compat.schema.json",
"title": "AutoYaST profile compatibility description",
"description": "For elements of AutoYaST profiles, describes whether Agama will understand them",
"type": "array",
"items": {
"$ref": "#/definitions/profileElement"
},
"definitions": {
"profileElement": {
"type": "object",
"additionalProperties": false,
"properties": {
"key": {
"type": "string"
},
"support": {
"type": "string",
"enum": ["yes", "no", "planned"]
},
"notes": {
"type": "string"
},
"agama": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/profileElement"
}
}
},
"required": [
"key"
],
"oneOf": [
{ "required": ["support"] },
{ "required": ["children"] }
]
}
}
}

0 comments on commit 3fefbf5

Please sign in to comment.