Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement agreed-on devfile 2.0 issues #35

Merged
merged 16 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
davidfestal marked this conversation as resolved.
Show resolved Hide resolved
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-]+)*)?$"
davidfestal marked this conversation as resolved.
Show resolved Hide resolved
},
"name": {
"type": "string",
"description": "Optional devfile name"
}
}
},
"schemaVersion": {
"type": "string",
Expand All @@ -791,7 +802,6 @@
},
"type": "object",
"required": [
"name",
"schemaVersion"
]
}