From 6032ab765966cc41e77619c6ebb61ad457e4a506 Mon Sep 17 00:00:00 2001 From: Alex Batisse Date: Mon, 11 Aug 2025 12:24:32 +0200 Subject: [PATCH 1/5] fix: Improve schema dereferencing --- src/craft_ls/server.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/craft_ls/server.py b/src/craft_ls/server.py index c671405..19d403d 100644 --- a/src/craft_ls/server.py +++ b/src/craft_ls/server.py @@ -139,17 +139,9 @@ def hover(ls: LanguageServer, params: lsp.HoverParams) -> lsp.Hover | None: ): return None - if file_stem != "snapcraft": - description = get_description_from_path( - path=path, schema=cast(Schema, validator.schema) - ) - - else: - # TODO(snap): Change this once the jsonschema is more query-able. - description = get_description_from_path_snapcraft( - path=path, schema=cast(Schema, validator.schema) - ) - + description = get_description_from_path( + path=path, schema=cast(Schema, validator.schema) + ) return lsp.Hover( contents=lsp.MarkupContent( kind=lsp.MarkupKind.Markdown, From 57d7847b03342f49eb3bf4ce1ccab30f02daae13 Mon Sep 17 00:00:00 2001 From: Alex Batisse Date: Thu, 14 Aug 2025 10:12:50 +0200 Subject: [PATCH 2/5] feat: Improve symbol documentation --- src/craft_ls/server.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/craft_ls/server.py b/src/craft_ls/server.py index 19d403d..c671405 100644 --- a/src/craft_ls/server.py +++ b/src/craft_ls/server.py @@ -139,9 +139,17 @@ def hover(ls: LanguageServer, params: lsp.HoverParams) -> lsp.Hover | None: ): return None - description = get_description_from_path( - path=path, schema=cast(Schema, validator.schema) - ) + if file_stem != "snapcraft": + description = get_description_from_path( + path=path, schema=cast(Schema, validator.schema) + ) + + else: + # TODO(snap): Change this once the jsonschema is more query-able. + description = get_description_from_path_snapcraft( + path=path, schema=cast(Schema, validator.schema) + ) + return lsp.Hover( contents=lsp.MarkupContent( kind=lsp.MarkupKind.Markdown, From 7cd799823bb4d72b35afef4201ed07a5926ff160 Mon Sep 17 00:00:00 2001 From: Alex Batisse Date: Fri, 31 Oct 2025 14:38:34 +0100 Subject: [PATCH 3/5] refactor: Skip document scanning if not relevant --- src/craft_ls/cli.py | 17 ++------------- src/craft_ls/core.py | 26 ++++++++++++----------- src/craft_ls/server.py | 48 ++++++++++++------------------------------ 3 files changed, 30 insertions(+), 61 deletions(-) diff --git a/src/craft_ls/cli.py b/src/craft_ls/cli.py index f74f674..cfb809b 100644 --- a/src/craft_ls/cli.py +++ b/src/craft_ls/cli.py @@ -10,7 +10,6 @@ from lsprotocol import types as lsp from craft_ls.core import get_diagnostics, get_validator_and_scan -from craft_ls.types_ import IncompleteScan logging.basicConfig() @@ -21,20 +20,8 @@ def check(file_name: str) -> None: diagnostics: list[lsp.Diagnostic] = [] match get_validator_and_scan(file.stem, file.read_text()): - case None, _: - pass - - case None, IncompleteScan(): - diagnostics.append( - lsp.Diagnostic( - message="File is malformed", - range=lsp.Range( - start=lsp.Position(line=0, character=0), - end=lsp.Position(line=0, character=0), - ), - severity=lsp.DiagnosticSeverity.Warning, - ) - ) + case None: + print(f"Cannot validate '{file}'", file=sys.stderr) pass case validator, scan_result: diff --git a/src/craft_ls/core.py b/src/craft_ls/core.py index 637d81f..e3e6e0e 100644 --- a/src/craft_ls/core.py +++ b/src/craft_ls/core.py @@ -89,24 +89,26 @@ def iter_errors( def get_validator_and_scan( file_stem: str, instance_document: str -) -> tuple[Validator | None, ScanResult]: +) -> tuple[Validator, ScanResult] | None: """Get the most appropriate validator for the current document.""" + if file_stem not in FILE_TYPES: + return None + scanned_tokens = scan_for_tokens(instance_document) if file_stem in ("snapcraft", "rockcraft"): return default_validators[file_stem], scanned_tokens - if file_stem == "charmcraft": - if scanned_tokens.instance.get("type") != "charm": - return cast(Validator, MissingTypeCharmcraftValidator()), scanned_tokens + # by elimination, file_stem is charmcraft + if scanned_tokens.instance.get("type") != "charm": + return cast(Validator, MissingTypeCharmcraftValidator()), scanned_tokens - validator = Draft202012Validator( - schema=charmcraft_registry.resolver() - .lookup("urn:charmcraft:platformcharm") - .contents - ) - return cast(Validator, validator), scanned_tokens - return None, scanned_tokens + validator = Draft202012Validator( + schema=charmcraft_registry.resolver() + .lookup("urn:charmcraft:platformcharm") + .contents + ) + return cast(Validator, validator), scanned_tokens def scan_for_tokens(instance_document: str) -> ScanResult: @@ -327,7 +329,7 @@ def get_description_from_path_snapcraft( ) -> str: """Given an element path, get its description. - Limited in capability, as snapcraft schema used patterned properties. + Limited in capability, as snapcraft schema uses patterned properties. """ sub = schema for segment in path: diff --git a/src/craft_ls/server.py b/src/craft_ls/server.py index c671405..d87d832 100644 --- a/src/craft_ls/server.py +++ b/src/craft_ls/server.py @@ -17,7 +17,7 @@ get_schema_path_from_token_position, get_validator_and_scan, ) -from craft_ls.types_ import IncompleteScan, Schema +from craft_ls.types_ import Schema IS_DEV_MODE = os.environ.get("CRAFT_LS_DEV") MSG_SIZE = 79 @@ -59,21 +59,8 @@ def on_opened(params: lsp.DidOpenTextDocumentParams) -> None: ) match get_validator_and_scan(file_stem, source): - case None, _: - pass - - case None, IncompleteScan(): - diagnostics.append( - lsp.Diagnostic( - message="File is malformed", - range=lsp.Range( - start=lsp.Position(line=0, character=0), - end=lsp.Position(line=0, character=0), - ), - severity=lsp.DiagnosticSeverity.Warning, - ) - ) - pass + case None: + return case validator, scan_result: diagnostics.extend(get_diagnostics(validator, scan_result)) @@ -95,21 +82,8 @@ def on_changed(params: lsp.DidOpenTextDocumentParams) -> None: diagnostics = [] match get_validator_and_scan(file_stem, doc.source): - case None, _: - pass - - case None, IncompleteScan(): - diagnostics.append( - lsp.Diagnostic( - message="File is malformed", - range=lsp.Range( - start=lsp.Position(line=0, character=0), - end=lsp.Position(line=0, character=0), - ), - severity=lsp.DiagnosticSeverity.Warning, - ) - ) - pass + case None: + return case validator, scan_result: diagnostics.extend(get_diagnostics(validator, scan_result)) @@ -127,10 +101,16 @@ def hover(ls: LanguageServer, params: lsp.HoverParams) -> lsp.Hover | None: document = ls.workspace.get_text_document(document_uri) file_stem = Path(uri).stem - validator, _ = get_validator_and_scan(file_stem, document.source) - if validator is None: - return None + match get_validator_and_scan(file_stem, document.source): + case None: + return None + + case None, _: + return None + + case validator_found, _: + validator = validator_found if not ( path := get_schema_path_from_token_position( From 3c57479a1891b9bd4ab30fea52588c2cabddf367 Mon Sep 17 00:00:00 2001 From: Alex Batisse Date: Fri, 31 Oct 2025 15:52:07 +0100 Subject: [PATCH 4/5] feat: Update and patch new json schemas; adapt validation --- build/snap_01_add_ids.patch | 64 + build/snap_01_build_err.patch | 20 - src/craft_ls/core.py | 113 +- src/craft_ls/schemas/charmcraft.json | 68 +- src/craft_ls/schemas/rockcraft.json | 812 +++- src/craft_ls/schemas/snapcraft.json | 5777 +++++++++++++++++++++----- src/craft_ls/server.py | 14 +- 7 files changed, 5632 insertions(+), 1236 deletions(-) create mode 100644 build/snap_01_add_ids.patch delete mode 100644 build/snap_01_build_err.patch diff --git a/build/snap_01_add_ids.patch b/build/snap_01_add_ids.patch new file mode 100644 index 0000000..a12db54 --- /dev/null +++ b/build/snap_01_add_ids.patch @@ -0,0 +1,64 @@ +--- .build/snapcraft_upstream.json.orig 2025-10-31 14:39:20.642999620 +0100 ++++ src/craft_ls/schemas/snapcraft.json 2025-10-31 15:10:13.397566863 +0100 +@@ -1,4 +1,5 @@ + { ++ "$id": "#snapcraft", + "$defs": { + "App": { + "additionalProperties": false, +@@ -503,6 +504,7 @@ + "type": "object" + }, + "BareCore22Project": { ++ "$id": "urn:snapcraft:bare22", + "additionalProperties": false, + "properties": { + "name": { +@@ -1090,6 +1092,7 @@ + "type": "object" + }, + "BareCore24Project": { ++ "$id": "urn:snapcraft:bare24", + "additionalProperties": false, + "properties": { + "name": { +@@ -1678,6 +1681,7 @@ + "type": "object" + }, + "BaseCore22Project": { ++ "$id": "urn:snapcraft:base22", + "additionalProperties": false, + "properties": { + "name": { +@@ -2259,6 +2263,7 @@ + "type": "object" + }, + "BaseCore24Project": { ++ "$id": "urn:snapcraft:base24", + "additionalProperties": false, + "properties": { + "name": { +@@ -2840,6 +2845,7 @@ + "type": "object" + }, + "BaseDevelProject": { ++ "$id": "urn:snapcraft:devel", + "additionalProperties": false, + "properties": { + "name": { +@@ -3555,6 +3561,7 @@ + "type": "object" + }, + "Core22Project": { ++ "$id": "urn:snapcraft:core22", + "additionalProperties": false, + "properties": { + "name": { +@@ -4151,6 +4158,7 @@ + "type": "object" + }, + "Core24Project": { ++ "$id": "urn:snapcraft:core24", + "additionalProperties": false, + "properties": { + "name": { diff --git a/build/snap_01_build_err.patch b/build/snap_01_build_err.patch deleted file mode 100644 index 953cb59..0000000 --- a/build/snap_01_build_err.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- .build/snapcraft_upstream.json 2025-05-06 11:36:09.864107804 +0200 -+++ new.json 2025-05-06 11:50:17.915839085 +0200 -@@ -1037,12 +1037,15 @@ - }, - "allOf": [ - { -- "required": ["type"] -+ "required": ["type"], -+ "err_msg": "Missing build information 'type' or 'base'" - }, - { - "not": { - "required": ["base"] -- } -+ }, -+ "err_msg": "type: must omit 'base'", -+ "err_path": ["base"] - } - ] - }, diff --git a/src/craft_ls/core.py b/src/craft_ls/core.py index e3e6e0e..fe3c927 100644 --- a/src/craft_ls/core.py +++ b/src/craft_ls/core.py @@ -62,12 +62,19 @@ files("craft_ls.schemas").joinpath(f"{file_type}.json").read_text() ) default_validators[file_type] = validator_for(schema)(schema) + if file_type == "charmcraft": schema = Resource.from_contents( jsonref.loads(schema_str), default_specification=DRAFT202012 ) charmcraft_registry = schema @ Registry() + if file_type == "snapcraft": + schema = Resource.from_contents( + jsonref.loads(schema_str), default_specification=DRAFT202012 + ) + snapcraft_registry = schema @ Registry() + class MissingTypeCharmcraftValidator: """No op implementation. @@ -87,6 +94,24 @@ def iter_errors( ) +class MissingTypeSnapcraftValidator: + """No op implementation. + + Used if snapcraft.yaml is missing the 'base' or 'build-base' key. + """ + + def iter_errors( + self, instance: Any, _schema: Any = None + ) -> Generator[ValidationError, None, None]: + """Lazily yield each of the validation errors in the given instance.""" + yield ValidationError( + validator="required", + path=deque([]), + message="Filling 'base' and/or 'build-base' key(s) is mandatory.", + schema={}, + ) + + def get_validator_and_scan( file_stem: str, instance_document: str ) -> tuple[Validator, ScanResult] | None: @@ -96,18 +121,71 @@ def get_validator_and_scan( scanned_tokens = scan_for_tokens(instance_document) - if file_stem in ("snapcraft", "rockcraft"): + if file_stem == "rockcraft": return default_validators[file_stem], scanned_tokens - # by elimination, file_stem is charmcraft - if scanned_tokens.instance.get("type") != "charm": - return cast(Validator, MissingTypeCharmcraftValidator()), scanned_tokens + elif file_stem == "snapcraft": + base = scanned_tokens.instance.get("base", None) + build_base = scanned_tokens.instance.get("build-base", None) + match base, build_base: + case "core22", _: + validator = Draft202012Validator( + schema=snapcraft_registry.resolver() + .lookup("urn:snapcraft:core22") + .contents + ) + case "core24", _: + validator = Draft202012Validator( + schema=snapcraft_registry.resolver() + .lookup("urn:snapcraft:core24") + .contents + ) + case "bare", "core22": + validator = Draft202012Validator( + schema=snapcraft_registry.resolver() + .lookup("urn:snapcraft:bare22") + .contents + ) + case "bare", "core24": + validator = Draft202012Validator( + schema=snapcraft_registry.resolver() + .lookup("urn:snapcraft:bare24") + .contents + ) + case _, "core22": + validator = Draft202012Validator( + schema=snapcraft_registry.resolver() + .lookup("urn:snapcraft:base22") + .contents + ) + case _, "core24": + validator = Draft202012Validator( + schema=snapcraft_registry.resolver() + .lookup("urn:snapcraft:base24") + .contents + ) + case _, "devel": + validator = Draft202012Validator( + schema=snapcraft_registry.resolver() + .lookup("urn:snapcraft:devel") + .contents + ) - validator = Draft202012Validator( - schema=charmcraft_registry.resolver() - .lookup("urn:charmcraft:platformcharm") - .contents - ) + case _: + validator = cast(Validator, MissingTypeSnapcraftValidator()) + + return validator, scanned_tokens + + else: + # by elimination, file_stem is charmcraft + if scanned_tokens.instance.get("type") != "charm": + return cast(Validator, MissingTypeCharmcraftValidator()), scanned_tokens + + validator = Draft202012Validator( + schema=charmcraft_registry.resolver() + .lookup("urn:charmcraft:platformcharm") + .contents + ) return cast(Validator, validator), scanned_tokens @@ -324,23 +402,6 @@ def get_description_from_path(path: Iterable[str | int], schema: Schema) -> str: return MISSING_DESC -def get_description_from_path_snapcraft( - path: Iterable[str | int], schema: Schema -) -> str: - """Given an element path, get its description. - - Limited in capability, as snapcraft schema uses patterned properties. - """ - sub = schema - for segment in path: - if "patternProperties" in sub: - sub = next(iter(sub["patternProperties"].values()), cast(Schema, {})) - continue - sub = sub.get("properties", {}).get(segment, {}) - - return str(sub.get("description", sub.get("title", MISSING_DESC))).capitalize() - - def get_schema_path_from_token_position( position: lsp.Position, instance_document: str ) -> deque[str] | None: diff --git a/src/craft_ls/schemas/charmcraft.json b/src/craft_ls/schemas/charmcraft.json index f7eadcb..8ea0787 100644 --- a/src/craft_ls/schemas/charmcraft.json +++ b/src/craft_ls/schemas/charmcraft.json @@ -86,12 +86,6 @@ "default": null, "title": "Title" }, - "version": { - "const": "unversioned", - "default": "unversioned", - "title": "Version", - "type": "string" - }, "summary": { "description": "A brief (one-line) summary of your charm.", "maxLength": 200, @@ -120,26 +114,6 @@ "default": null, "title": "Build-Base" }, - "contact": { - "default": null, - "title": "Contact", - "type": "null" - }, - "issues": { - "default": null, - "title": "Issues", - "type": "null" - }, - "source-code": { - "default": null, - "title": "Source-Code", - "type": "null" - }, - "license": { - "default": null, - "title": "License", - "type": "null" - }, "adopt-info": { "anyOf": [ { @@ -150,6 +124,10 @@ } ], "default": null, + "description": "Selects a part to inherit metadata from.", + "examples": [ + "foo-part" + ], "title": "Adopt-Info" }, "parts": { @@ -181,6 +159,10 @@ } ], "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": [ + "[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]" + ], "title": "Package-Repositories" }, "type": { @@ -901,12 +883,6 @@ "default": null, "title": "Title" }, - "version": { - "const": "unversioned", - "default": "unversioned", - "title": "Version", - "type": "string" - }, "summary": { "description": "A brief (one-line) summary of your charm.", "maxLength": 200, @@ -1018,26 +994,6 @@ "title": "Platforms", "type": "object" }, - "contact": { - "default": null, - "title": "Contact", - "type": "null" - }, - "issues": { - "default": null, - "title": "Issues", - "type": "null" - }, - "source-code": { - "default": null, - "title": "Source-Code", - "type": "null" - }, - "license": { - "default": null, - "title": "License", - "type": "null" - }, "adopt-info": { "anyOf": [ { @@ -1048,6 +1004,10 @@ } ], "default": null, + "description": "Selects a part to inherit metadata from.", + "examples": [ + "foo-part" + ], "title": "Adopt-Info" }, "parts": { @@ -1074,6 +1034,10 @@ } ], "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": [ + "[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]" + ], "title": "Package-Repositories" }, "type": { diff --git a/src/craft_ls/schemas/rockcraft.json b/src/craft_ls/schemas/rockcraft.json index 5bb3e39..b2a2caa 100644 --- a/src/craft_ls/schemas/rockcraft.json +++ b/src/craft_ls/schemas/rockcraft.json @@ -2,11 +2,12 @@ "$id": "https://github.com/canonical/rockcraft/blob/main/schema/rockcraft.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { - "Check": { + "ExecCheck": { "additionalProperties": false, - "description": "Lightweight schema validation for a Pebble checks.\n\nBased on\nhttps://canonical-pebble.readthedocs-hosted.com/en/latest/reference/layer-specification/", + "description": "Model for a check that executes a command.", "properties": { "override": { + "description": "How this check is combined with another same-named check.", "enum": [ "merge", "replace" @@ -28,6 +29,7 @@ } ], "default": null, + "description": "Check level, used for filtering checks when calling the health endpoint.", "title": "Level" }, "period": { @@ -40,6 +42,11 @@ } ], "default": null, + "description": "How frequently to run this check.", + "examples": [ + "10s", + "30m" + ], "title": "Period" }, "timeout": { @@ -52,11 +59,17 @@ } ], "default": null, + "description": "The time before the check fails if not completed. Must be less than ``period``.", + "examples": [ + "5s", + "2m" + ], "title": "Timeout" }, "threshold": { "anyOf": [ { + "minimum": 1, "type": "integer" }, { @@ -64,53 +77,29 @@ } ], "default": null, + "description": "Number of consecutive errors before the check is considered failed.", "title": "Threshold" }, - "http": { - "anyOf": [ - { - "$ref": "#/$defs/HttpCheck" - }, - { - "type": "null" - } - ], - "default": null - }, - "tcp": { - "anyOf": [ - { - "$ref": "#/$defs/TcpCheck" - }, - { - "type": "null" - } - ], - "default": null - }, "exec": { - "anyOf": [ - { - "$ref": "#/$defs/ExecCheck" - }, - { - "type": "null" - } - ], - "default": null + "$ref": "#/$defs/ExecCheckOptions" } }, "required": [ - "override" + "override", + "exec" ], - "title": "Check", + "title": "ExecCheck", "type": "object" }, - "ExecCheck": { + "ExecCheckOptions": { "additionalProperties": false, "description": "Lightweight schema validation for a Pebble exec check.", "properties": { "command": { + "description": "The command to execute for this health check.", + "examples": [ + "/usr/bin/health-check" + ], "title": "Command", "type": "string" }, @@ -124,6 +113,7 @@ } ], "default": null, + "description": "Run the check as the given service's user and group, with that service's working directory and environment variables set.", "title": "Service-Context" }, "environment": { @@ -139,6 +129,7 @@ } ], "default": null, + "description": "A mapping of environment variables with which to run the check.", "title": "Environment" }, "user": { @@ -151,11 +142,13 @@ } ], "default": null, + "description": "The user that will run the check.", "title": "User" }, "user-id": { "anyOf": [ { + "minimum": 0, "type": "integer" }, { @@ -163,6 +156,7 @@ } ], "default": null, + "description": "The UID of the user that will run the check.", "title": "User-Id" }, "group": { @@ -175,11 +169,13 @@ } ], "default": null, + "description": "The group name for the check process to run as.", "title": "Group" }, "group-id": { "anyOf": [ { + "minimum": 0, "type": "integer" }, { @@ -187,6 +183,7 @@ } ], "default": null, + "description": "The GID of the group that will run the check.", "title": "Group-Id" }, "working-dir": { @@ -199,20 +196,126 @@ } ], "default": null, + "description": "The working directory in which the command will run.", "title": "Working-Dir" } }, "required": [ "command" ], - "title": "ExecCheck", + "title": "ExecCheckOptions", "type": "object" }, + "FailureExitState": { + "description": "What to do on a failure exit.", + "enum": [ + "restart", + "shutdown", + "success-shutdown", + "ignore" + ], + "title": "FailureExitState", + "type": "string" + }, "HttpCheck": { + "additionalProperties": false, + "description": "Model for a check that uses HTTP.", + "properties": { + "override": { + "description": "How this check is combined with another same-named check.", + "enum": [ + "merge", + "replace" + ], + "title": "Override", + "type": "string" + }, + "level": { + "anyOf": [ + { + "enum": [ + "alive", + "ready" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Check level, used for filtering checks when calling the health endpoint.", + "title": "Level" + }, + "period": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "How frequently to run this check.", + "examples": [ + "10s", + "30m" + ], + "title": "Period" + }, + "timeout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The time before the check fails if not completed. Must be less than ``period``.", + "examples": [ + "5s", + "2m" + ], + "title": "Timeout" + }, + "threshold": { + "anyOf": [ + { + "minimum": 1, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Number of consecutive errors before the check is considered failed.", + "title": "Threshold" + }, + "http": { + "$ref": "#/$defs/HttpCheckOptions" + } + }, + "required": [ + "override", + "http" + ], + "title": "HttpCheck", + "type": "object" + }, + "HttpCheckOptions": { "additionalProperties": false, "description": "Lightweight schema validation for a Pebble HTTP check.", "properties": { "url": { + "description": "The URL to fetch", + "examples": [ + "https://example.com/foo", + "http://localhost/health-check" + ], "format": "uri", "minLength": 1, "title": "Url", @@ -231,13 +334,19 @@ } ], "default": null, + "description": "Headers to send with the HTTP request.", + "examples": [ + { + "X-Health-Check": "true" + } + ], "title": "Headers" } }, "required": [ "url" ], - "title": "HttpCheck", + "title": "HttpCheckOptions", "type": "object" }, "Platform": { @@ -297,6 +406,7 @@ "description": "Lightweight schema validation for a Pebble service.\n\nBased on\nhttps://canonical-pebble.readthedocs-hosted.com/en/latest/reference/layer-specification/", "properties": { "override": { + "description": "Whether to replace pre-existing service definitions or merge them.", "enum": [ "merge", "replace" @@ -305,6 +415,11 @@ "type": "string" }, "command": { + "description": "The command used to run the service.", + "examples": [ + "/usr/bin/ls", + "/usr/bin/somedaemon --db=/db/path [ --port 8080 ]" + ], "title": "Command", "type": "string" }, @@ -318,6 +433,7 @@ } ], "default": null, + "description": "A short summary of the service.", "title": "Summary" }, "description": { @@ -330,6 +446,7 @@ } ], "default": null, + "description": "A detailed, potentially multi-line, description of the service.", "title": "Description" }, "startup": { @@ -346,6 +463,7 @@ } ], "default": null, + "description": "Whether the service is enabled automatically when the rock starts.", "title": "Startup" }, "after": { @@ -361,6 +479,7 @@ } ], "default": null, + "description": "The names of other services that this service should start after.", "title": "After" }, "before": { @@ -376,6 +495,7 @@ } ], "default": null, + "description": "The names of other services that this service should start before.", "title": "Before" }, "requires": { @@ -391,6 +511,7 @@ } ], "default": null, + "description": "The names of other services that this service requires in order to start.", "title": "Requires" }, "environment": { @@ -406,6 +527,7 @@ } ], "default": null, + "description": "Environment variables to set for this process.", "title": "Environment" }, "user": { @@ -418,6 +540,7 @@ } ], "default": null, + "description": "Run the service as this user.", "title": "User" }, "user-id": { @@ -430,6 +553,7 @@ } ], "default": null, + "description": "Run the service with this user ID.", "title": "User-Id" }, "group": { @@ -442,6 +566,7 @@ } ], "default": null, + "description": "Run the service as this group.", "title": "Group" }, "group-id": { @@ -454,6 +579,7 @@ } ], "default": null, + "description": "Run the service with this group ID.", "title": "Group-Id" }, "working-dir": { @@ -466,52 +592,38 @@ } ], "default": null, + "description": "Working directory for the service command.", "title": "Working-Dir" }, "on-success": { "anyOf": [ { - "enum": [ - "restart", - "shutdown", - "ignore" - ], - "type": "string" + "$ref": "#/$defs/SuccessExitState" }, { "type": "null" } ], "default": null, - "title": "On-Success" + "description": "What to do when the service exits with success." }, "on-failure": { "anyOf": [ { - "enum": [ - "restart", - "shutdown", - "ignore" - ], - "type": "string" + "$ref": "#/$defs/FailureExitState" }, { "type": "null" } ], "default": null, - "title": "On-Failure" + "description": "What to do when the service exits with an error." }, "on-check-failure": { "anyOf": [ { "additionalProperties": { - "enum": [ - "restart", - "shutdown", - "ignore" - ], - "type": "string" + "$ref": "#/$defs/FailureExitState" }, "type": "object" }, @@ -520,6 +632,7 @@ } ], "default": null, + "description": "What to do when a health check fails.", "title": "On-Check-Failure" }, "backoff-delay": { @@ -532,11 +645,17 @@ } ], "default": null, + "description": "Initial backoff delay for the 'restart' exit action.", + "examples": [ + "500ms", + "10s" + ], "title": "Backoff-Delay" }, "backoff-factor": { "anyOf": [ { + "minimum": 1.0, "type": "number" }, { @@ -544,6 +663,11 @@ } ], "default": null, + "description": "Multiplication factor for backoff delay.", + "examples": [ + "2.0", + "1.000001" + ], "title": "Backoff-Factor" }, "backoff-limit": { @@ -556,6 +680,11 @@ } ], "default": null, + "description": "Maximum backoff delay.", + "examples": [ + "30s", + "1m" + ], "title": "Backoff-Limit" }, "kill-delay": { @@ -568,6 +697,11 @@ } ], "default": null, + "description": "How long to wait after a SIGTERM and exit pebble uses SIGKILL.", + "examples": [ + "10s", + "1m" + ], "title": "Kill-Delay" } }, @@ -578,11 +712,114 @@ "title": "Service", "type": "object" }, + "SuccessExitState": { + "description": "What to do on exit success.", + "enum": [ + "restart", + "shutdown", + "failure-shutdown", + "ignore" + ], + "title": "SuccessExitState", + "type": "string" + }, "TcpCheck": { + "additionalProperties": false, + "description": "Model for a check that uses TCP.", + "properties": { + "override": { + "description": "How this check is combined with another same-named check.", + "enum": [ + "merge", + "replace" + ], + "title": "Override", + "type": "string" + }, + "level": { + "anyOf": [ + { + "enum": [ + "alive", + "ready" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Check level, used for filtering checks when calling the health endpoint.", + "title": "Level" + }, + "period": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "How frequently to run this check.", + "examples": [ + "10s", + "30m" + ], + "title": "Period" + }, + "timeout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The time before the check fails if not completed. Must be less than ``period``.", + "examples": [ + "5s", + "2m" + ], + "title": "Timeout" + }, + "threshold": { + "anyOf": [ + { + "minimum": 1, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Number of consecutive errors before the check is considered failed.", + "title": "Threshold" + }, + "tcp": { + "$ref": "#/$defs/TcpCheckOptions" + } + }, + "required": [ + "override", + "tcp" + ], + "title": "TcpCheck", + "type": "object" + }, + "TcpCheckOptions": { "additionalProperties": false, "description": "Lightweight schema validation for a Pebble TCP check.", "properties": { "port": { + "description": "The TCP port to check is open.", + "maximum": 65535, + "minimum": 1, "title": "Port", "type": "integer" }, @@ -596,13 +833,19 @@ } ], "default": null, + "description": "The hostname or IP address to check. Defaults to 'localhost'.", + "examples": [ + "localhost", + "::1", + "127.0.0.1" + ], "title": "Host" } }, "required": [ "port" ], - "title": "TcpCheck", + "title": "TcpCheckOptions", "type": "object" }, "Part": { @@ -862,6 +1105,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -930,7 +1178,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -946,7 +1194,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -962,7 +1210,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -978,7 +1226,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -994,7 +1242,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -1307,6 +1555,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -1375,7 +1628,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -1391,7 +1644,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -1407,7 +1660,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -1423,7 +1676,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -1439,7 +1692,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -1544,6 +1797,15 @@ "title": "Autotools-Bootstrap-Parameters", "type": "array" }, + "disable-parallel": { + "default": false, + "description": "Whether to disable CPU multithreading during the build step.", + "examples": [ + "true" + ], + "title": "Disable-Parallel", + "type": "boolean" + }, "source-checksum": { "default": "", "description": "The checksum of the downloaded source, to ensure integrity.", @@ -1642,15 +1904,6 @@ "title": "Source-Type", "type": "string" }, - "disable-parallel": { - "default": false, - "description": "Whether to disable CPU multithreading during the build step.", - "examples": [ - "true" - ], - "title": "Disable-Parallel", - "type": "boolean" - }, "after": { "default": [], "description": "The parts to process before starting this part's build.", @@ -1740,6 +1993,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -1808,7 +2066,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -1824,7 +2082,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -1840,7 +2098,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -1856,7 +2114,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -1872,7 +2130,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -2157,6 +2415,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -2225,7 +2488,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -2241,7 +2504,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -2257,7 +2520,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -2273,7 +2536,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -2289,7 +2552,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -2587,6 +2850,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -2655,7 +2923,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -2671,7 +2939,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -2687,7 +2955,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -2703,7 +2971,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -2719,7 +2987,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -3021,6 +3289,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -3089,7 +3362,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -3105,7 +3378,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -3121,7 +3394,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -3137,7 +3410,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -3153,7 +3426,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -3438,6 +3711,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -3506,7 +3784,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -3522,7 +3800,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -3538,7 +3816,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -3554,7 +3832,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -3570,7 +3848,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -3871,6 +4149,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -3939,7 +4222,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -3955,7 +4238,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -3971,7 +4254,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -3987,7 +4270,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -4003,7 +4286,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -4288,6 +4571,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -4356,7 +4644,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -4372,7 +4660,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -4388,7 +4676,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -4404,7 +4692,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -4420,7 +4708,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -4723,6 +5011,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -4791,7 +5084,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -4807,7 +5100,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -4823,7 +5116,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -4839,7 +5132,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -4855,7 +5148,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -5156,6 +5449,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -5224,7 +5522,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -5240,7 +5538,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -5256,7 +5554,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -5272,7 +5570,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -5288,7 +5586,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -5581,6 +5879,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -5649,7 +5952,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -5665,7 +5968,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -5681,7 +5984,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -5697,7 +6000,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -5713,7 +6016,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -6011,6 +6314,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -6079,7 +6387,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -6095,7 +6403,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -6111,7 +6419,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -6127,7 +6435,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -6143,7 +6451,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -6436,6 +6744,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -6504,7 +6817,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -6520,7 +6833,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -6536,7 +6849,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -6552,7 +6865,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -6568,7 +6881,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -6861,6 +7174,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -6929,7 +7247,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -6945,7 +7263,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -6961,7 +7279,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -6977,7 +7295,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -6993,7 +7311,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -7278,6 +7596,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -7346,7 +7669,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -7362,7 +7685,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -7378,7 +7701,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -7394,7 +7717,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -7410,7 +7733,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -7712,6 +8035,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -7780,7 +8108,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -7796,7 +8124,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -7812,7 +8140,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -7828,7 +8156,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -7844,7 +8172,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -8154,6 +8482,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -8222,7 +8555,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -8238,7 +8571,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -8254,7 +8587,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -8270,7 +8603,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -8286,7 +8619,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -8599,6 +8932,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -8667,7 +9005,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -8683,7 +9021,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -8699,7 +9037,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -8715,7 +9053,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -8731,7 +9069,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -9034,6 +9372,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -9102,7 +9445,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -9118,7 +9461,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -9134,7 +9477,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -9150,7 +9493,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -9166,7 +9509,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -9509,6 +9852,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -9577,7 +9925,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -9593,7 +9941,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -9609,7 +9957,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -9625,7 +9973,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -9641,7 +9989,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -9934,6 +10282,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -10002,7 +10355,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -10018,7 +10371,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -10034,7 +10387,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -10050,7 +10403,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -10066,7 +10419,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -10369,6 +10722,11 @@ }, "build-attributes": { "default": [], + "description": "Identifiers that control specific behaviors during the build.", + "examples": [ + "[enable-usrmerge]", + "[disable-usrmerge]" + ], "items": { "type": "string" }, @@ -10437,7 +10795,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the pull step.", "examples": [ - "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" + "|\n craftctl default\n rm $CRAFT_PART_SRC/pyproject.toml" ], "title": "Override-Pull" }, @@ -10453,7 +10811,7 @@ "default": null, "description": "The commands to run after the part's overlay packages are installed.", "examples": [ - "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" + "|\n rm -f ${CRAFT_OVERLAY}/usr/bin/vi ${CRAFT_OVERLAY}/usr/bin/vim*\n rm -f ${CRAFT_OVERLAY}/usr/bin/emacs*\n rm -f ${CRAFT_OVERLAY}/bin/nano" ], "title": "Overlay-Script" }, @@ -10469,7 +10827,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the build step.", "examples": [ - "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." + "|\n cd cmd/webhook\n mkdir $CRAFT_PART_INSTALL/ko-app\n go build -o $CRAFT_PART_INSTALL/ko-app/webhook -a ." ], "title": "Override-Build" }, @@ -10485,7 +10843,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the stage step.", "examples": [ - "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" + "|\n craftctl default\n chown -R 499 \"${CRAFT_PART_INSTALL}/entrypoint.sh\"" ], "title": "Override-Stage" }, @@ -10501,7 +10859,7 @@ "default": null, "description": "The commands to run instead of the default behavior of the prime step.", "examples": [ - "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" + "|\n craftctl default\n mkdir -p $CRAFT_PRIME/var/lib/mysql\n mkdir -p $CRAFT_PRIME/var/lib/mysqld" ], "title": "Override-Prime" }, @@ -10580,7 +10938,16 @@ "description": "Rockcraft project definition.", "properties": { "name": { - "description": "Valid names for rocks. It matches the accepted values for pebble layer files:\n\n- must start with a lowercase letter [a-z]\n- must contain only lowercase letters [a-z], numbers [0-9] or hyphens\n- must not end with a hyphen, and must not contain two or more consecutive hyphens\n", + "description": "The name of the project. This is used when uploading, publishing, or installing.\n\nThe project name must consist only of lower-case ASCII letters (``a``-``z``), numerals\n(``0``-``9``), and hyphens (``-``). It must contain at least one letter, not start or\nend with a hyphen, and not contain two consecutive hyphens. The maximum length is 40\ncharacters.\n", + "examples": [ + "ubuntu", + "jupyterlab-desktop", + "lxd", + "digikam", + "kafka", + "mysql-router-k8s" + ], + "maxLength": 40, "minLength": 1, "title": "Project Name", "type": "string" @@ -10631,19 +10998,23 @@ "title": "Version" }, "summary": { + "description": "A short, single line description of the rock.", "title": "Summary", "type": "string" }, "description": { + "description": "A full description of the rock, potentially including multiple paragraphs.", "title": "Description", "type": "string" }, "base": { + "description": "The base system image for the rock.", "enum": [ "bare", "ubuntu@20.04", "ubuntu@22.04", - "ubuntu@24.04" + "ubuntu@24.04", + "ubuntu@25.10" ], "title": "Base", "type": "string" @@ -10655,6 +11026,7 @@ "ubuntu@20.04", "ubuntu@22.04", "ubuntu@24.04", + "ubuntu@25.10", "devel" ], "type": "string" @@ -10664,6 +11036,7 @@ } ], "default": null, + "description": "The system used to build the rock.", "title": "Build-Base" }, "platforms": { @@ -10677,6 +11050,10 @@ } ] }, + "description": "Determines which architectures the project builds and runs on.", + "examples": [ + "{amd64: {build-on: [amd64], build-for: [amd64]}, arm64: {build-on: [amd64, arm64], build-for: [arm64]}}" + ], "patternProperties": { "(amd64|arm64|armhf|i386|ppc64el|riscv64|s390x)": { "anyOf": [ @@ -10742,6 +11119,10 @@ } ], "default": null, + "description": "The author's contact links and email addresses.", + "examples": [ + "[contact@example.com, https://example.com/contact]" + ], "title": "Contact" }, "issues": { @@ -10761,6 +11142,10 @@ } ], "default": null, + "description": "The links and email addresses for submitting issues, bugs, and feature requests.", + "examples": [ + "[issues@example.com, https://example.com/issues]" + ], "title": "Issues" }, "source-code": { @@ -10775,6 +11160,10 @@ } ], "default": null, + "description": "The links to the source code of the project.", + "examples": [ + "[https://github.com/canonical/craft-application]" + ], "title": "Source-Code" }, "license": { @@ -10787,6 +11176,11 @@ } ], "default": null, + "description": "The project's license as an SPDX expression", + "examples": [ + "GPL-3.0+", + "Apache-2.0" + ], "title": "License" }, "adopt-info": { @@ -10799,12 +11193,20 @@ } ], "default": null, + "description": "Selects a part to inherit metadata from.", + "examples": [ + "foo-part" + ], "title": "Adopt-Info" }, "parts": { "additionalProperties": { "$ref": "#/$defs/Part" }, + "description": "The self-contained software pieces needed to create the final artifact.", + "examples": [ + "{cloud-init: {plugin: python, source-type: git, source: https://git.launchpad.net/cloud-init}}" + ], "title": "Parts", "type": "object" }, @@ -10822,6 +11224,10 @@ } ], "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": [ + "[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]" + ], "title": "Package-Repositories" }, "environment": { @@ -10837,6 +11243,7 @@ } ], "default": null, + "description": "Additional environment variables for the base image's OCI environment.", "title": "Environment" }, "run-user": { @@ -10850,6 +11257,7 @@ } ], "default": null, + "description": "The default OCI user. If unset, runs as root.", "title": "Run-User" }, "services": { @@ -10865,13 +11273,24 @@ } ], "default": null, + "description": "Services to run in the rock, using Pebble's layer specification syntax.", "title": "Services" }, "checks": { "anyOf": [ { "additionalProperties": { - "$ref": "#/$defs/Check" + "oneOf": [ + { + "$ref": "#/$defs/HttpCheck" + }, + { + "$ref": "#/$defs/TcpCheck" + }, + { + "$ref": "#/$defs/ExecCheck" + } + ] }, "type": "object" }, @@ -10880,6 +11299,7 @@ } ], "default": null, + "description": "Health checks for this rock.", "title": "Checks" }, "entrypoint-service": { @@ -10892,7 +11312,27 @@ } ], "default": null, + "description": "The optional name of the Pebble service to serve as the entrypoint.", + "examples": [ + "my-service" + ], "title": "Entrypoint-Service" + }, + "entrypoint-command": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Overrides the rock's default Pebble OCI entrypoint and CMD properties.", + "examples": [ + "echo [ Hello ]" + ], + "title": "Entrypoint-Command" } }, "required": [ diff --git a/src/craft_ls/schemas/snapcraft.json b/src/craft_ls/schemas/snapcraft.json index 618ed8e..3119bff 100644 --- a/src/craft_ls/schemas/snapcraft.json +++ b/src/craft_ls/schemas/snapcraft.json @@ -1,1094 +1,4989 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "grammar-string": { - "oneOf": [ - { - "type": "string", - "usage": "" + "$id": "#snapcraft", + "$defs": { + "App": { + "additionalProperties": false, + "description": "Snapcraft project app definition.", + "properties": { + "command": { + "description": "The command to run inside the snap when the app is invoked.", + "examples": ["bin/foo-app"], + "title": "Command", + "type": "string" }, - { - "type": "array", - "items": { - "minitems": 1, - "uniqueItems": true, - "oneOf": [ - { - "type": "object", - "usage": "on [,...]:", - "additionalProperties": false, - "patternProperties": { - "^on\\s+.+$": { - "$ref": "#/definitions/grammar-string" - } - } - }, - { - "type": "object", - "usage": "to [,...]:", - "additionalProperties": false, - "patternProperties": { - "^to\\s+.+$": { - "$ref": "#/definitions/grammar-string" - } - } - }, - { - "type": "object", - "usage": "try:", - "additionalProperties": false, - "patternProperties": { - "^try$": { - "$ref": "#/definitions/grammar-string" - } - } - }, - { - "type": "object", - "usage": "else:", - "additionalProperties": false, - "patternProperties": { - "^else$": { - "$ref": "#/definitions/grammar-string" - } - } - }, - { - "type": "string", - "pattern": "else fail" - } - ] - } - } - ] - }, - "grammar-array": { - "type": "array", - "minitems": 1, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "string", - "usage": "" - }, - { - "type": "object", - "usage": "on [,...]:", - "additionalProperties": false, - "patternProperties": { - "^on\\s+.+$": { - "$ref": "#/definitions/grammar-array" - } + "autostart": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - }, - { - "type": "object", - "usage": "to [,...]:", - "additionalProperties": false, - "patternProperties": { - "^to\\s+.+$": { - "$ref": "#/definitions/grammar-array" - } + ], + "default": null, + "description": "The desktop file used to start an app when the desktop environment starts.", + "examples": ["foo-app.desktop"], + "title": "Autostart" + }, + "common-id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - }, - { - "type": "object", - "usage": "try:", - "additionalProperties": false, - "patternProperties": { - "^try$": { - "$ref": "#/definitions/grammar-array" - } + ], + "default": null, + "description": "The identifier to a desktop ID within an external appstream file.", + "examples": ["org.canonical.foo"], + "title": "Common-Id" + }, + "bus-name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - }, - { - "type": "object", - "usage": "else:", - "additionalProperties": false, - "patternProperties": { - "^else$": { - "$ref": "#/definitions/grammar-array" - } + ], + "default": null, + "description": "The bus name that the application or service exposes through D-Bus.", + "examples": ["org.bluez"], + "title": "Bus-Name" + }, + "desktop": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - } - ] - } - }, - "build-environment-grammar": { - "type": "array", - "minitems": 1, - "uniqueItems": true, - "items": { - "oneOf": [ - { - "type": "object", - "minProperties": 1, - "maxProperties": 1, - "additionalProperties": { + ], + "default": null, + "description": "The desktop file used to start an app.", + "examples": ["my-app.desktop"], + "title": "Desktop" + }, + "completer": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - }, - { - "type": "object", - "usage": "on [,...]:", - "additionalProperties": false, - "patternProperties": { - "^on\\s+.+$": { - "$ref": "#/definitions/build-environment-grammar" - } + ], + "default": null, + "description": "The name of the bash completion script for the app.", + "examples": ["bash-complete.sh"], + "title": "Completer" + }, + "stop-command": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - }, - { - "type": "object", - "usage": "to [,...]:", - "additionalProperties": false, - "patternProperties": { - "^to\\s+.+$": { - "$ref": "#/definitions/build-environment-grammar" - } + ], + "default": null, + "description": "The command to run to stop the service.", + "examples": ["bin/foo-app --halt"], + "title": "Stop-Command" + }, + "post-stop-command": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - }, - { - "type": "object", - "usage": "else:", - "additionalProperties": false, - "patternProperties": { - "^else$": { - "$ref": "#/definitions/build-environment-grammar" - } + ], + "default": null, + "description": "The command to run after the service is stopped.", + "examples": ["bin/logrotate --force"], + "title": "Post-Stop-Command" + }, + "start-timeout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" } - } - ] - } - }, - "apt-deb": { - "type": "object", - "description": "deb repositories", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": ["apt"] + ], + "default": null, + "description": "The maximum amount of time to wait for the service to start.", + "examples": ["10s", "2m"], + "title": "Start-Timeout" }, - "architectures": { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "string", - "description": "Architectures to enable, or restrict to, for this repository. Defaults to host architecture." - } + "stop-timeout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The maximum amount of time to wait for the service to stop.", + "examples": ["10s", "2m"], + "title": "Stop-Timeout" }, - "formats": { - "type": "array", - "description": "deb types to enable. Defaults to [deb, deb-src].", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "string", - "enum": ["deb", "deb-src"] - } + "watchdog-timeout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The maximum amount of time the service can run without sending a heartbeat to the watchdog.", + "examples": ["10s", "2m"], + "title": "Watchdog-Timeout" }, - "components": { + "reload-command": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The command to run to restart the service.", + "examples": ["bin/foo-app --restart"], + "title": "Reload-Command" + }, + "restart-delay": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The time to wait between service restarts.", + "examples": ["10s", "2m"], + "title": "Restart-Delay" + }, + "timer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The time or schedule to run a service.", + "examples": ["23:00", "00:00-24:00/24", "mon,10:00,,fri,15:00"], + "title": "Timer" + }, + "daemon": { + "anyOf": [ + { + "enum": ["simple", "forking", "oneshot", "notify", "dbus"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Configures the app as a service, and sets its runtime and notification behavior.", + "examples": ["simple", "oneshot"], + "title": "Daemon" + }, + "after": { + "description": "The ordered list of apps that the service runs after it launches.", + "examples": ["[foo-app, bar-app]"], + "items": { + "type": "string" + }, + "title": "After", "type": "array", - "minItems": 0, - "uniqueItems": true, + "uniqueItems": true + }, + "before": { + "description": "The ordered list of apps that the service runs before it launches.", + "examples": ["[baz-app, quz-app]"], "items": { - "type": "string", - "description": "Deb repository components to enable, e.g. 'main, multiverse, unstable'" - } + "type": "string" + }, + "title": "Before", + "type": "array", + "uniqueItems": true + }, + "refresh-mode": { + "anyOf": [ + { + "enum": ["endure", "restart", "ignore-running"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Determines how the service should restart when the snap refreshes.", + "examples": ["restart"], + "title": "Refresh-Mode" }, - "key-id": { - "type": "string", - "description": "GPG key identifier / fingerprint. May be used to identify key file in /snap/keys/.asc", - "pattern": "^[A-Z0-9]{40}$" + "stop-mode": { + "anyOf": [ + { + "enum": ["sigterm", "sigterm-all", "sighup", "sighup-all", "sigusr1", "sigusr1-all", "sigusr2", "sigusr2-all", "sigint", "sigint-all"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The signal to send when stopping the service.", + "examples": ["sigterm"], + "title": "Stop-Mode" }, - "key-server": { - "type": "string", - "description": "GPG keyserver to use to fetch GPG , e.g. 'keyserver.ubuntu.com'. Defaults to keyserver.ubuntu.com if key is not found in project." + "restart-condition": { + "anyOf": [ + { + "enum": ["on-success", "on-failure", "on-abnormal", "on-abort", "on-watchdog", "always", "never"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The conditions that cause the service to restart.", + "examples": ["on-failure"], + "title": "Restart-Condition" }, - "path": { - "type": "string", - "description": "Exact path to repository (relative to URL). Cannot be used with suites or components." + "install-mode": { + "anyOf": [ + { + "enum": ["enable", "disable"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether snapd can automatically start the service when the snap is installed.", + "examples": ["enable"], + "title": "Install-Mode" }, - "suites": { - "type": "array", - "minItems": 1, - "uniqueItems": true, + "slots": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The list of slots that the app provides.", + "examples": ["[dbus-daemon]"], + "title": "Slots" + }, + "plugs": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The interfaces that the app can connect to.", + "examples": ["[home, removable-media]"], + "title": "Plugs" + }, + "aliases": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The aliases that can be used to run the app.", + "examples": ["[my-app]"], + "title": "Aliases" + }, + "environment": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The runtime environment variables.", + "examples": ["{PYTHONPATH: $SNAP/usr/lib/python3/dist-packages, DISABLE_WAYLAND: 1}"], + "title": "Environment" + }, + "command-chain": { + "description": "The ordered list of commands to run before the app's command runs.", + "examples": ["[bin/alsa-launch, bin/desktop-launch]"], "items": { - "type": "string", - "description": "Deb repository suites to enable, e.g. 'xenial-updates, xenial-security')." - } + "type": "string" + }, + "title": "Command-Chain", + "type": "array" + }, + "sockets": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Socket" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The sockets used to activate an app.", + "examples": ["{my-socket: {listen-stream: $SNAP_COMMON/lxd/unix.socket, socket-mode: 0660}}"], + "title": "Sockets" + }, + "daemon-scope": { + "anyOf": [ + { + "enum": ["system", "user"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Determines whether the service is run on a system or user instance of systemd.", + "examples": ["user"], + "title": "Daemon-Scope" + }, + "activates-on": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The slots exposed by the snap to activate the service with D-Bus.", + "examples": ["gnome-shell-dbus"], + "title": "Activates-On" + }, + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file for the app.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" }, - "url": { - "type": "string", - "description": "Deb repository URL, e.g. 'http://archive.canonical.com/ubuntu'." + "extensions": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The extensions to add to the project.", + "examples": [["gnome"], ["ros2-humble"]], + "title": "Extensions" } }, - "required": ["type", "key-id", "url"], - "validation-failure": "{!r} is not properly configured deb repository" + "required": ["command"], + "title": "App", + "type": "object" }, - "apt-ppa": { - "type": "object", - "description": "PPA repository", + "Architecture": { "additionalProperties": false, + "description": "Snapcraft project architecture definition.", "properties": { - "type": { - "type": "string", - "enum": ["apt"] + "build-on": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + } + ], + "description": "The architectures on which the snap can be built.", + "examples": ["[amd64, riscv64]"], + "title": "Build-On" }, - "ppa": { - "type": "string", - "description": "ppa path: e.g. 'canonical-kernel-team/unstable'" + "build-for": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The single element list containing the architecture where the snap can be run", + "examples": ["[amd64]", "[riscv64]"], + "title": "Build-For" } }, - "required": ["type", "ppa"], - "validation-failure": "{!r} is not properly configured PPA repository" - }, - "system-username-scope": { - "type": "string", - "description": "short-form user configuration (: )", - "enum": ["shared"], - "validation-failure": "{!r} is not a valid user scope. Valid scopes include: 'shared'" - }, - "environment": { - "type": "object", - "description": "environment entries", - "minItems": 1, - "additionalProperties": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "number" - } - ] - } - } - }, - "title": "snapcraft schema", - "type": "object", - "properties": { - "build-packages": { - "$ref": "#/definitions/grammar-array", - "description": "top level build packages." + "required": ["build-on"], + "title": "Architecture", + "type": "object" }, - "adopt-info": { - "type": "string", - "description": "name of the part that provides source files that will be parsed to extract snap metadata information" + "BareCore22Project": { + "$id": "urn:snapcraft:bare22", + "additionalProperties": false, + "properties": { + "name": { + "description": "The identifying name of the snap.", + "examples": ["my-app", "powershell", "jupyterlab-desktop"], + "maxLength": 40, + "title": "Name", + "type": "string" + }, + "title": { + "anyOf": [ + { + "description": "A human-readable title.", + "examples": ["Ubuntu Linux", "Jupyter Lab Desktop", "LXD", "DigiKam", "Apache Kafka", "MySQL Router K8s charm"], + "maxLength": 40, + "minLength": 2, + "title": "Title", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "version": { + "anyOf": [ + { + "description": "The version of the project, enclosed in quotation marks.", + "examples": ["\"0.1\"", "\"1.0.0\"", "\"v1.0.0\"", "\"24.04\""], + "maxLength": 32, + "title": "version string", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The version of the snap.", + "examples": ["1.2.3"], + "title": "Version" + }, + "summary": { + "anyOf": [ + { + "description": "A short description of the project.", + "examples": ["Linux for Human Beings", "The cross-platform desktop application for JupyterLab", "Container and VM manager", "Photo Management Program", "Charm for routing MySQL databases in Kubernetes", "An open-source event streaming platform for high-performance data pipelines"], + "maxLength": 78, + "title": "Summary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Summary" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The full description of the project.", + "title": "Description" + }, + "base": { + "const": "bare", + "title": "Base", + "type": "string" + }, + "build-base": { + "const": "core22", + "title": "Build-Base", + "type": "string" + }, + "contact": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap author's contact links and email addresses.", + "examples": ["[contact@example.com, https://example.com/contact]"], + "title": "Contact" + }, + "issues": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links and email addresses for submitting issues, bugs, and feature requests.", + "examples": ["[issues@email.com, https://example.com/issues]"], + "title": "Issues" + }, + "source-code": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the source code of the snap or the original project.", + "examples": ["[https://example.com/source-code]"], + "title": "Source-Code" + }, + "license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The project's license as an SPDX expression", + "examples": ["GPL-3.0+", "Apache-2.0"], + "title": "License" + }, + "adopt-info": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Selects a part to inherit metadata from and reuse for the snap's metadata.\n\nRequired if one of ``version``, ``summary``, or ``description`` isn't set.", + "examples": ["foo-part"], + "title": "Adopt-Info" + }, + "parts": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "The self-contained software pieces needed to create the final artifact.", + "examples": ["{cloud-init: {plugin: python, source-type: git, source: https://git.launchpad.net/cloud-init}}"], + "title": "Parts", + "type": "object" + }, + "package-repositories": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": ["[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]"], + "title": "Package-Repositories" + }, + "compression": { + "default": "xz", + "description": "Specifies the algorithm that compresses the snap.", + "enum": ["lzo", "xz"], + "examples": ["xz", "lzo"], + "title": "Compression", + "type": "string" + }, + "donation": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's donation links.", + "examples": ["[donate@example.com, https://example.com/donate]"], + "title": "Donation" + }, + "website": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the original software's web pages.", + "examples": ["[https://example.com]"], + "title": "Website" + }, + "type": { + "default": null, + "description": "The snap's type.", + "enum": ["app", "gadget", "kernel", "snapd", null], + "title": "Type" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The path to the snap's icon.", + "examples": ["snap/gui/icon.svg"], + "title": "Icon" + }, + "confinement": { + "description": "The amount of isolation the snap has from the host system.", + "enum": ["classic", "devmode", "strict"], + "examples": ["strict", "classic", "devmode"], + "title": "Confinement", + "type": "string" + }, + "layout": { + "anyOf": [ + { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "maxProperties": 1, + "minProperties": 1, + "propertyNames": { + "enum": ["symlink", "bind", "bind-file", "type"] + }, + "type": "object" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The file layouts in the execution environment.", + "examples": ["{/var/lib/foo: {bind: $SNAP_DATA/var/lib/foo}}"], + "title": "Layout" + }, + "grade": { + "anyOf": [ + { + "enum": ["stable", "devel"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quality grade of the snap.", + "examples": ["stable", "devel"], + "title": "Grade" + }, + "architectures": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/Architecture" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The architecture sets where the snap can be built and where the resulting snap can run.", + "examples": ["[amd64, riscv64]", "[{build-on: [amd64], build-for: [amd64]}]", "[{build-on: [amd64, riscv64], build-for: [riscv64]}]"], + "title": "Architectures" + }, + "assumes": { + "description": "The minimum version of snapd and its features that the snap requires from the host.", + "examples": ["[snapd2.66, common-data-dir]"], + "items": { + "type": "string" + }, + "title": "Assumes", + "type": "array", + "uniqueItems": true + }, + "hooks": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Hook" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Configures the snap's hooks.", + "examples": ["{configure: {plugs: [home]}}"], + "title": "Hooks" + }, + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" + }, + "apps": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/App" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The map of app names representing entry points to run for the snap.", + "examples": ["{app-1: {command: bin/app-1}}"], + "title": "Apps" + }, + "plugs": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/ContentPlug" + }, + {} + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's plugs.", + "examples": ["{dot-gitconfig: {interface: personal-files, read: [$HOME/.gitconfig]}}"], + "title": "Plugs" + }, + "slots": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's slots.", + "examples": ["{slot-1: {interface: content, content: my-binaries, source: {read: [$SNAP/bin]}}}"], + "title": "Slots" + }, + "lint": { + "anyOf": [ + { + "$ref": "#/$defs/Lint" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The linter configuration settings.", + "examples": ["{ignore: [classic, library: [usr/lib/**/libfoo.so*]]}"] + }, + "epoch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The epoch associated with this version of the snap.", + "examples": ["1", "2*"], + "title": "Epoch" + }, + "system-usernames": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The system usernames that the snap can use to run daemons and services.", + "examples": ["{snap-daemon: shared}"], + "title": "System-Usernames" + }, + "environment": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's runtime environment variables.", + "examples": ["{PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHON_PATH, DISABLE_WAYLAND: 1}"], + "title": "Environment" + }, + "build-packages": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The list of packages to install when building a snap.", + "examples": ["[libssl-dev, libyaml-dev]"], + "title": "Build-Packages" + }, + "build-snaps": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The snaps to install when building a snap.", + "examples": ["[go/1.22/stable, yq]"], + "title": "Build-Snaps" + }, + "ua-services": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Ubuntu Pro (formerly Ubuntu Advantage) services to enable when building the snap.", + "examples": ["[esm-apps]"], + "title": "Ua-Services" + }, + "provenance": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The primary-key header for snaps signed by third parties.", + "examples": ["test-provenance"], + "title": "Provenance" + }, + "components": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Component" + }, + "propertyNames": { + "maxLength": 40 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the components to build in conjunction with the snap.", + "examples": ["{foo-component: {type: standard}}"], + "title": "Components" + } + }, + "required": ["name", "base", "build-base", "parts", "confinement"], + "title": "BareCore22Project", + "type": "object" + }, + "BareCore24Project": { + "$id": "urn:snapcraft:bare24", + "additionalProperties": false, + "properties": { + "name": { + "description": "The identifying name of the snap.", + "examples": ["my-app", "powershell", "jupyterlab-desktop"], + "maxLength": 40, + "title": "Name", + "type": "string" + }, + "title": { + "anyOf": [ + { + "description": "A human-readable title.", + "examples": ["Ubuntu Linux", "Jupyter Lab Desktop", "LXD", "DigiKam", "Apache Kafka", "MySQL Router K8s charm"], + "maxLength": 40, + "minLength": 2, + "title": "Title", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "version": { + "anyOf": [ + { + "description": "The version of the project, enclosed in quotation marks.", + "examples": ["\"0.1\"", "\"1.0.0\"", "\"v1.0.0\"", "\"24.04\""], + "maxLength": 32, + "title": "version string", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The version of the snap.", + "examples": ["1.2.3"], + "title": "Version" + }, + "summary": { + "anyOf": [ + { + "description": "A short description of the project.", + "examples": ["Linux for Human Beings", "The cross-platform desktop application for JupyterLab", "Container and VM manager", "Photo Management Program", "Charm for routing MySQL databases in Kubernetes", "An open-source event streaming platform for high-performance data pipelines"], + "maxLength": 78, + "title": "Summary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Summary" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The full description of the project.", + "title": "Description" + }, + "base": { + "const": "bare", + "title": "Base", + "type": "string" + }, + "build-base": { + "const": "core24", + "title": "Build-Base", + "type": "string" + }, + "platforms": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/Platform" + }, + { + "type": "null" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The platforms where the snap can be built and where the resulting snap can run.", + "examples": ["{amd64: {build-on: [amd64], build-for: [amd64]}, arm64: {build-on: [amd64, arm64], build-for: [arm64]}}"], + "title": "Platforms" + }, + "contact": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap author's contact links and email addresses.", + "examples": ["[contact@example.com, https://example.com/contact]"], + "title": "Contact" + }, + "issues": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links and email addresses for submitting issues, bugs, and feature requests.", + "examples": ["[issues@email.com, https://example.com/issues]"], + "title": "Issues" + }, + "source-code": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the source code of the snap or the original project.", + "examples": ["[https://example.com/source-code]"], + "title": "Source-Code" + }, + "license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The project's license as an SPDX expression", + "examples": ["GPL-3.0+", "Apache-2.0"], + "title": "License" + }, + "adopt-info": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Selects a part to inherit metadata from and reuse for the snap's metadata.\n\nRequired if one of ``version``, ``summary``, or ``description`` isn't set.", + "examples": ["foo-part"], + "title": "Adopt-Info" + }, + "parts": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "The self-contained software pieces needed to create the final artifact.", + "examples": ["{cloud-init: {plugin: python, source-type: git, source: https://git.launchpad.net/cloud-init}}"], + "title": "Parts", + "type": "object" + }, + "package-repositories": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": ["[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]"], + "title": "Package-Repositories" + }, + "compression": { + "default": "xz", + "description": "Specifies the algorithm that compresses the snap.", + "enum": ["lzo", "xz"], + "examples": ["xz", "lzo"], + "title": "Compression", + "type": "string" + }, + "donation": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's donation links.", + "examples": ["[donate@example.com, https://example.com/donate]"], + "title": "Donation" + }, + "website": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the original software's web pages.", + "examples": ["[https://example.com]"], + "title": "Website" + }, + "type": { + "default": null, + "description": "The snap's type.", + "enum": ["app", "gadget", "kernel", "snapd", null], + "examples": ["kernel"], + "title": "Type" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The path to the snap's icon.", + "examples": ["snap/gui/icon.svg"], + "title": "Icon" + }, + "confinement": { + "description": "The amount of isolation the snap has from the host system.", + "enum": ["classic", "devmode", "strict"], + "examples": ["strict", "classic", "devmode"], + "title": "Confinement", + "type": "string" + }, + "layout": { + "anyOf": [ + { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "maxProperties": 1, + "minProperties": 1, + "propertyNames": { + "enum": ["symlink", "bind", "bind-file", "type"] + }, + "type": "object" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The file layouts in the execution environment.", + "examples": ["{/var/lib/foo: {bind: $SNAP_DATA/var/lib/foo}}"], + "title": "Layout" + }, + "grade": { + "anyOf": [ + { + "enum": ["stable", "devel"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quality grade of the snap.", + "examples": ["stable", "devel"], + "title": "Grade" + }, + "assumes": { + "description": "The minimum version of snapd and its features that the snap requires from the host.", + "examples": ["[snapd2.66, common-data-dir]"], + "items": { + "type": "string" + }, + "title": "Assumes", + "type": "array", + "uniqueItems": true + }, + "hooks": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Hook" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Configures the snap's hooks.", + "examples": ["{configure: {plugs: [home]}}"], + "title": "Hooks" + }, + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" + }, + "apps": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/App" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The map of app names representing entry points to run for the snap.", + "examples": ["{app-1: {command: bin/app-1}}"], + "title": "Apps" + }, + "plugs": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/ContentPlug" + }, + {} + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's plugs.", + "examples": ["{dot-gitconfig: {interface: personal-files, read: [$HOME/.gitconfig]}}"], + "title": "Plugs" + }, + "slots": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's slots.", + "examples": ["{slot-1: {interface: content, content: my-binaries, source: {read: [$SNAP/bin]}}}"], + "title": "Slots" + }, + "lint": { + "anyOf": [ + { + "$ref": "#/$defs/Lint" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The linter configuration settings.", + "examples": ["{ignore: [classic, library: [usr/lib/**/libfoo.so*]]}"] + }, + "epoch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The epoch associated with this version of the snap.", + "examples": ["1", "2*"], + "title": "Epoch" + }, + "system-usernames": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The system usernames that the snap can use to run daemons and services.", + "examples": ["{snap-daemon: shared}"], + "title": "System-Usernames" + }, + "environment": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's runtime environment variables.", + "examples": ["{PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHON_PATH, DISABLE_WAYLAND: 1}"], + "title": "Environment" + }, + "build-packages": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The list of packages to install when building a snap.", + "examples": ["[libssl-dev, libyaml-dev]"], + "title": "Build-Packages" + }, + "build-snaps": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The snaps to install when building a snap.", + "examples": ["[go/1.22/stable, yq]"], + "title": "Build-Snaps" + }, + "ua-services": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Ubuntu Pro (formerly Ubuntu Advantage) services to enable when building the snap.", + "examples": ["[esm-apps]"], + "title": "Ua-Services" + }, + "provenance": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The primary-key header for snaps signed by third parties.", + "examples": ["test-provenance"], + "title": "Provenance" + }, + "components": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Component" + }, + "propertyNames": { + "maxLength": 40 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the components to build in conjunction with the snap.", + "examples": ["{foo-component: {type: standard}}"], + "title": "Components" + } + }, + "required": ["name", "base", "build-base", "parts", "confinement"], + "title": "BareCore24Project", + "type": "object" + }, + "BaseCore22Project": { + "$id": "urn:snapcraft:base22", + "additionalProperties": false, + "properties": { + "name": { + "description": "The identifying name of the snap.", + "examples": ["my-app", "powershell", "jupyterlab-desktop"], + "maxLength": 40, + "title": "Name", + "type": "string" + }, + "title": { + "anyOf": [ + { + "description": "A human-readable title.", + "examples": ["Ubuntu Linux", "Jupyter Lab Desktop", "LXD", "DigiKam", "Apache Kafka", "MySQL Router K8s charm"], + "maxLength": 40, + "minLength": 2, + "title": "Title", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "version": { + "anyOf": [ + { + "description": "The version of the project, enclosed in quotation marks.", + "examples": ["\"0.1\"", "\"1.0.0\"", "\"v1.0.0\"", "\"24.04\""], + "maxLength": 32, + "title": "version string", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The version of the snap.", + "examples": ["1.2.3"], + "title": "Version" + }, + "summary": { + "anyOf": [ + { + "description": "A short description of the project.", + "examples": ["Linux for Human Beings", "The cross-platform desktop application for JupyterLab", "Container and VM manager", "Photo Management Program", "Charm for routing MySQL databases in Kubernetes", "An open-source event streaming platform for high-performance data pipelines"], + "maxLength": 78, + "title": "Summary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Summary" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The full description of the project.", + "title": "Description" + }, + "build-base": { + "const": "core22", + "title": "Build-Base", + "type": "string" + }, + "contact": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap author's contact links and email addresses.", + "examples": ["[contact@example.com, https://example.com/contact]"], + "title": "Contact" + }, + "issues": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links and email addresses for submitting issues, bugs, and feature requests.", + "examples": ["[issues@email.com, https://example.com/issues]"], + "title": "Issues" + }, + "source-code": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the source code of the snap or the original project.", + "examples": ["[https://example.com/source-code]"], + "title": "Source-Code" + }, + "license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The project's license as an SPDX expression", + "examples": ["GPL-3.0+", "Apache-2.0"], + "title": "License" + }, + "adopt-info": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Selects a part to inherit metadata from and reuse for the snap's metadata.\n\nRequired if one of ``version``, ``summary``, or ``description`` isn't set.", + "examples": ["foo-part"], + "title": "Adopt-Info" + }, + "parts": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "The self-contained software pieces needed to create the final artifact.", + "examples": ["{cloud-init: {plugin: python, source-type: git, source: https://git.launchpad.net/cloud-init}}"], + "title": "Parts", + "type": "object" + }, + "package-repositories": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": ["[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]"], + "title": "Package-Repositories" + }, + "compression": { + "default": "xz", + "description": "Specifies the algorithm that compresses the snap.", + "enum": ["lzo", "xz"], + "examples": ["xz", "lzo"], + "title": "Compression", + "type": "string" + }, + "donation": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's donation links.", + "examples": ["[donate@example.com, https://example.com/donate]"], + "title": "Donation" + }, + "website": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the original software's web pages.", + "examples": ["[https://example.com]"], + "title": "Website" + }, + "type": { + "const": "base", + "title": "Type", + "type": "string" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The path to the snap's icon.", + "examples": ["snap/gui/icon.svg"], + "title": "Icon" + }, + "confinement": { + "description": "The amount of isolation the snap has from the host system.", + "enum": ["classic", "devmode", "strict"], + "examples": ["strict", "classic", "devmode"], + "title": "Confinement", + "type": "string" + }, + "layout": { + "anyOf": [ + { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "maxProperties": 1, + "minProperties": 1, + "propertyNames": { + "enum": ["symlink", "bind", "bind-file", "type"] + }, + "type": "object" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The file layouts in the execution environment.", + "examples": ["{/var/lib/foo: {bind: $SNAP_DATA/var/lib/foo}}"], + "title": "Layout" + }, + "grade": { + "anyOf": [ + { + "enum": ["stable", "devel"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quality grade of the snap.", + "examples": ["stable", "devel"], + "title": "Grade" + }, + "architectures": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/Architecture" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The architecture sets where the snap can be built and where the resulting snap can run.", + "examples": ["[amd64, riscv64]", "[{build-on: [amd64], build-for: [amd64]}]", "[{build-on: [amd64, riscv64], build-for: [riscv64]}]"], + "title": "Architectures" + }, + "assumes": { + "description": "The minimum version of snapd and its features that the snap requires from the host.", + "examples": ["[snapd2.66, common-data-dir]"], + "items": { + "type": "string" + }, + "title": "Assumes", + "type": "array", + "uniqueItems": true + }, + "hooks": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Hook" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Configures the snap's hooks.", + "examples": ["{configure: {plugs: [home]}}"], + "title": "Hooks" + }, + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" + }, + "apps": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/App" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The map of app names representing entry points to run for the snap.", + "examples": ["{app-1: {command: bin/app-1}}"], + "title": "Apps" + }, + "plugs": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/ContentPlug" + }, + {} + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's plugs.", + "examples": ["{dot-gitconfig: {interface: personal-files, read: [$HOME/.gitconfig]}}"], + "title": "Plugs" + }, + "slots": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's slots.", + "examples": ["{slot-1: {interface: content, content: my-binaries, source: {read: [$SNAP/bin]}}}"], + "title": "Slots" + }, + "lint": { + "anyOf": [ + { + "$ref": "#/$defs/Lint" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The linter configuration settings.", + "examples": ["{ignore: [classic, library: [usr/lib/**/libfoo.so*]]}"] + }, + "epoch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The epoch associated with this version of the snap.", + "examples": ["1", "2*"], + "title": "Epoch" + }, + "system-usernames": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The system usernames that the snap can use to run daemons and services.", + "examples": ["{snap-daemon: shared}"], + "title": "System-Usernames" + }, + "environment": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's runtime environment variables.", + "examples": ["{PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHON_PATH, DISABLE_WAYLAND: 1}"], + "title": "Environment" + }, + "build-packages": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The list of packages to install when building a snap.", + "examples": ["[libssl-dev, libyaml-dev]"], + "title": "Build-Packages" + }, + "build-snaps": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The snaps to install when building a snap.", + "examples": ["[go/1.22/stable, yq]"], + "title": "Build-Snaps" + }, + "ua-services": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Ubuntu Pro (formerly Ubuntu Advantage) services to enable when building the snap.", + "examples": ["[esm-apps]"], + "title": "Ua-Services" + }, + "provenance": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The primary-key header for snaps signed by third parties.", + "examples": ["test-provenance"], + "title": "Provenance" + }, + "components": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Component" + }, + "propertyNames": { + "maxLength": 40 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the components to build in conjunction with the snap.", + "examples": ["{foo-component: {type: standard}}"], + "title": "Components" + } + }, + "required": ["name", "build-base", "parts", "type", "confinement"], + "title": "BaseCore22Project", + "type": "object" + }, + "BaseCore24Project": { + "$id": "urn:snapcraft:base24", + "additionalProperties": false, + "properties": { + "name": { + "description": "The identifying name of the snap.", + "examples": ["my-app", "powershell", "jupyterlab-desktop"], + "maxLength": 40, + "title": "Name", + "type": "string" + }, + "title": { + "anyOf": [ + { + "description": "A human-readable title.", + "examples": ["Ubuntu Linux", "Jupyter Lab Desktop", "LXD", "DigiKam", "Apache Kafka", "MySQL Router K8s charm"], + "maxLength": 40, + "minLength": 2, + "title": "Title", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "version": { + "anyOf": [ + { + "description": "The version of the project, enclosed in quotation marks.", + "examples": ["\"0.1\"", "\"1.0.0\"", "\"v1.0.0\"", "\"24.04\""], + "maxLength": 32, + "title": "version string", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The version of the snap.", + "examples": ["1.2.3"], + "title": "Version" + }, + "summary": { + "anyOf": [ + { + "description": "A short description of the project.", + "examples": ["Linux for Human Beings", "The cross-platform desktop application for JupyterLab", "Container and VM manager", "Photo Management Program", "Charm for routing MySQL databases in Kubernetes", "An open-source event streaming platform for high-performance data pipelines"], + "maxLength": 78, + "title": "Summary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Summary" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The full description of the project.", + "title": "Description" + }, + "build-base": { + "const": "core24", + "title": "Build-Base", + "type": "string" + }, + "platforms": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/Platform" + }, + { + "type": "null" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The platforms where the snap can be built and where the resulting snap can run.", + "examples": ["{amd64: {build-on: [amd64], build-for: [amd64]}, arm64: {build-on: [amd64, arm64], build-for: [arm64]}}"], + "title": "Platforms" + }, + "contact": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap author's contact links and email addresses.", + "examples": ["[contact@example.com, https://example.com/contact]"], + "title": "Contact" + }, + "issues": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links and email addresses for submitting issues, bugs, and feature requests.", + "examples": ["[issues@email.com, https://example.com/issues]"], + "title": "Issues" + }, + "source-code": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the source code of the snap or the original project.", + "examples": ["[https://example.com/source-code]"], + "title": "Source-Code" + }, + "license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The project's license as an SPDX expression", + "examples": ["GPL-3.0+", "Apache-2.0"], + "title": "License" + }, + "adopt-info": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Selects a part to inherit metadata from and reuse for the snap's metadata.\n\nRequired if one of ``version``, ``summary``, or ``description`` isn't set.", + "examples": ["foo-part"], + "title": "Adopt-Info" + }, + "parts": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "The self-contained software pieces needed to create the final artifact.", + "examples": ["{cloud-init: {plugin: python, source-type: git, source: https://git.launchpad.net/cloud-init}}"], + "title": "Parts", + "type": "object" + }, + "package-repositories": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": ["[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]"], + "title": "Package-Repositories" + }, + "compression": { + "default": "xz", + "description": "Specifies the algorithm that compresses the snap.", + "enum": ["lzo", "xz"], + "examples": ["xz", "lzo"], + "title": "Compression", + "type": "string" + }, + "donation": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's donation links.", + "examples": ["[donate@example.com, https://example.com/donate]"], + "title": "Donation" + }, + "website": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the original software's web pages.", + "examples": ["[https://example.com]"], + "title": "Website" + }, + "type": { + "const": "base", + "title": "Type", + "type": "string" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The path to the snap's icon.", + "examples": ["snap/gui/icon.svg"], + "title": "Icon" + }, + "confinement": { + "description": "The amount of isolation the snap has from the host system.", + "enum": ["classic", "devmode", "strict"], + "examples": ["strict", "classic", "devmode"], + "title": "Confinement", + "type": "string" + }, + "layout": { + "anyOf": [ + { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "maxProperties": 1, + "minProperties": 1, + "propertyNames": { + "enum": ["symlink", "bind", "bind-file", "type"] + }, + "type": "object" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The file layouts in the execution environment.", + "examples": ["{/var/lib/foo: {bind: $SNAP_DATA/var/lib/foo}}"], + "title": "Layout" + }, + "grade": { + "anyOf": [ + { + "enum": ["stable", "devel"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quality grade of the snap.", + "examples": ["stable", "devel"], + "title": "Grade" + }, + "assumes": { + "description": "The minimum version of snapd and its features that the snap requires from the host.", + "examples": ["[snapd2.66, common-data-dir]"], + "items": { + "type": "string" + }, + "title": "Assumes", + "type": "array", + "uniqueItems": true + }, + "hooks": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Hook" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Configures the snap's hooks.", + "examples": ["{configure: {plugs: [home]}}"], + "title": "Hooks" + }, + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" + }, + "apps": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/App" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The map of app names representing entry points to run for the snap.", + "examples": ["{app-1: {command: bin/app-1}}"], + "title": "Apps" + }, + "plugs": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/ContentPlug" + }, + {} + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's plugs.", + "examples": ["{dot-gitconfig: {interface: personal-files, read: [$HOME/.gitconfig]}}"], + "title": "Plugs" + }, + "slots": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's slots.", + "examples": ["{slot-1: {interface: content, content: my-binaries, source: {read: [$SNAP/bin]}}}"], + "title": "Slots" + }, + "lint": { + "anyOf": [ + { + "$ref": "#/$defs/Lint" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The linter configuration settings.", + "examples": ["{ignore: [classic, library: [usr/lib/**/libfoo.so*]]}"] + }, + "epoch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The epoch associated with this version of the snap.", + "examples": ["1", "2*"], + "title": "Epoch" + }, + "system-usernames": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The system usernames that the snap can use to run daemons and services.", + "examples": ["{snap-daemon: shared}"], + "title": "System-Usernames" + }, + "environment": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's runtime environment variables.", + "examples": ["{PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHON_PATH, DISABLE_WAYLAND: 1}"], + "title": "Environment" + }, + "build-packages": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The list of packages to install when building a snap.", + "examples": ["[libssl-dev, libyaml-dev]"], + "title": "Build-Packages" + }, + "build-snaps": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The snaps to install when building a snap.", + "examples": ["[go/1.22/stable, yq]"], + "title": "Build-Snaps" + }, + "ua-services": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Ubuntu Pro (formerly Ubuntu Advantage) services to enable when building the snap.", + "examples": ["[esm-apps]"], + "title": "Ua-Services" + }, + "provenance": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The primary-key header for snaps signed by third parties.", + "examples": ["test-provenance"], + "title": "Provenance" + }, + "components": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Component" + }, + "propertyNames": { + "maxLength": 40 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the components to build in conjunction with the snap.", + "examples": ["{foo-component: {type: standard}}"], + "title": "Components" + } + }, + "required": ["name", "build-base", "parts", "type", "confinement"], + "title": "BaseCore24Project", + "type": "object" + }, + "BaseDevelProject": { + "$id": "urn:snapcraft:devel", + "additionalProperties": false, + "properties": { + "name": { + "description": "The identifying name of the snap.", + "examples": ["my-app", "powershell", "jupyterlab-desktop"], + "maxLength": 40, + "title": "Name", + "type": "string" + }, + "title": { + "anyOf": [ + { + "description": "A human-readable title.", + "examples": ["Ubuntu Linux", "Jupyter Lab Desktop", "LXD", "DigiKam", "Apache Kafka", "MySQL Router K8s charm"], + "maxLength": 40, + "minLength": 2, + "title": "Title", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "version": { + "anyOf": [ + { + "description": "The version of the project, enclosed in quotation marks.", + "examples": ["\"0.1\"", "\"1.0.0\"", "\"v1.0.0\"", "\"24.04\""], + "maxLength": 32, + "title": "version string", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The version of the snap.", + "examples": ["1.2.3"], + "title": "Version" + }, + "summary": { + "anyOf": [ + { + "description": "A short description of the project.", + "examples": ["Linux for Human Beings", "The cross-platform desktop application for JupyterLab", "Container and VM manager", "Photo Management Program", "Charm for routing MySQL databases in Kubernetes", "An open-source event streaming platform for high-performance data pipelines"], + "maxLength": 78, + "title": "Summary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Summary" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The full description of the project.", + "title": "Description" + }, + "build-base": { + "const": "devel", + "title": "Build-Base", + "type": "string" + }, + "platforms": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Platform" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The platforms where the snap can be built and where the resulting snap can run.", + "examples": ["{amd64: {build-on: [amd64], build-for: [amd64]}, arm64: {build-on: [amd64, arm64], build-for: [arm64]}}"], + "title": "Platforms" + }, + "contact": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap author's contact links and email addresses.", + "examples": ["[contact@example.com, https://example.com/contact]"], + "title": "Contact" + }, + "issues": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links and email addresses for submitting issues, bugs, and feature requests.", + "examples": ["[issues@email.com, https://example.com/issues]"], + "title": "Issues" + }, + "source-code": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the source code of the snap or the original project.", + "examples": ["[https://example.com/source-code]"], + "title": "Source-Code" + }, + "license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The project's license as an SPDX expression", + "examples": ["GPL-3.0+", "Apache-2.0"], + "title": "License" + }, + "adopt-info": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Selects a part to inherit metadata from and reuse for the snap's metadata.\n\nRequired if one of ``version``, ``summary``, or ``description`` isn't set.", + "examples": ["foo-part"], + "title": "Adopt-Info" + }, + "parts": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "The self-contained software pieces needed to create the final artifact.", + "examples": ["{cloud-init: {plugin: python, source-type: git, source: https://git.launchpad.net/cloud-init}}"], + "title": "Parts", + "type": "object" + }, + "package-repositories": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": ["[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]"], + "title": "Package-Repositories" + }, + "compression": { + "default": "xz", + "description": "Specifies the algorithm that compresses the snap.", + "enum": ["lzo", "xz"], + "examples": ["xz", "lzo"], + "title": "Compression", + "type": "string" + }, + "donation": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's donation links.", + "examples": ["[donate@example.com, https://example.com/donate]"], + "title": "Donation" + }, + "website": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the original software's web pages.", + "examples": ["[https://example.com]"], + "title": "Website" + }, + "type": { + "const": "base", + "title": "Type", + "type": "string" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The path to the snap's icon.", + "examples": ["snap/gui/icon.svg"], + "title": "Icon" + }, + "confinement": { + "description": "The amount of isolation the snap has from the host system.", + "enum": ["classic", "devmode", "strict"], + "examples": ["strict", "classic", "devmode"], + "title": "Confinement", + "type": "string" + }, + "layout": { + "anyOf": [ + { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "maxProperties": 1, + "minProperties": 1, + "propertyNames": { + "enum": ["symlink", "bind", "bind-file", "type"] + }, + "type": "object" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The file layouts in the execution environment.", + "examples": ["{/var/lib/foo: {bind: $SNAP_DATA/var/lib/foo}}"], + "title": "Layout" + }, + "grade": { + "const": "devel", + "title": "Grade", + "type": "string" + }, + "architectures": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/Architecture" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The architecture sets where the snap can be built and where the resulting snap can run.", + "examples": ["[amd64, riscv64]", "[{build-on: [amd64], build-for: [amd64]}]", "[{build-on: [amd64, riscv64], build-for: [riscv64]}]"], + "title": "Architectures" + }, + "assumes": { + "description": "The minimum version of snapd and its features that the snap requires from the host.", + "examples": ["[snapd2.66, common-data-dir]"], + "items": { + "type": "string" + }, + "title": "Assumes", + "type": "array", + "uniqueItems": true + }, + "hooks": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Hook" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Configures the snap's hooks.", + "examples": ["{configure: {plugs: [home]}}"], + "title": "Hooks" + }, + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" + }, + "apps": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/App" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The map of app names representing entry points to run for the snap.", + "examples": ["{app-1: {command: bin/app-1}}"], + "title": "Apps" + }, + "plugs": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/ContentPlug" + }, + {} + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's plugs.", + "examples": ["{dot-gitconfig: {interface: personal-files, read: [$HOME/.gitconfig]}}"], + "title": "Plugs" + }, + "slots": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's slots.", + "examples": ["{slot-1: {interface: content, content: my-binaries, source: {read: [$SNAP/bin]}}}"], + "title": "Slots" + }, + "lint": { + "anyOf": [ + { + "$ref": "#/$defs/Lint" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The linter configuration settings.", + "examples": ["{ignore: [classic, library: [usr/lib/**/libfoo.so*]]}"] + }, + "epoch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The epoch associated with this version of the snap.", + "examples": ["1", "2*"], + "title": "Epoch" + }, + "system-usernames": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The system usernames that the snap can use to run daemons and services.", + "examples": ["{snap-daemon: shared}"], + "title": "System-Usernames" + }, + "environment": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's runtime environment variables.", + "examples": ["{PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHON_PATH, DISABLE_WAYLAND: 1}"], + "title": "Environment" + }, + "build-packages": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The list of packages to install when building a snap.", + "examples": ["[libssl-dev, libyaml-dev]"], + "title": "Build-Packages" + }, + "build-snaps": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The snaps to install when building a snap.", + "examples": ["[go/1.22/stable, yq]"], + "title": "Build-Snaps" + }, + "ua-services": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Ubuntu Pro (formerly Ubuntu Advantage) services to enable when building the snap.", + "examples": ["[esm-apps]"], + "title": "Ua-Services" + }, + "provenance": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The primary-key header for snaps signed by third parties.", + "examples": ["test-provenance"], + "title": "Provenance" + }, + "components": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Component" + }, + "propertyNames": { + "maxLength": 40 + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the components to build in conjunction with the snap.", + "examples": ["{foo-component: {type: standard}}"], + "title": "Components" + } + }, + "required": ["name", "build-base", "parts", "type", "confinement", "grade"], + "title": "BaseDevelProject", + "type": "object" }, - "name": { - "description": "name of the snap package", - "allOf": [ - { - "$comment": "string, but not too long. the failure message avoids printing repr of the thing, as it could be huge", - "type": "string", - "validation-failure": "snap names need to be strings.", - "maxLength": 40 + "Component": { + "additionalProperties": false, + "description": "Snapcraft component definition.", + "properties": { + "summary": { + "description": "The summary of the component.", + "examples": ["Language translations for the app"], + "maxLength": 78, + "title": "Summary", + "type": "string" }, - { - "pattern": "^[a-z0-9-]*[a-z][a-z0-9-]*$", - "validation-failure": "{.instance!r} is not a valid snap name. Snap names can only use ASCII lowercase letters, numbers, and hyphens, and must have at least one letter." + "description": { + "description": "The full description of the component.", + "examples": ["Contains optional translation packs to allow the user to change the language."], + "title": "Description", + "type": "string" + }, + "type": { + "description": "The type of the component.", + "enum": ["test", "kernel-modules", "standard"], + "examples": ["standard"], + "title": "Type", + "type": "string" + }, + "version": { + "anyOf": [ + { + "description": "The version of the project, enclosed in quotation marks.", + "examples": ["\"0.1\"", "\"1.0.0\"", "\"v1.0.0\"", "\"24.04\""], + "maxLength": 32, + "title": "version string", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The version of the component.", + "examples": ["1.2.3"], + "title": "Version" + }, + "hooks": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Hook" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The configuration for the component's hooks.", + "examples": ["{configure: {plugs: [home]}}"], + "title": "Hooks" + }, + "adopt-info": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Selects a part to inherit metadata from and reuse for the component's metadata.\n\nOnly the component's version can be set.\n", + "examples": ["foo-part"], + "title": "Adopt-Info" + } + }, + "required": ["summary", "description", "type"], + "title": "Component", + "type": "object" + }, + "ContentPlug": { + "additionalProperties": false, + "description": "Snapcraft project content plug definition.", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name for the content type.", + "examples": ["themes"], + "title": "Content" + }, + "interface": { + "description": "The name of the interface.", + "examples": ["network"], + "title": "Interface", + "type": "string" + }, + "target": { + "description": "The path to where the producer's files will be available in the snap.", + "examples": ["$SNAP/data-dir/themes"], + "title": "Target", + "type": "string" + }, + "default-provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of the producer snap..", + "examples": ["gtk-common-themes"], + "title": "Default-Provider" + } + }, + "required": ["interface", "target"], + "title": "ContentPlug", + "type": "object" + }, + "Core22Project": { + "$id": "urn:snapcraft:core22", + "additionalProperties": false, + "properties": { + "name": { + "description": "The identifying name of the snap.", + "examples": ["my-app", "powershell", "jupyterlab-desktop"], + "maxLength": 40, + "title": "Name", + "type": "string" + }, + "title": { + "anyOf": [ + { + "description": "A human-readable title.", + "examples": ["Ubuntu Linux", "Jupyter Lab Desktop", "LXD", "DigiKam", "Apache Kafka", "MySQL Router K8s charm"], + "maxLength": 40, + "minLength": 2, + "title": "Title", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "version": { + "anyOf": [ + { + "description": "The version of the project, enclosed in quotation marks.", + "examples": ["\"0.1\"", "\"1.0.0\"", "\"v1.0.0\"", "\"24.04\""], + "maxLength": 32, + "title": "version string", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The version of the snap.", + "examples": ["1.2.3"], + "title": "Version" + }, + "summary": { + "anyOf": [ + { + "description": "A short description of the project.", + "examples": ["Linux for Human Beings", "The cross-platform desktop application for JupyterLab", "Container and VM manager", "Photo Management Program", "Charm for routing MySQL databases in Kubernetes", "An open-source event streaming platform for high-performance data pipelines"], + "maxLength": 78, + "title": "Summary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Summary" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The full description of the project.", + "title": "Description" + }, + "base": { + "const": "core22", + "title": "Base", + "type": "string" + }, + "build-base": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The build environment to use when building the snap", + "examples": ["core20", "core22", "core24", "devel"], + "title": "Build-Base" + }, + "contact": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap author's contact links and email addresses.", + "examples": ["[contact@example.com, https://example.com/contact]"], + "title": "Contact" + }, + "issues": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links and email addresses for submitting issues, bugs, and feature requests.", + "examples": ["[issues@email.com, https://example.com/issues]"], + "title": "Issues" + }, + "source-code": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the source code of the snap or the original project.", + "examples": ["[https://example.com/source-code]"], + "title": "Source-Code" + }, + "license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The project's license as an SPDX expression", + "examples": ["GPL-3.0+", "Apache-2.0"], + "title": "License" + }, + "adopt-info": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Selects a part to inherit metadata from and reuse for the snap's metadata.\n\nRequired if one of ``version``, ``summary``, or ``description`` isn't set.", + "examples": ["foo-part"], + "title": "Adopt-Info" + }, + "parts": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "The self-contained software pieces needed to create the final artifact.", + "examples": ["{cloud-init: {plugin: python, source-type: git, source: https://git.launchpad.net/cloud-init}}"], + "title": "Parts", + "type": "object" + }, + "package-repositories": { + "anyOf": [ + { + "items": { + "additionalProperties": true, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": ["[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]"], + "title": "Package-Repositories" + }, + "compression": { + "default": "xz", + "description": "Specifies the algorithm that compresses the snap.", + "enum": ["lzo", "xz"], + "examples": ["xz", "lzo"], + "title": "Compression", + "type": "string" + }, + "donation": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's donation links.", + "examples": ["[donate@example.com, https://example.com/donate]"], + "title": "Donation" + }, + "website": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links to the original software's web pages.", + "examples": ["[https://example.com]"], + "title": "Website" + }, + "type": { + "default": null, + "description": "The snap's type.", + "enum": ["app", "gadget", "kernel", "snapd", null], + "title": "Type" + }, + "icon": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The path to the snap's icon.", + "examples": ["snap/gui/icon.svg"], + "title": "Icon" + }, + "confinement": { + "description": "The amount of isolation the snap has from the host system.", + "enum": ["classic", "devmode", "strict"], + "examples": ["strict", "classic", "devmode"], + "title": "Confinement", + "type": "string" + }, + "layout": { + "anyOf": [ + { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "maxProperties": 1, + "minProperties": 1, + "propertyNames": { + "enum": ["symlink", "bind", "bind-file", "type"] + }, + "type": "object" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The file layouts in the execution environment.", + "examples": ["{/var/lib/foo: {bind: $SNAP_DATA/var/lib/foo}}"], + "title": "Layout" + }, + "grade": { + "anyOf": [ + { + "enum": ["stable", "devel"], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quality grade of the snap.", + "examples": ["stable", "devel"], + "title": "Grade" + }, + "architectures": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/Architecture" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The architecture sets where the snap can be built and where the resulting snap can run.", + "examples": ["[amd64, riscv64]", "[{build-on: [amd64], build-for: [amd64]}]", "[{build-on: [amd64, riscv64], build-for: [riscv64]}]"], + "title": "Architectures" + }, + "assumes": { + "description": "The minimum version of snapd and its features that the snap requires from the host.", + "examples": ["[snapd2.66, common-data-dir]"], + "items": { + "type": "string" + }, + "title": "Assumes", + "type": "array", + "uniqueItems": true + }, + "hooks": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Hook" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Configures the snap's hooks.", + "examples": ["{configure: {plugs: [home]}}"], + "title": "Hooks" }, - { - "pattern": "^[^-]", - "validation-failure": "{.instance!r} is not a valid snap name. Snap names cannot start with a hyphen." + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" }, - { - "pattern": "[^-]$", - "validation-failure": "{.instance!r} is not a valid snap name. Snap names cannot end with a hyphen." + "apps": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/App" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The map of app names representing entry points to run for the snap.", + "examples": ["{app-1: {command: bin/app-1}}"], + "title": "Apps" }, - { - "not": { - "pattern": "--" - }, - "validation-failure": "{.instance!r} is not a valid snap name. Snap names cannot have two hyphens in a row." - } - ] - }, - "title": { - "$comment": "https://forum.snapcraft.io/t/title-length-in-snapcraft-yaml-snap-yaml/8625/10", - "description": "title for the snap", - "type": "string", - "maxLength": 40 - }, - "architectures": { - "description": "architectures on which to build, and on which the resulting snap runs", - "type": "array", - "minItems": 1, - "uniqueItems": true, - "format": "architectures", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": false, - "required": ["build-on"], - "properties": { - "build-on": { + "plugs": { + "anyOf": [ + { + "additionalProperties": { "anyOf": [ { - "type": "string" + "$ref": "#/$defs/ContentPlug" }, - { - "type": "array", - "minItems": 1, - "uniqueItems": true - } + {} ] }, - "run-on": { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's plugs.", + "examples": ["{dot-gitconfig: {interface: personal-files, read: [$HOME/.gitconfig]}}"], + "title": "Plugs" + }, + "slots": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's slots.", + "examples": ["{slot-1: {interface: content, content: my-binaries, source: {read: [$SNAP/bin]}}}"], + "title": "Slots" + }, + "lint": { + "anyOf": [ + { + "$ref": "#/$defs/Lint" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The linter configuration settings.", + "examples": ["{ignore: [classic, library: [usr/lib/**/libfoo.so*]]}"] + }, + "epoch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The epoch associated with this version of the snap.", + "examples": ["1", "2*"], + "title": "Epoch" + }, + "system-usernames": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The system usernames that the snap can use to run daemons and services.", + "examples": ["{snap-daemon: shared}"], + "title": "System-Usernames" + }, + "environment": { + "anyOf": [ + { + "additionalProperties": { "anyOf": [ { "type": "string" }, { - "type": "array", - "minItems": 1, - "uniqueItems": true + "type": "null" } ] - } + }, + "type": "object" + }, + { + "type": "null" } - } - ] - } - }, - "version": { - "description": "package version", - "allOf": [ - { - "type": "string", - "validation-failure": "snap versions need to be strings. They must also be wrapped in quotes when the value will be interpreted by the YAML parser as a non-string. Examples: '1', '1.2', '1.2.3', git (will be replaced by a git describe based version string)." + ], + "default": null, + "description": "The snap's runtime environment variables.", + "examples": ["{PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHON_PATH, DISABLE_WAYLAND: 1}"], + "title": "Environment" }, - { - "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9:.+~-]*[a-zA-Z0-9+~])?$", - "maxLength": 32, - "validation-failure": "{.instance!r} is not a valid snap version string. Snap versions consist of upper- and lower-case alphanumeric characters, as well as periods, colons, plus signs, tildes, and hyphens. They cannot begin with a period, colon, plus sign, tilde, or hyphen. They cannot end with a period, colon, or hyphen." - } - ] - }, - "version-script": { - "type": "string", - "description": "a script that echoes the version to set." - }, - "license": { - "type": "string", - "description": "the license the package holds" - }, - "icon": { - "type": "string", - "description": "path to a 512x512 icon representing the package.", - "format": "icon-path" - }, - "summary": { - "type": "string", - "description": "one line summary for the package", - "maxLength": 78 - }, - "description": { - "type": "string", - "description": "long description of the package", - "pattern": ".+", - "validation-failure": "{.instance!r} is not a valid description string." - }, - "assumes": { - "type": "array", - "description": "featureset the snap requires in order to work.", - "minItems": 1, - "uniqueItems": true, - "items": [ - { - "type": "string" - } - ] - }, - "type": { - "type": "string", - "description": "the snap type, the implicit type is 'app'", - "enum": ["app", "base", "gadget", "kernel", "snapd"] - }, - "frameworks": { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": [ - { - "type": "string" - } - ] - }, - "confinement": { - "type": "string", - "description": "the type of confinement supported by the snap", - "default": "strict", - "enum": ["classic", "devmode", "strict"] - }, - "grade": { - "type": "string", - "description": "the quality grade of the snap", - "default": "stable", - "enum": ["stable", "devel"] - }, - "base": { - "type": "string", - "description": "the base snap to use" - }, - "build-base": { - "type": "string", - "description": "force a build environment based on base to create a snap" - }, - "epoch": { - "description": "the snap epoch, used to specify upgrade paths", - "format": "epoch" - }, - "compression": { - "description": "compression to use for snap archive - default is otherwise determined by 'snap pack'", - "type": "string", - "enum": ["lzo", "xz"] - }, - "environment": { - "description": "environment entries for the snap as a whole", - "$ref": "#/definitions/environment" - }, - "passthrough": { - "type": "object", - "description": "properties to be passed into snap.yaml as-is" - }, - "layout": { - "type": "object", - "description": "layout property to be passed into the snap.yaml as-is" - }, - "package-repositories": { - "type": "array", - "description": "additional repository configuration.", - "minItems": 0, - "uniqueItems": true, - "items": [ - { - "oneOf": [ + "build-packages": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The list of packages to install when building a snap.", + "examples": ["[libssl-dev, libyaml-dev]"], + "title": "Build-Packages" + }, + "build-snaps": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The snaps to install when building a snap.", + "examples": ["[go/1.22/stable, yq]"], + "title": "Build-Snaps" + }, + "ua-services": { + "anyOf": [ { - "$ref": "#/definitions/apt-deb" + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true }, { - "$ref": "#/definitions/apt-ppa" + "type": "null" } - ] - } - ] - }, - "system-usernames": { - "type": "object", - "description": "system username", - "additionalProperties": false, - "validation-failure": "{!r} is not a valid system-username.", - "patternProperties": { - "^snap_(daemon|microk8s|aziotedge|aziotdu)$": { - "oneOf": [ + ], + "default": null, + "description": "The Ubuntu Pro (formerly Ubuntu Advantage) services to enable when building the snap.", + "examples": ["[esm-apps]"], + "title": "Ua-Services" + }, + "provenance": { + "anyOf": [ { - "$ref": "#/definitions/system-username-scope" + "type": "string" }, { - "type": "object", - "description": "long-form user configuration", - "additionalProperties": false, - "properties": { - "scope": { - "$ref": "#/definitions/system-username-scope" - } + "type": "null" + } + ], + "default": null, + "description": "The primary-key header for snaps signed by third parties.", + "examples": ["test-provenance"], + "title": "Provenance" + }, + "components": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Component" }, - "required": ["scope"] + "propertyNames": { + "maxLength": 40 + }, + "type": "object" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "Declares the components to build in conjunction with the snap.", + "examples": ["{foo-component: {type: standard}}"], + "title": "Components" } - } + }, + "required": ["name", "base", "parts", "confinement"], + "title": "Core22Project", + "type": "object" }, - "donation": { - "oneOf": [ - { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": [ + "Core24Project": { + "$id": "urn:snapcraft:core24", + "additionalProperties": false, + "properties": { + "name": { + "description": "The identifying name of the snap.", + "examples": ["my-app", "powershell", "jupyterlab-desktop"], + "maxLength": 40, + "title": "Name", + "type": "string" + }, + "title": { + "anyOf": [ + { + "description": "A human-readable title.", + "examples": ["Ubuntu Linux", "Jupyter Lab Desktop", "LXD", "DigiKam", "Apache Kafka", "MySQL Router K8s charm"], + "maxLength": 40, + "minLength": 2, + "title": "Title", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "version": { + "anyOf": [ { + "description": "The version of the project, enclosed in quotation marks.", + "examples": ["\"0.1\"", "\"1.0.0\"", "\"v1.0.0\"", "\"24.04\""], + "maxLength": 32, + "title": "version string", "type": "string" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "The version of the snap.", + "examples": ["1.2.3"], + "title": "Version" }, - { - "type": "string" - } - ] - }, - "issues": { - "oneOf": [ - { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": [ + "summary": { + "anyOf": [ { + "description": "A short description of the project.", + "examples": ["Linux for Human Beings", "The cross-platform desktop application for JupyterLab", "Container and VM manager", "Photo Management Program", "Charm for routing MySQL databases in Kubernetes", "An open-source event streaming platform for high-performance data pipelines"], + "maxLength": 78, + "title": "Summary", "type": "string" + }, + { + "type": "null" } - ] + ], + "default": null, + "title": "Summary" }, - { - "type": "string" - } - ] - }, - "contact": { - "oneOf": [ - { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": [ + "description": { + "anyOf": [ { "type": "string" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "The full description of the project.", + "title": "Description" }, - { + "base": { + "const": "core24", + "title": "Base", "type": "string" - } - ] - }, - "source-code": { - "type": "string" - }, - "website": { - "type": "string" - }, - "apps": { - "type": "object", - "additionalProperties": false, - "validation-failure": "{!r} is not a valid app name. App names consist of upper- and lower-case alphanumeric characters and hyphens. They cannot start or end with a hyphen.", - "patternProperties": { - "^[a-zA-Z0-9](?:-?[a-zA-Z0-9])*$": { - "type": "object", - "required": ["command"], - "dependencies": { - "bus-name": ["daemon"], - "activates-on": ["daemon"], - "refresh-mode": ["daemon"], - "stop-mode": ["daemon"], - "stop-command": ["daemon"], - "start-timeout": ["daemon"], - "stop-timeout": ["daemon"], - "watchdog-timeout": ["daemon"], - "restart-delay": ["daemon"], - "post-stop-command": ["daemon"], - "reload-command": ["daemon"], - "restart-condition": ["daemon"], - "before": ["daemon"], - "after": ["daemon"], - "timer": ["daemon"], - "install-mode": ["daemon"] - }, - "additionalProperties": false, - "properties": { - "autostart": { - "type": "string", - "description": "Name of the desktop file placed by the application in $SNAP_USER_DATA/.config/autostart to indicate that application should be started with the user's desktop session.", - "pattern": "^[A-Za-z0-9. _#:$-]+\\.desktop$", - "validation-failure": "{.instance!r} is not a valid desktop file name (e.g. myapp.desktop)" - }, - "common-id": { - "type": "string", - "description": "common identifier across multiple packaging formats" - }, - "bus-name": { - "type": "string", - "description": "D-Bus name this service is reachable as", - "pattern": "^[A-Za-z0-9/. _#:$-]*$", - "validation-failure": "{.instance!r} is not a valid bus name." - }, - "activates-on": { - "type": "array", - "description": "dbus interface slots this service activates on", - "minitems": 1, - "uniqueItems": true, - "items": { - "type": "string" - } + }, + "build-base": { + "anyOf": [ + { + "type": "string" }, - "desktop": { - "type": "string", - "description": "path to a desktop file representing the app, relative to the prime directory" - }, - "command": { - "type": "string", - "description": "command executed to run the binary" - }, - "completer": { - "type": "string", - "description": "bash completion script relative to the prime directory" - }, - "stop-command": { - "type": "string", - "description": "command executed to stop a service" - }, - "post-stop-command": { - "type": "string", - "description": "command executed after stopping a service" - }, - "start-timeout": { - "type": "string", - "pattern": "^[0-9]+(ns|us|ms|s|m)*$", - "validation-failure": "{.instance!r} is not a valid timeout value.", - "description": "Optional time to wait for daemon to start - ns | us | ms | s | m" - }, - "stop-timeout": { - "type": "string", - "pattern": "^[0-9]+(ns|us|ms|s|m)*$", - "validation-failure": "{.instance!r} is not a valid timeout value.", - "description": "Optional time to wait for daemon to stop - ns | us | ms | s | m" - }, - "watchdog-timeout": { - "type": "string", - "pattern": "^[0-9]+(ns|us|ms|s|m)*$", - "validation-failure": "{.instance!r} is not a valid timeout value.", - "description": "Service watchdog timeout - ns | us | ms | s | m" - }, - "reload-command": { - "type": "string", - "description": "Command to use to ask the service to reload its configuration." - }, - "restart-delay": { - "type": "string", - "pattern": "^[0-9]+(ns|us|ms|s|m)*$", - "validation-failure": "{.instance!r} is not a valid delay value.", - "description": "Delay between service restarts - ns | us | ms | s | m. Defaults to unset. See the systemd.service manual on RestartSec for details." - }, - "timer": { - "type": "string", - "description": "The service is activated by a timer, app must be a daemon. (systemd.time calendar event string)" - }, - "daemon": { - "type": "string", - "description": "signals that the app is a service.", - "enum": ["simple", "forking", "oneshot", "notify", "dbus"] - }, - "after": { - "type": "array", - "description": "List of applications that are ordered to be started after the current one", - "minitems": 1, - "uniqueItems": true, - "items": { - "type": "string" - } + { + "type": "null" + } + ], + "default": null, + "description": "The build environment to use when building the snap", + "examples": ["core20", "core22", "core24", "devel"], + "title": "Build-Base" + }, + "platforms": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/Platform" + }, + { + "type": "null" + } + ] + }, + "type": "object" }, - "before": { - "type": "array", - "description": "List of applications that are ordered to be started before the current one", - "minitems": 1, - "uniqueItems": true, + { + "type": "null" + } + ], + "default": null, + "description": "The platforms where the snap can be built and where the resulting snap can run.", + "examples": ["{amd64: {build-on: [amd64], build-for: [amd64]}, arm64: {build-on: [amd64, arm64], build-for: [arm64]}}"], + "title": "Platforms" + }, + "contact": { + "anyOf": [ + { + "type": "string" + }, + { "items": { "type": "string" - } - }, - "refresh-mode": { - "type": "string", - "description": "controls if the app should be restarted at all", - "enum": ["endure", "restart", "ignore-running"] - }, - "stop-mode": { - "type": "string", - "description": "controls how the daemon should be stopped", - "enum": ["sigterm", "sigterm-all", "sighup", "sighup-all", "sigusr1", "sigusr1-all", "sigusr2", "sigusr2-all", "sigint", "sigint-all"] - }, - "restart-condition": { - "type": "string", - "enum": ["on-success", "on-failure", "on-abnormal", "on-abort", "on-watchdog", "always", "never"] + }, + "type": "array", + "uniqueItems": true }, - "install-mode": { - "type": "string", - "enum": ["enable", "disable"] + { + "type": "null" + } + ], + "default": null, + "description": "The snap author's contact links and email addresses.", + "examples": ["[contact@example.com, https://example.com/contact]"], + "title": "Contact" + }, + "issues": { + "anyOf": [ + { + "type": "string" }, - "slots": { - "type": "array", - "minitems": 1, - "uniqueItems": true, + { "items": { "type": "string" - } - }, - "plugs": { + }, "type": "array", - "minitems": 1, - "uniqueItems": true, + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The links and email addresses for submitting issues, bugs, and feature requests.", + "examples": ["[issues@email.com, https://example.com/issues]"], + "title": "Issues" + }, + "source-code": { + "anyOf": [ + { + "type": "string" + }, + { "items": { "type": "string" - } - }, - "aliases": { + }, "type": "array", - "uniqueItems": true, - "items": { - "type": "string", - "pattern": "^[a-zA-Z0-9][-_.a-zA-Z0-9]*$", - "validation-failure": "{.instance!r} is not a valid alias. Aliases must be strings, begin with an ASCII alphanumeric character, and can only use ASCII alphanumeric characters and the following special characters: . _ -" - } + "uniqueItems": true }, - "environment": { - "description": "environment entries for the specific app.", - "$ref": "#/definitions/environment" + { + "type": "null" + } + ], + "default": null, + "description": "The links to the source code of the snap or the original project.", + "examples": ["[https://example.com/source-code]"], + "title": "Source-Code" + }, + "license": { + "anyOf": [ + { + "type": "string" }, - "adapter": { - "$comment": "Full should be the default, but it requires command-chain which isn't available in snapd until 2.36, which isn't yet stable. Until 2.36 is generally available, continue with legacy as the default.", - "type": "string", - "description": "What kind of wrapper to generate for the given command", - "enum": ["none", "legacy", "full"], - "default": "legacy" + { + "type": "null" + } + ], + "default": null, + "description": "The project's license as an SPDX expression", + "examples": ["GPL-3.0+", "Apache-2.0"], + "title": "License" + }, + "adopt-info": { + "anyOf": [ + { + "type": "string" }, - "command-chain": { - "type": "array", + { + "type": "null" + } + ], + "default": null, + "description": "Selects a part to inherit metadata from and reuse for the snap's metadata.\n\nRequired if one of ``version``, ``summary``, or ``description`` isn't set.", + "examples": ["foo-part"], + "title": "Adopt-Info" + }, + "parts": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "The self-contained software pieces needed to create the final artifact.", + "examples": ["{cloud-init: {plugin: python, source-type: git, source: https://git.launchpad.net/cloud-init}}"], + "title": "Parts", + "type": "object" + }, + "package-repositories": { + "anyOf": [ + { "items": { - "type": "string", - "pattern": "^[A-Za-z0-9/._#:$-]*$", - "validation-failure": "{.instance!r} is not a valid command-chain entry. Command chain entries must be strings, and can only use ASCII alphanumeric characters and the following special characters: / . _ # : $ -" - } - }, - "sockets": { - "type": "object", - "additionalProperties": false, - "validation-failure": "{!r} is not a valid socket name. Socket names consist of lower-case alphanumeric characters and hyphens.", - "patternProperties": { - "^[a-z][a-z0-9_-]*$": { - "type": "object", - "required": ["listen-stream"], - "description": "Sockets for automatic service activation", - "additionalProperties": false, - "properties": { - "listen-stream": { - "anyOf": [ - { - "type": "integer", - "usage": "port number, an integer between 1 and 65535", - "minimum": 1, - "maximum": 65535 - }, - { - "type": "string", - "usage": "socket path, a string" - } - ] - }, - "socket-mode": { - "type": "integer" - } - } - } - } + "additionalProperties": true, + "type": "object" + }, + "type": "array" }, - "passthrough": { - "type": "object", - "description": "properties to be passed into snap.yaml as-is" + { + "type": "null" + } + ], + "default": null, + "description": "The package repositories to use for build and stage packages.", + "examples": ["[{type: apt, components: [main], suites: [xenial], key-id: 78E1918602959B9C59103100F1831DDAFC42E99D, url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu}]"], + "title": "Package-Repositories" + }, + "compression": { + "default": "xz", + "description": "Specifies the algorithm that compresses the snap.", + "enum": ["lzo", "xz"], + "examples": ["xz", "lzo"], + "title": "Compression", + "type": "string" + }, + "donation": { + "anyOf": [ + { + "type": "string" }, - "extensions": { - "type": "array", - "minitems": 1, - "uniqueItems": true, + { "items": { - "enum": ["env-injector", "flutter-stable", "flutter-beta", "flutter-dev", "flutter-master", "gnome", "gnome-3-28", "gnome-3-34", "gnome-3-38", "kde-neon", "kde-neon-6", "ros1-noetic", "ros1-noetic-desktop", "ros1-noetic-perception", "ros1-noetic-robot", "ros1-noetic-ros-base", "ros1-noetic-ros-core", "ros2-foxy", "ros2-foxy-ros-base", "ros2-foxy-ros-core", "ros2-foxy-desktop", "ros2-humble", "ros2-humble-ros-base", "ros2-humble-ros-core", "ros2-humble-desktop"] - } - } - } - } - } - }, - "hooks": { - "type": "object", - "additionalProperties": false, - "validation-failure": "{!r} is not a valid hook name. Hook names consist of lower-case alphanumeric characters and hyphens. They cannot start or end with a hyphen.", - "patternProperties": { - "^[a-z](?:-?[a-z0-9])*$": { - "type": "object", - "additionalProperties": false, - "properties": { - "command-chain": { + "type": "string" + }, "type": "array", - "items": { - "type": "string", - "pattern": "^[A-Za-z0-9/._#:$-]*$", - "validation-failure": "{.instance!r} is not a valid command-chain entry. Command chain entries must be strings, and can only use ASCII alphanumeric characters and the following special characters: / . _ # : $ -" - } + "uniqueItems": true }, - "environment": { - "description": "environment entries for this hook", - "$ref": "#/definitions/environment" + { + "type": "null" + } + ], + "default": null, + "description": "The snap's donation links.", + "examples": ["[donate@example.com, https://example.com/donate]"], + "title": "Donation" + }, + "website": { + "anyOf": [ + { + "type": "string" }, - "plugs": { - "type": "array", - "minitems": 1, - "uniqueItems": true, + { "items": { "type": "string" - } - }, - "passthrough": { - "type": "object", - "description": "properties to be passed into snap.yaml as-is" - } - } - } - } - }, - "parts": { - "type": "object", - "minProperties": 1, - "additionalProperties": false, - "validation-failure": "{!r} is not a valid part name. Part names consist of lower-case alphanumeric characters, hyphens and plus signs. As a special case, 'plugins' is also not a valid part name.", - "patternProperties": { - "^(?!plugins$)[a-z0-9][a-z0-9+-]*$": { - "type": ["object", "null"], - "minProperties": 1, - "required": ["plugin"], - "properties": { - "plugin": { - "type": "string", - "description": "plugin name" - }, - "source": { - "$ref": "#/definitions/grammar-string" - }, - "source-checksum": { - "type": "string", - "default": "" - }, - "source-branch": { - "type": "string", - "default": "" - }, - "source-commit": { - "type": "string", - "default": "" - }, - "source-depth": { - "type": "integer", - "default": 0 - }, - "source-submodules": { + }, "type": "array", - "minItems": 0, - "uniqueItems": true, - "items": { - "type": "string", - "description": "submodules to fetch, by pathname in source tree" - } - }, - "source-subdir": { - "type": "string", - "default": "" + "uniqueItems": true }, - "source-tag": { - "type": "string", - "default": "" + { + "type": "null" + } + ], + "default": null, + "description": "The links to the original software's web pages.", + "examples": ["[https://example.com]"], + "title": "Website" + }, + "type": { + "default": null, + "description": "The snap's type.", + "enum": ["app", "gadget", "kernel", "snapd", null], + "examples": ["kernel"], + "title": "Type" + }, + "icon": { + "anyOf": [ + { + "type": "string" }, - "source-type": { - "type": "string", - "default": "", - "enum": ["bzr", "git", "hg", "mercurial", "subversion", "svn", "tar", "zip", "deb", "rpm", "7z", "local"] + { + "type": "null" + } + ], + "default": null, + "description": "The path to the snap's icon.", + "examples": ["snap/gui/icon.svg"], + "title": "Icon" + }, + "confinement": { + "description": "The amount of isolation the snap has from the host system.", + "enum": ["classic", "devmode", "strict"], + "examples": ["strict", "classic", "devmode"], + "title": "Confinement", + "type": "string" + }, + "layout": { + "anyOf": [ + { + "additionalProperties": { + "additionalProperties": { + "type": "string" + }, + "maxProperties": 1, + "minProperties": 1, + "propertyNames": { + "enum": ["symlink", "bind", "bind-file", "type"] + }, + "type": "object" + }, + "type": "object" }, - "disable-parallel": { - "type": "boolean", - "default": false + { + "type": "null" + } + ], + "default": null, + "description": "The file layouts in the execution environment.", + "examples": ["{/var/lib/foo: {bind: $SNAP_DATA/var/lib/foo}}"], + "title": "Layout" + }, + "grade": { + "anyOf": [ + { + "enum": ["stable", "devel"], + "type": "string" }, - "after": { - "type": "array", - "minitems": 1, - "uniqueItems": true, - "items": { - "type": "string" + { + "type": "null" + } + ], + "default": null, + "description": "The quality grade of the snap.", + "examples": ["stable", "devel"], + "title": "Grade" + }, + "assumes": { + "description": "The minimum version of snapd and its features that the snap requires from the host.", + "examples": ["[snapd2.66, common-data-dir]"], + "items": { + "type": "string" + }, + "title": "Assumes", + "type": "array", + "uniqueItems": true + }, + "hooks": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Hook" }, - "default": [] + "type": "object" }, - "stage-snaps": { - "$comment": "For some reason 'default' doesn't work if in the ref", - "$ref": "#/definitions/grammar-array", - "default": [] + { + "type": "null" + } + ], + "default": null, + "description": "Configures the snap's hooks.", + "examples": ["{configure: {plugs: [home]}}"], + "title": "Hooks" + }, + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" }, - "stage-packages": { - "$comment": "For some reason 'default' doesn't work if in the ref", - "$ref": "#/definitions/grammar-array", - "default": [] + { + "type": "null" + } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" + }, + "apps": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/App" + }, + "type": "object" }, - "build-snaps": { - "$comment": "For some reason 'default' doesn't work if in the ref", - "$ref": "#/definitions/grammar-array", - "default": [] + { + "type": "null" + } + ], + "default": null, + "description": "The map of app names representing entry points to run for the snap.", + "examples": ["{app-1: {command: bin/app-1}}"], + "title": "Apps" + }, + "plugs": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/ContentPlug" + }, + {} + ] + }, + "type": "object" }, - "build-packages": { - "$comment": "For some reason 'default' doesn't work if in the ref", - "$ref": "#/definitions/grammar-array", - "default": [] + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's plugs.", + "examples": ["{dot-gitconfig: {interface: personal-files, read: [$HOME/.gitconfig]}}"], + "title": "Plugs" + }, + "slots": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" }, - "build-environment": { - "$ref": "#/definitions/build-environment-grammar", - "default": [] + { + "type": "null" + } + ], + "default": null, + "description": "Declares the snap's slots.", + "examples": ["{slot-1: {interface: content, content: my-binaries, source: {read: [$SNAP/bin]}}}"], + "title": "Slots" + }, + "lint": { + "anyOf": [ + { + "$ref": "#/$defs/Lint" }, - "build-attributes": { - "type": "array", - "minitems": 1, - "uniqueItems": true, - "items": { - "type": "string", - "enum": ["core22-step-dependencies", "enable-patchelf", "no-patchelf", "no-install", "debug", "keep-execstack"] - }, - "default": [] + { + "type": "null" + } + ], + "default": null, + "description": "The linter configuration settings.", + "examples": ["{ignore: [classic, library: [usr/lib/**/libfoo.so*]]}"] + }, + "epoch": { + "anyOf": [ + { + "type": "string" }, - "organize": { - "type": "object", - "default": {}, - "additionalProperties": { - "type": "string", - "minLength": 1 - } + { + "type": "null" + } + ], + "default": null, + "description": "The epoch associated with this version of the snap.", + "examples": ["1", "2*"], + "title": "Epoch" + }, + "system-usernames": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" }, - "filesets": { - "type": "object", - "default": {}, + { + "type": "null" + } + ], + "default": null, + "description": "The system usernames that the snap can use to run daemons and services.", + "examples": ["{snap-daemon: shared}"], + "title": "System-Usernames" + }, + "environment": { + "anyOf": [ + { "additionalProperties": { - "type": "array", - "minitems": 1 - } - }, - "stage": { - "type": "array", - "minitems": 1, - "uniqueItems": true, - "items": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "default": ["*"] + "type": "object" }, - "prime": { - "type": "array", - "minitems": 1, - "uniqueItems": true, + { + "type": "null" + } + ], + "default": null, + "description": "The snap's runtime environment variables.", + "examples": ["{PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$PYTHON_PATH, DISABLE_WAYLAND: 1}"], + "title": "Environment" + }, + "build-packages": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The list of packages to install when building a snap.", + "examples": ["[libssl-dev, libyaml-dev]"], + "title": "Build-Packages" + }, + "build-snaps": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "The snaps to install when building a snap.", + "examples": ["[go/1.22/stable, yq]"], + "title": "Build-Snaps" + }, + "ua-services": { + "anyOf": [ + { "items": { "type": "string" }, - "default": ["*"] - }, - "override-pull": { - "type": "string", - "default": "snapcraftctl pull" + "type": "array", + "uniqueItems": true }, - "override-build": { - "type": "string", - "default": "snapcraftctl build" + { + "type": "null" + } + ], + "default": null, + "description": "The Ubuntu Pro (formerly Ubuntu Advantage) services to enable when building the snap.", + "examples": ["[esm-apps]"], + "title": "Ua-Services" + }, + "provenance": { + "anyOf": [ + { + "type": "string" }, - "override-stage": { - "type": "string", - "default": "snapcraftctl stage" + { + "type": "null" + } + ], + "default": null, + "description": "The primary-key header for snaps signed by third parties.", + "examples": ["test-provenance"], + "title": "Provenance" + }, + "components": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/Component" + }, + "propertyNames": { + "maxLength": 40 + }, + "type": "object" }, - "override-prime": { - "type": "string", - "default": "snapcraftctl prime" + { + "type": "null" + } + ], + "default": null, + "description": "Declares the components to build in conjunction with the snap.", + "examples": ["{foo-component: {type: standard}}"], + "title": "Components" + } + }, + "required": ["name", "base", "parts", "confinement"], + "title": "Core24Project", + "type": "object" + }, + "Hook": { + "additionalProperties": false, + "description": "Snapcraft project hook definition.", + "properties": { + "command-chain": { + "description": "The ordered list of commands to run before the hook runs.", + "examples": ["[bin/alsa-launch, bin/desktop-launch]"], + "items": { + "type": "string" + }, + "title": "Command-Chain", + "type": "array" + }, + "environment": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object" }, - "parse-info": { - "type": "array", - "minitems": 1, - "uniqueItems": true, + { + "type": "null" + } + ], + "default": null, + "description": "The environment variables for the hook.", + "examples": ["{PYTHONPATH: /custom/path/:$PYTHON_PATH, DISABLE_WAYLAND: 1}"], + "title": "Environment" + }, + "plugs": { + "anyOf": [ + { "items": { "type": "string" }, - "default": [] + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ], + "default": null, + "description": "The list of interfaces that the hook can connect to.", + "examples": ["[home, removable-media]"], + "title": "Plugs" + }, + "passthrough": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" } - } + ], + "default": null, + "description": "The attributes to pass to the snap's metadata file for the hook.", + "examples": ["{daemon: complex}"], + "title": "Passthrough" } - } - }, - "plugs": { + }, + "title": "Hook", "type": "object" }, - "slots": { + "Lint": { + "additionalProperties": false, + "description": "Linter configuration.\n\n:ivar ignore: A list describing which files should have issues ignored for given linters.\n The items in the list can be either:\n - a string, which must be the name of one of the known linters (see below). All issues\n from this linter will be ignored.\n - a dict containing exactly one key, which must be the name of one of the known linters.\n The value is then a list of strings corresponding to the filenames/patterns that\n should be ignored for that linter.\n The \"known\" linter names are the keys in :ref:`LINTERS`", + "properties": { + "ignore": { + "description": "Linters or files to skip when linting.", + "examples": ["{ignore: [classic, library: [usr/lib/**/libfoo.so*]]}"], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "object" + } + ] + }, + "title": "Ignore", + "type": "array" + } + }, + "required": ["ignore"], + "title": "Lint", "type": "object" }, - "ua-services": { - "type": "array", - "description": "UA services to enable.", - "minItems": 1, - "uniqueItems": true, - "items": [ - { - "type": "string" - } - ] - } - }, - "allOf": [ - { - "anyOf": [ - { - "usage": "type: (without a base)", - "properties": { - "type": { - "enum": ["base", "kernel", "snapd"] - } - }, - "allOf": [ + "Platform": { + "additionalProperties": false, + "description": "Snapcraft project platform definition.", + "properties": { + "build-on": { + "anyOf": [ { - "required": ["type"], - "err_msg": "Missing build information 'type' or 'base'" + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + } + ], + "minLength": 1 }, { - "not": { - "required": ["base"] - }, - "err_msg": "type: must omit 'base'", - "err_path": ["base"] + "type": "null" } - ] + ], + "description": "The architectures on which the snap can be built.", + "examples": ["[amd64, riscv64]"], + "title": "Build-On" }, - { - "usage": "base: and type: ", - "properties": { - "type": { - "enum": ["app", "gadget"] + "build-for": { + "anyOf": [ + { + "items": {}, + "maxItems": 1, + "minItems": 1, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" } - }, - "allOf": [ + ], + "default": null, + "description": "The single element list containing the architecture the snap is built for.", + "examples": ["[amd64]", "[riscv64]"], + "title": "Build-For" + } + }, + "required": ["build-on"], + "title": "Platform", + "type": "object" + }, + "Socket": { + "additionalProperties": false, + "description": "Snapcraft app socket definition.", + "properties": { + "listen-stream": { + "anyOf": [ + { + "type": "integer" + }, { - "required": ["base"] + "type": "string" } - ] + ], + "description": "The socket's abstract name or socket path.", + "examples": ["$SNAP_COMMON/lxd/unix.socket", "80"], + "title": "Listen-Stream" + }, + "socket-mode": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The mode or permissions of the socket in octal.", + "examples": ["0660"], + "title": "Socket-Mode" + } + }, + "required": ["listen-stream"], + "title": "Socket", + "type": "object" + } + }, + "oneOf": [ + { + "oneOf": [ + { + "$ref": "#/$defs/Core22Project" }, { - "usage": "base: bare (with a build-base)", - "properties": { - "base": { - "enum": ["bare"] + "$ref": "#/$defs/Core24Project" + }, + { + "oneOf": [ + { + "$ref": "#/$defs/BareCore22Project" + }, + { + "$ref": "#/$defs/BareCore24Project" } - }, - "required": ["build-base"] + ] } ] }, { - "anyOf": [ + "oneOf": [ + { + "$ref": "#/$defs/BaseDevelProject" + }, { - "required": ["summary", "description", "version"] + "$ref": "#/$defs/BaseCore22Project" }, { - "required": ["adopt-info"] + "$ref": "#/$defs/BaseCore24Project" } ] } - ], - "required": ["name", "parts"], - - "dependencies": { - "license-agreement": ["license"], - "license-version": ["license"] - }, - "additionalProperties": false + ] } diff --git a/src/craft_ls/server.py b/src/craft_ls/server.py index d87d832..7ef9cb2 100644 --- a/src/craft_ls/server.py +++ b/src/craft_ls/server.py @@ -12,7 +12,6 @@ from craft_ls import __version__ from craft_ls.core import ( get_description_from_path, - get_description_from_path_snapcraft, get_diagnostics, get_schema_path_from_token_position, get_validator_and_scan, @@ -119,16 +118,9 @@ def hover(ls: LanguageServer, params: lsp.HoverParams) -> lsp.Hover | None: ): return None - if file_stem != "snapcraft": - description = get_description_from_path( - path=path, schema=cast(Schema, validator.schema) - ) - - else: - # TODO(snap): Change this once the jsonschema is more query-able. - description = get_description_from_path_snapcraft( - path=path, schema=cast(Schema, validator.schema) - ) + description = get_description_from_path( + path=path, schema=cast(Schema, validator.schema) + ) return lsp.Hover( contents=lsp.MarkupContent( From 2c01481606e7fa3cfa60e31ec397766f71fbd9de Mon Sep 17 00:00:00 2001 From: Alex Batisse Date: Fri, 31 Oct 2025 16:28:08 +0100 Subject: [PATCH 5/5] chore: Fix lint and test --- src/craft_ls/core.py | 7 ++++--- tests/test_server.py | 5 +---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/craft_ls/core.py b/src/craft_ls/core.py index fe3c927..c2af64a 100644 --- a/src/craft_ls/core.py +++ b/src/craft_ls/core.py @@ -112,7 +112,7 @@ def iter_errors( ) -def get_validator_and_scan( +def get_validator_and_scan( # noqa: C901 file_stem: str, instance_document: str ) -> tuple[Validator, ScanResult] | None: """Get the most appropriate validator for the current document.""" @@ -127,6 +127,7 @@ def get_validator_and_scan( elif file_stem == "snapcraft": base = scanned_tokens.instance.get("base", None) build_base = scanned_tokens.instance.get("build-base", None) + validator: Draft202012Validator | MissingTypeSnapcraftValidator match base, build_base: case "core22", _: validator = Draft202012Validator( @@ -172,9 +173,9 @@ def get_validator_and_scan( ) case _: - validator = cast(Validator, MissingTypeSnapcraftValidator()) + validator = MissingTypeSnapcraftValidator() - return validator, scanned_tokens + return cast(Validator, validator), scanned_tokens else: # by elimination, file_stem is charmcraft diff --git a/tests/test_server.py b/tests/test_server.py index 5571c0e..7467124 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -52,7 +52,4 @@ async def test_diagnostic_on_open(client: LanguageClient): # Then assert (diagnostics := client.diagnostics.get(test_uri, [])) - assert any( - "'plugin' is a required property" in diagnostic.message - for diagnostic in diagnostics - ) + assert any("is mandatory" in diagnostic.message for diagnostic in diagnostics)