feat(schema): Add array templates
This commit is contained in:
+76
-10
@@ -273,20 +273,86 @@
|
|||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The name that appears in the template"
|
"enum": [
|
||||||
},
|
"string",
|
||||||
"data": {
|
"array"
|
||||||
"type": "string",
|
],
|
||||||
"description": "The data that is to be inserted"
|
"description": "The type of data included. Can be omitted, which then defaults to string",
|
||||||
|
"default": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"if": {
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"const": "array"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"string",
|
||||||
|
"array"
|
||||||
|
],
|
||||||
|
"description": "The type of data included. Can be omitted, which then defaults to string",
|
||||||
|
"default": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The name that appears in the template"
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"template": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"items",
|
||||||
|
"template",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"else": {
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The name that appears in the template"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"string",
|
||||||
|
"array"
|
||||||
|
],
|
||||||
|
"description": "The type of data included. Can be omitted, which then defaults to string",
|
||||||
|
"default": "string"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The data that is to be inserted"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name"
|
||||||
"data"
|
]
|
||||||
],
|
|
||||||
"additionalProperties": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"symlinks": {
|
"symlinks": {
|
||||||
|
|||||||
+5
-1
@@ -44,7 +44,11 @@ git:
|
|||||||
|
|
||||||
template_data:
|
template_data:
|
||||||
- name: template_data_name
|
- name: template_data_name
|
||||||
data: the_data
|
type: array
|
||||||
|
template: |
|
||||||
|
test {{ data }}
|
||||||
|
items:
|
||||||
|
- test
|
||||||
|
|
||||||
cmds:
|
cmds:
|
||||||
always:
|
always:
|
||||||
|
|||||||
Reference in New Issue
Block a user