diff --git a/mounts/org.osbuild.btrfs b/mounts/org.osbuild.btrfs index e1dc5a0d..32171f57 100755 --- a/mounts/org.osbuild.btrfs +++ b/mounts/org.osbuild.btrfs @@ -13,8 +13,23 @@ from typing import Dict from osbuild import mounts -SCHEMA = """ -"additionalProperties": False +SCHEMA_2 = """ +"additionalProperties": false, +"required": ["name", "type", "source", "target"], +"properties": { + "name": { "type": "string" }, + "type": { "type": "string" }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": true + } +} """ diff --git a/mounts/org.osbuild.ext4 b/mounts/org.osbuild.ext4 index cef5a3a6..812b8652 100755 --- a/mounts/org.osbuild.ext4 +++ b/mounts/org.osbuild.ext4 @@ -13,8 +13,23 @@ from typing import Dict from osbuild import mounts -SCHEMA = """ -"additionalProperties": false +SCHEMA_2 = """ +"additionalProperties": false, +"required": ["name", "type", "source", "target"], +"properties": { + "name": { "type": "string" }, + "type": { "type": "string" }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": true + } +} """ diff --git a/mounts/org.osbuild.fat b/mounts/org.osbuild.fat index e3a002ef..8b5e4229 100755 --- a/mounts/org.osbuild.fat +++ b/mounts/org.osbuild.fat @@ -13,8 +13,23 @@ from typing import Dict from osbuild import mounts -SCHEMA = """ -"additionalProperties": false +SCHEMA_2 = """ +"additionalProperties": false, +"required": ["name", "type", "source", "target"], +"properties": { + "name": { "type": "string" }, + "type": { "type": "string" }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": true + } +} """ diff --git a/mounts/org.osbuild.noop b/mounts/org.osbuild.noop index 15a4bfa9..1d97471a 100755 --- a/mounts/org.osbuild.noop +++ b/mounts/org.osbuild.noop @@ -15,8 +15,23 @@ from typing import Dict from osbuild import mounts -SCHEMA = """ -"additionalProperties": false +SCHEMA_2 = """ +"additionalProperties": false, +"required": ["name", "type", "source", "target"], +"properties": { + "name": { "type": "string" }, + "type": { "type": "string" }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": true + } +} """ diff --git a/mounts/org.osbuild.xfs b/mounts/org.osbuild.xfs index af5fef55..2cceaa5c 100755 --- a/mounts/org.osbuild.xfs +++ b/mounts/org.osbuild.xfs @@ -13,8 +13,23 @@ from typing import Dict from osbuild import mounts -SCHEMA = """ -"additionalProperties": false +SCHEMA_2 = """ +"additionalProperties": false, +"required": ["name", "type", "source", "target"], +"properties": { + "name": { "type": "string" }, + "type": { "type": "string" }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + }, + "options": { + "type": "object", + "additionalProperties": true + } +} """ diff --git a/osbuild/meta.py b/osbuild/meta.py index f761466a..1b499415 100644 --- a/osbuild/meta.py +++ b/osbuild/meta.py @@ -332,13 +332,19 @@ class ModuleInfo: **opts, } schema["required"] = [type_id] - elif self.type in ("Device", "Mount"): + elif self.type in ("Device"): schema["additionalProperties"] = True opts = self._load_opts(version, "1") schema["properties"] = { "type": {"enum": [self.name]}, "options": opts } + elif self.type in ("Mount"): + opts = self._load_opts("2") + schema.update(opts) + schema["properties"]["type"] = { + "enum": [self.name], + } else: opts = self._load_opts(version, "1") schema.update(opts)