diff --git a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.1.0-alpha/devfile.json b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.1.0-alpha/devfile.json index 31de64bba4..1d723579cb 100644 --- a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.1.0-alpha/devfile.json +++ b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.1.0-alpha/devfile.json @@ -6,6 +6,11 @@ "schemaVersion" ], "properties": { + "attributes": { + "description": "Map of implementation-dependant free-form YAML attributes.", + "type": "object", + "additionalProperties": true + }, "commands": { "description": "Predefined, ready-to-use, devworkspace-related commands", "type": "array", @@ -632,7 +637,7 @@ "type": "object", "properties": { "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", + "description": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead.", "type": "object", "additionalProperties": true }, @@ -704,6 +709,11 @@ } ], "properties": { + "attributes": { + "description": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", + "type": "object", + "additionalProperties": true + }, "commands": { "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", "type": "array", @@ -1524,6 +1534,13 @@ "uri": { "description": "Uri of a Devfile yaml file", "type": "string" + }, + "variables": { + "description": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", + "type": "object", + "additionalProperties": { + "type": "string" + } } }, "additionalProperties": false @@ -1783,6 +1800,13 @@ }, "additionalProperties": false } + }, + "variables": { + "description": "Map of key-value variables used for string replacement in the devfile. Values can can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source - element identifiers, e.g. command id, component name, endpoint name, project name - references to identifiers, e.g. in events, a command's component, container's volume mount name - string enums, e.g. command group kind, endpoint exposure", + "type": "object", + "additionalProperties": { + "type": "string" + } } }, "additionalProperties": false diff --git a/wsmaster/che-core-api-workspace/src/test/resources/devfile/schema_test/devfile/devfile_v2-1-0-alpha_simple-devfile.yaml b/wsmaster/che-core-api-workspace/src/test/resources/devfile/schema_test/devfile/devfile_v2-1-0-alpha_simple-devfile.yaml index 0a61dd3fe6..b99cff9be1 100644 --- a/wsmaster/che-core-api-workspace/src/test/resources/devfile/schema_test/devfile/devfile_v2-1-0-alpha_simple-devfile.yaml +++ b/wsmaster/che-core-api-workspace/src/test/resources/devfile/schema_test/devfile/devfile_v2-1-0-alpha_simple-devfile.yaml @@ -13,6 +13,8 @@ schemaVersion: 2.1.0-alpha metadata: name: spring-petclinic +attributes: + example: foo components: - name: maven container: