-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgithub-actions-typing.schema.json
196 lines (196 loc) · 7.21 KB
/
github-actions-typing.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/github-actions-typing.json",
"title": "GitHub Actions typing",
"description": "Type information for GitHub Actions\nhttps://github.com/typesafegithub/github-actions-typing",
"definitions": {
"property_type": {
"type": "object",
"properties": {
"type": {
"title": "Type",
"description": "The type of the input or output.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#available-types",
"type": "string",
"enum": ["string", "boolean", "integer", "float", "enum", "list"]
}
},
"required": ["type"],
"additionalProperties": true
},
"list_item_type": {
"type": "object",
"properties": {
"type": {
"title": "Type",
"description": "The type of the list item.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#list",
"type": "string",
"enum": ["string", "boolean", "integer", "float", "enum"]
}
},
"required": ["type"],
"additionalProperties": true
},
"simple_primitive_property": {
"type": "object",
"properties": {
"type": {
"title": "Type",
"description": "The type of the input, output, or list item.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#available-types",
"type": "string",
"enum": ["string", "boolean", "integer", "float"]
}
},
"required": ["type"],
"additionalProperties": false
},
"integer_with_named_values_property": {
"type": "object",
"properties": {
"type": {
"title": "Type",
"description": "The type of the input, output, or list item.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#available-types",
"type": "string",
"const": "integer"
},
"name": {
"title": "Name",
"description": "A hint for code generators what name can be used as class name.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#integer",
"type": "string",
"minLength": 1
},
"named-values": {
"title": "Named Values",
"description": "A map of special names and their value like \"Infinity\" or \"Never\"\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#integer",
"type": "object",
"patternProperties": {
"^[_a-zA-Z][a-zA-Z0-9_-]*$": {
"title": "Named Value",
"description": "A special name to configure the given value.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#integer",
"type": "integer"
}
},
"minProperties": 1,
"additionalProperties": false
}
},
"required": ["type", "named-values"],
"additionalProperties": false
},
"enum_property": {
"type": "object",
"properties": {
"type": {
"title": "Type",
"description": "The type of the input, output, or list item.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#available-types",
"type": "string",
"const": "enum"
},
"name": {
"title": "Name",
"description": "A hint for code generators what name can be used as class name.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#enum",
"type": "string",
"minLength": 1
},
"allowed-values": {
"title": "Allowed Values",
"description": "The allowed values for the enum property\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#enum",
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
}
},
"required": ["type", "allowed-values"],
"additionalProperties": false
},
"list_property": {
"type": "object",
"properties": {
"type": {
"title": "Type",
"description": "The type of the input, output, or list item.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#available-types",
"type": "string",
"const": "list"
},
"separator": {
"title": "Separator",
"description": "The separator that is added between the elements when building the string, for example a comma or newline character.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#list",
"type": "string",
"minLength": 1
},
"list-item": {
"title": "List Item",
"description": "The specification how list item elements have to look like.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md#list",
"type": "object",
"allOf": [
{ "$ref": "#/definitions/list_item_type" },
{
"anyOf": [
{ "$ref": "#/definitions/simple_primitive_property" },
{ "$ref": "#/definitions/integer_with_named_values_property" },
{ "$ref": "#/definitions/enum_property" }
]
}
]
}
},
"required": ["type", "separator", "list-item"],
"additionalProperties": false
},
"property": {
"allOf": [
{ "$ref": "#/definitions/property_type" },
{
"anyOf": [
{ "$ref": "#/definitions/simple_primitive_property" },
{ "$ref": "#/definitions/integer_with_named_values_property" },
{ "$ref": "#/definitions/enum_property" },
{ "$ref": "#/definitions/list_property" }
]
}
]
},
"properties": {
"type": "object",
"patternProperties": {
"^[_a-zA-Z][a-zA-Z0-9_-]*$": {
"$ref": "#/definitions/property",
"title": "Input or Output",
"description": "An input or output of the action.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md",
"type": "object"
}
},
"additionalProperties": false
},
"properties_or_null": {
"anyOf": [
{ "type": "null" },
{ "$ref": "#/definitions/properties" }
]
},
"top_level_or_null": {
"anyOf": [
{ "type": "null" },
{
"type": "object",
"properties": {
"inputs": {
"$ref": "#/definitions/properties_or_null",
"title": "Inputs",
"description": "The inputs of the action.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md"
},
"outputs": {
"$ref": "#/definitions/properties_or_null",
"title": "Outputs",
"description": "The outputs of the action.\nhttps://github.com/typesafegithub/github-actions-typing/blob/main/README.md"
}
},
"additionalProperties": false
}
]
}
},
"$ref": "#/definitions/top_level_or_null"
}