diff mbox series

[RFC,1/5] schemas: import layers.schema.json from OE-Core

Message ID 20251017231444.374436-2-yoann.congal@smile.fr
State New
Headers show
Series Bitbake-setup configuration schema | expand

Commit Message

Yoann Congal Oct. 17, 2025, 11:14 p.m. UTC
From: Yoann Congal <yoann.congal@smile.fr>

Import the current version of layers.schema.json
(as of 39ae9a1061fcfe8c30df511b6f00e407b80ffc4c)

layers.schema.json is used for the "sources" property of the
bitbake-setup configuration file.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 schemas/layers.schema.json | 76 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 schemas/layers.schema.json
diff mbox series

Patch

diff --git a/schemas/layers.schema.json b/schemas/layers.schema.json
new file mode 100644
index 000000000..659ee8da4
--- /dev/null
+++ b/schemas/layers.schema.json
@@ -0,0 +1,76 @@ 
+{
+    "description": "OpenEmbedder Layer Setup Manifest",
+    "type": "object",
+    "additionalProperties": false,
+    "required": [
+        "version"
+    ],
+    "properties": {
+        "version": {
+            "description": "The version of this document; currently '1.0'",
+            "enum": ["1.0"]
+        },
+        "sources": {
+            "description": "The dict of layer sources",
+            "type": "object",
+            "patternProperties": { ".*" : {
+                "type": "object",
+                "description": "The upstream source from which a set of layers may be fetched",
+                "additionalProperties": false,
+                "required": [
+                    "path"
+                ],
+                "properties": {
+                    "path": {
+                        "description": "The path where this layer source will be placed when fetching",
+                        "type": "string"
+                    },
+                    "contains_this_file": {
+                        "description": "Whether the directory with the layer source also contains this json description. Tools may want to skip the checkout of the source then.",
+                        "type": "boolean"
+                    },
+                    "git-remote": {
+                                "description": "A remote git source from which to fetch",
+                                "type": "object",
+                                "additionalProperties": false,
+                                "required": [
+                                    "rev"
+                                ],
+                                "properties": {
+                                    "branch": {
+                                        "description": "The git branch to fetch (optional)",
+                                        "type": "string"
+                                    },
+                                    "rev": {
+                                        "description": "The git revision to checkout",
+                                        "type": "string"
+                                    },
+                                    "describe": {
+                                        "description": "The output of 'git describe' (human readable description of the revision using tags in revision history).",
+                                        "type": "string"
+                                    },
+                                    "remotes": {
+                                        "description": "The dict of git remotes to add to this repository",
+                                        "type": "object",
+                                        "patternProperties": { ".*" : {
+                                            "description": "A git remote",
+                                            "type": "object",
+                                            "addtionalProperties": false,
+                                            "required": [
+                                                "uri"
+                                            ],
+                                            "properties": {
+                                                "uri": {
+                                                    "description": "The URI for the remote",
+                                                    "type": "string"
+                                                }
+                                            }
+                                        }}
+                                    }
+                                }
+                    }
+                }
+            }
+        }}
+    }
+}