-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.json
113 lines (113 loc) · 3.72 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/gttp-cli/gttp/pkg/model/template",
"$ref": "#/$defs/Template",
"$defs": {
"Option": {
"properties": {
"name": {
"type": "string",
"description": "Name is the name of the option.\nIf no value is provided, the name will be used as the value."
},
"value": {
"description": "Value is the value of the option.\nIf no value is provided, the name will be used as the value."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name"
]
},
"Template": {
"properties": {
"structures": {
"additionalProperties": {
"items": {
"$ref": "#/$defs/Variable"
},
"type": "array"
},
"type": "object",
"description": "Structures define custom types.\nThey can be used as reusable components, consiting of multiple variables."
},
"variables": {
"items": {
"$ref": "#/$defs/Variable"
},
"type": "array",
"description": "Variables define the input variables for the template.\nThey can be used in the template content and in conditions."
},
"template": {
"type": "string",
"description": "Template defines the content of the template."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"variables",
"template"
]
},
"Variable": {
"properties": {
"name": {
"type": "string",
"description": "Name is the name of the variable."
},
"type": {
"type": "string",
"description": "Type is the type of the variable."
},
"array": {
"type": "boolean",
"description": "IsArray indicates if the variable is an array.\nCan also be indicated by the type, e.g. \"string[]\"."
},
"multiline": {
"type": "boolean",
"description": "Multiline indicates if the variable is a multiline string.\nOnly applicable to text types."
},
"description": {
"type": "string",
"description": "Description is a description of the variable."
},
"condition": {
"type": "string",
"description": "Condition is a condition that must be met for the variable to be used.\nConditions are evaluated using expr-lang expressions (see: https://expr-lang.org/)."
},
"value": {
"description": "Value is the value of the variable.\nIf the value is predefined in the template, the user will not be asked for input."
},
"default": {
"description": "Default is the default value of the variable, if the user does not provide a value."
},
"min": {
"type": "number",
"description": "Min is the minimum value of the variable.\nOnly applicable to number types."
},
"max": {
"type": "number",
"description": "Max is the maximum value of the variable.\nOnly applicable to number types."
},
"regex": {
"type": "string",
"description": "Regex is a regular expression that the value must match.\nOnly applicable to text types."
},
"options": {
"items": {
"$ref": "#/$defs/Option"
},
"type": "array",
"description": "Options are the available options for select and multiselect types."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"type"
]
}
}
}