diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-presets.7.rst | 9 | ||||
-rw-r--r-- | Help/manual/presets/schema.json | 23 | ||||
-rw-r--r-- | Help/release/dev/presets-schema.rst | 5 |
3 files changed, 37 insertions, 0 deletions
diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst index e2366da..46b5fc7 100644 --- a/Help/manual/cmake-presets.7.rst +++ b/Help/manual/cmake-presets.7.rst @@ -41,6 +41,15 @@ The files are a JSON document with an object as the root: The root object recognizes the following fields: +``$schema`` + An optional string that provides a URI to the JSON schema that describes the + structure of this JSON document. This field is used for validation and + autocompletion in editors that support JSON schema. It doesn't affect the + behavior of the document itself. If this field is not specified, the JSON + document will still be valid, but tools that use JSON schema for validation + and autocompletion may not function correctly. + This is allowed in preset files specifying version ``8`` or above. + ``version`` A required integer representing the version of the JSON schema. The supported versions are: diff --git a/Help/manual/presets/schema.json b/Help/manual/presets/schema.json index 71db769..d27faa1 100644 --- a/Help/manual/presets/schema.json +++ b/Help/manual/presets/schema.json @@ -106,12 +106,35 @@ "include": { "$ref": "#/definitions/include" } }, "additionalProperties": false + }, + { + "properties": { + "$schema": { "$ref": "#/definitions/$schema" }, + "version": { + "const": 8, + "description": "A required integer representing the version of the JSON schema." + }, + "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" }, + "vendor": { "$ref": "#/definitions/vendor" }, + "configurePresets": { "$ref": "#/definitions/configurePresetsV7" }, + "buildPresets": { "$ref": "#/definitions/buildPresetsV4" }, + "testPresets": { "$ref": "#/definitions/testPresetsV6" }, + "packagePresets": { "$ref": "#/definitions/packagePresetsV6" }, + "workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" }, + "include": { "$ref": "#/definitions/include" } + }, + "additionalProperties": false } ], "required": [ "version" ], "definitions": { + "$schema": { + "type": "string", + "description": "The schema against which to verify this document.", + "format": "uri-reference" + }, "cmakeMinimumRequired": { "type": "object", "description": "An optional object representing the minimum version of CMake needed to build this project.", diff --git a/Help/release/dev/presets-schema.rst b/Help/release/dev/presets-schema.rst new file mode 100644 index 0000000..964373c --- /dev/null +++ b/Help/release/dev/presets-schema.rst @@ -0,0 +1,5 @@ +presets-schema +-------------- + +* :manual:`cmake-presets(7)` files now support schema version ``8``. + It adds support for a ``$schema`` field. |