|
7 | 7 | "type": { |
8 | 8 | "description": "A form item type\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys", |
9 | 9 | "type": "string", |
10 | | - "enum": ["checkboxes", "dropdown", "input", "markdown", "textarea"] |
| 10 | + "enum": [ |
| 11 | + "checkboxes", |
| 12 | + "dropdown", |
| 13 | + "input", |
| 14 | + "markdown", |
| 15 | + "textarea", |
| 16 | + "upload" |
| 17 | + ] |
11 | 18 | }, |
12 | 19 | "id": { |
13 | 20 | "type": "string", |
|
26 | 33 | }, |
27 | 34 | "additionalProperties": false |
28 | 35 | }, |
| 36 | + "upload_validations": { |
| 37 | + "title": "upload validations", |
| 38 | + "description": "Upload validations\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#validations-for-upload", |
| 39 | + "type": "object", |
| 40 | + "properties": { |
| 41 | + "required": { |
| 42 | + "description": "Specify whether require a form item", |
| 43 | + "type": "boolean", |
| 44 | + "default": false |
| 45 | + }, |
| 46 | + "accept": { |
| 47 | + "title": "accept", |
| 48 | + "description": "A comma-separated list of file extensions that are accepted. If omitted, all supported file types are accepted.", |
| 49 | + "type": "string", |
| 50 | + "examples": [".png,.jpg,.gif,.log,.txt,.zip"] |
| 51 | + } |
| 52 | + }, |
| 53 | + "additionalProperties": false |
| 54 | + }, |
29 | 55 | "assignee": { |
30 | 56 | "type": "string", |
31 | 57 | "maxLength": 39, |
|
2126 | 2152 | }, |
2127 | 2153 | "additionalProperties": false |
2128 | 2154 | } |
| 2155 | + }, |
| 2156 | + { |
| 2157 | + "if": { |
| 2158 | + "properties": { |
| 2159 | + "type": { |
| 2160 | + "const": "upload" |
| 2161 | + } |
| 2162 | + } |
| 2163 | + }, |
| 2164 | + "then": { |
| 2165 | + "$comment": "For `additionalProperties` to work `type` must also be present here.", |
| 2166 | + "title": "upload", |
| 2167 | + "description": "Upload\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#upload", |
| 2168 | + "type": "object", |
| 2169 | + "required": ["type", "attributes"], |
| 2170 | + "properties": { |
| 2171 | + "type": { |
| 2172 | + "$ref": "#/definitions/type" |
| 2173 | + }, |
| 2174 | + "id": { |
| 2175 | + "$ref": "#/definitions/id", |
| 2176 | + "description": "Upload id\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys" |
| 2177 | + }, |
| 2178 | + "attributes": { |
| 2179 | + "title": "upload attributes", |
| 2180 | + "description": "Upload attributes\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-for-upload", |
| 2181 | + "type": "object", |
| 2182 | + "required": ["label"], |
| 2183 | + "properties": { |
| 2184 | + "label": { |
| 2185 | + "$ref": "#/definitions/label", |
| 2186 | + "description": "A short upload description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-for-upload" |
| 2187 | + }, |
| 2188 | + "description": { |
| 2189 | + "$ref": "#/definitions/description", |
| 2190 | + "description": "A long upload description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-for-upload" |
| 2191 | + } |
| 2192 | + }, |
| 2193 | + "additionalProperties": false |
| 2194 | + }, |
| 2195 | + "validations": { |
| 2196 | + "$ref": "#/definitions/upload_validations" |
| 2197 | + } |
| 2198 | + }, |
| 2199 | + "additionalProperties": false |
| 2200 | + } |
2129 | 2201 | } |
2130 | 2202 | ] |
2131 | 2203 | } |
|
0 commit comments