Skip to content

Commit

Permalink
Implement agreement on issue #10
Browse files Browse the repository at this point in the history
Signed-off-by: David Festal <dfestal@redhat.com>
  • Loading branch information
davidfestal committed Apr 7, 2020
1 parent 6c99166 commit c766457
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 15 deletions.
3 changes: 2 additions & 1 deletion devfile-support/samples/custom-devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "my-devfile"
schemaVersion: "2.0.0-beta"
metadata:
name: "my-devfile"
projects:
- name: "my-project"
custom:
Expand Down
3 changes: 2 additions & 1 deletion devfile-support/samples/nodejs-stack.devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
schemaVersion: 2.0.0
name: nodejs-stack
metadata:
name: nodejs-stack
projects:
- name: project
git:
Expand Down
3 changes: 2 additions & 1 deletion devfile-support/samples/sample-devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "devfile example"
schemaVersion: "2.0.0"
metadata:
name: "devfile example"
projects:
- name: "my-project"
custom:
Expand Down
3 changes: 2 additions & 1 deletion devfile-support/samples/simple-devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "myDevile"
schemaVersion: "2.0.0"
metadata:
name: "myDevile"
projects:
- name: "devworkspace-spec"
git:
Expand Down
3 changes: 2 additions & 1 deletion devfile-support/samples/with-nodejs-parent.devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: with-parent
schemaVersion: 2.0.0
metadata:
name: with-parent
parent:
uri: https://raw.githubusercontent.com/che-incubator/devworkspace-api/proposal-25-variant-1-define-stacks/devfile-support/samples/nodejs-stack.devfile.yaml
commands:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"op": "add",
"path": "/properties/metadata",
"value": { "type": "object", "description": "Optional metadata", "properties": {} }
},
{
"op": "add",
"path": "/properties/metadata/properties/version",
"value": { "type": "string", "description": "Optional semver-compatible version", "pattern": "^([1-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" }
},
{
"op": "add",
"path": "/properties/metadata/properties/name",
"value": { "type": "string", "description": "Optional devfile name" }
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
"path": "/description",
"value": "Devfile schema."
},
{
"op": "add",
"path": "/properties/name",
"value": { "type": "string", "description": "devfile name" }
},
{
"op": "add",
"path": "/properties/schemaVersion",
Expand All @@ -17,6 +12,6 @@
{
"op": "add",
"path": "/required",
"value": [ "name", "schemaVersion" ]
"value": [ "schemaVersion" ]
}
]
18 changes: 14 additions & 4 deletions schemas/devfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,20 @@
},
"type": "array"
},
"name": {
"type": "string",
"description": "devfile name"
"metadata": {
"type": "object",
"description": "Optional metadata",
"properties": {
"version": {
"type": "string",
"description": "Optional semver-compatible version",
"pattern": "^([1-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"
},
"name": {
"type": "string",
"description": "Optional devfile name"
}
}
},
"schemaVersion": {
"type": "string",
Expand All @@ -791,7 +802,6 @@
},
"type": "object",
"required": [
"name",
"schemaVersion"
]
}

0 comments on commit c766457

Please sign in to comment.