From 1d2afd854bcd48adca995860f328c34d0594d42e Mon Sep 17 00:00:00 2001 From: Marcel-Ramos-byte Date: Fri, 19 Dec 2025 07:20:12 -0300 Subject: [PATCH] schema: allow extensions field in rockcraft.yaml --- schema/rockcraft.json | 12 ++++++++++++ tools/schema/schema.py | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/schema/rockcraft.json b/schema/rockcraft.json index 261a59116..91bef9323 100644 --- a/schema/rockcraft.json +++ b/schema/rockcraft.json @@ -13720,6 +13720,18 @@ "echo [ Hello ]" ], "title": "Entrypoint-Command" + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of extensions to apply to the rock.", + "examples": [ + [ + "twelve-factor" + ] + ] } }, "required": [ diff --git a/tools/schema/schema.py b/tools/schema/schema.py index 4c813b8d2..b21cad1cb 100755 --- a/tools/schema/schema.py +++ b/tools/schema/schema.py @@ -55,6 +55,14 @@ def generate_project_schema() -> str: # combine both schemas project_schema = {**initial_schema, **project_schema} + # add extensions field (DX only) + project_schema["properties"]["extensions"] = { + "type": "array", + "items": {"type": "string"}, + "description": "List of extensions to apply to the rock.", + "examples": [["twelve-factor"]], + } + # tweak the platforms definition on the Project (each value can be empty) project_schema["properties"]["platforms"]["additionalProperties"] = { "oneOf": [{"type": "null"}, {"$ref": "#/$defs/Platform"}]