Skip to content

Commit

Permalink
enhance json schema with descriptions
Browse files Browse the repository at this point in the history
When writing kas config files in an IDE that supports json schemas (like
vscode), the IDE gives hints about possible keys / values. We improve
this by adding short descriptions to the nodes. As the draft-04 version
does not yet support the "deprecated" property, we just mention
deprecations in the description.

No functional change.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information
fmoessbauer authored and jan-kiszka committed Nov 19, 2024
1 parent acb5a52 commit 3bea505
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions kas/schema-kas.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"additionalProperties": false,
"properties": {
"version": {
"description": "Version of the configuration file format",
"oneOf": [
{
"type": "string",
Expand All @@ -32,6 +33,7 @@
]
},
"includes": {
"description": "List of configuration files to include (parsed depth-first)",
"type": "array",
"items": {
"oneOf": [
Expand All @@ -47,9 +49,11 @@
"additionalProperties": false,
"properties": {
"repo": {
"description": "Repository 'key' the configuration file is located in",
"type": "string"
},
"file": {
"description": "Path to the configuration file relative to the repository",
"type": "string"
}
}
Expand All @@ -68,6 +72,7 @@
]
},
"defaults": {
"description": "Default values applied to all configuration nodes",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -82,9 +87,11 @@
"type": "string"
},
"refspec": {
"description": "Deprecated: Use 'branch' / 'tag' instead",
"type": "string"
},
"patches": {
"description": "Default patches to apply to all repositories",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -98,6 +105,7 @@
}
},
"overrides": {
"description": "Overrides for specific configuration nodes (auto-generated by kas locking feature)",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -122,6 +130,7 @@
"type": "string"
},
"env": {
"description": "Environment variables to forward and their default values (set to nulltype to only forward if set)",
"type": "object",
"additionalProperties": {
"type": ["string", "null"]
Expand Down Expand Up @@ -192,6 +201,7 @@
]
},
"refspec": {
"description": "Deprecated. Use 'commit' / 'branch' / 'tag' instead",
"type": "string"
},
"path": {
Expand All @@ -205,6 +215,7 @@
]
},
"layers": {
"description": "List of layers to append to the bblayers.conf",
"type": "object",
"additionalProperties": {
"oneOf": [
Expand All @@ -224,6 +235,7 @@
}
},
"patches": {
"description": "Patches to apply to the repository",
"type": "object",
"additionalProperties": {
"oneOf": [
Expand Down Expand Up @@ -257,18 +269,21 @@
}
},
"bblayers_conf_header": {
"description": "Header to prepend to the bblayers.conf",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"local_conf_header": {
"description": "Header to prepend to the local.conf",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"proxy_config": {
"description": "Deprecated. Proxy variables are automatically forwarded",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -287,6 +302,7 @@
}
},
"menu_configuration": {
"description": "Menu configuration, auto-generated by menu plugin",
"type": "object",
"additionalProperties": {
"oneOf": [
Expand All @@ -303,15 +319,18 @@
}
},
"artifacts": {
"description": "Artifacts which are expected to be present after executing the build (id / path pairs)",
"type": "object",
"additionalProperties": {
"type": ["string"]
}
},
"_source_dir": {
"description": "Source directory of the config file (auto-generated by kas menu plugin)",
"type": "string"
},
"_source_dir_host": {
"description": "Source directory of the config file on the host (auto-generated by kas menu plugin, when using kas-container)",
"type": "string"
}
}
Expand Down

0 comments on commit 3bea505

Please # to comment.