-
Notifications
You must be signed in to change notification settings - Fork 0
/
vai.schema.json
120 lines (120 loc) · 2.64 KB
/
vai.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
114
115
116
117
118
119
120
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/Noxsios/vai/main/vai.schema.json",
"$defs": {
"Step": {
"oneOf": [
{
"properties": {
"run": {
"type": "string"
},
"uses": {
"not": true
},
"eval": {
"not": true
}
},
"required": [
"run"
]
},
{
"properties": {
"run": {
"not": true
},
"eval": {
"not": true
},
"uses": {
"type": "string"
}
},
"required": [
"uses"
]
},
{
"properties": {
"run": {
"not": true
},
"uses": {
"not": true
},
"eval": {
"type": "string"
}
},
"required": [
"eval"
]
}
],
"properties": {
"run": {
"type": "string",
"description": "Command/script to run"
},
"uses": {
"type": "string",
"description": "Location of a remote task to call conforming to the purl spec"
},
"eval": {
"type": "string",
"description": "Expression to evaluate with tengo"
},
"id": {
"type": "string",
"description": "Unique identifier for the step"
},
"name": {
"type": "string",
"description": "Human-readable name for the step"
},
"with": {
"patternProperties": {
"^[a-zA-Z_]+[a-zA-Z0-9_]*$": {
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "integer"
}
]
}
},
"additionalProperties": false,
"type": "object",
"minItems": 1,
"description": "Additional parameters for the step/task call"
}
},
"additionalProperties": false,
"type": "object"
},
"Task": {
"items": {
"$ref": "#/$defs/Step"
},
"type": "array"
},
"With": {
"type": "object"
}
},
"patternProperties": {
"^[_a-zA-Z][a-zA-Z0-9_-]*$": {
"$ref": "#/$defs/Task",
"description": "Name of the task"
}
},
"additionalProperties": false,
"type": "object"
}