@sveltia/cms 0.86.2 → 0.87.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -24
- package/dist/sveltia-cms.js +177 -177
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +184 -184
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +2 -1
- package/schema/sveltia-cms.json +4140 -0
|
@@ -0,0 +1,4140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/SiteConfig",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"SiteConfig": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"load_config_file": {
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"description": "Whether to load YAML/JSON site configuration file(s) when manually initializing the CMS. This works only in the `CMS.init()` method’s `config` option. Default: `true`."
|
|
11
|
+
},
|
|
12
|
+
"backend": {
|
|
13
|
+
"$ref": "#/definitions/BackendOptions",
|
|
14
|
+
"description": "Backend options."
|
|
15
|
+
},
|
|
16
|
+
"publish_mode": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": [
|
|
19
|
+
"simple",
|
|
20
|
+
"editorial_workflow",
|
|
21
|
+
""
|
|
22
|
+
],
|
|
23
|
+
"description": "Publish mode. An empty string is the same as `simple`. Default: `simple`."
|
|
24
|
+
},
|
|
25
|
+
"media_folder": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Global internal media folder path, relative to the project’s root directory."
|
|
28
|
+
},
|
|
29
|
+
"public_folder": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Global public media folder path, relative to the project’s public URL. It must be an absolute path starting with `/`. Default: `media_folder` option value."
|
|
32
|
+
},
|
|
33
|
+
"media_library": {
|
|
34
|
+
"anyOf": [
|
|
35
|
+
{
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"properties": {
|
|
39
|
+
"name": {
|
|
40
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
41
|
+
"description": "Library name."
|
|
42
|
+
},
|
|
43
|
+
"config": {
|
|
44
|
+
"$ref": "#/definitions/DefaultMediaLibraryConfig",
|
|
45
|
+
"description": "Configuration for the default media library."
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"name"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"properties": {
|
|
56
|
+
"name": {
|
|
57
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
58
|
+
"description": "Library name."
|
|
59
|
+
},
|
|
60
|
+
"output_filename_only": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"description": "Whether to output a file name instead of a full URL. Default: `false`."
|
|
63
|
+
},
|
|
64
|
+
"use_transformations": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"description": "Whether to include transformation segments in an output URL. Default: `true`."
|
|
67
|
+
},
|
|
68
|
+
"use_secure_url": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"description": "Whether to use an HTTP URL. Default: `true`."
|
|
71
|
+
},
|
|
72
|
+
"config": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"description": "Options to be passed to Uploadcare, such as `multiple`. The `cloud_name` and `api_key` options are required for the global `media_library` option. See https://cloudinary.com/documentation/media_library_widget#2_set_the_configuration_options for a full list of available options."
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"name"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"properties": {
|
|
85
|
+
"name": {
|
|
86
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
87
|
+
"description": "Library name."
|
|
88
|
+
},
|
|
89
|
+
"config": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"description": "Options to be passed to Uploadcare, such as `multiple`. The `publicKey` option is required for the global `media_library` option. See https://uploadcare.com/docs/uploads/file-uploader-options/ for a full list of available options."
|
|
92
|
+
},
|
|
93
|
+
"settings": {
|
|
94
|
+
"$ref": "#/definitions/UploadcareMediaLibrarySettings",
|
|
95
|
+
"description": "Integration settings."
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"required": [
|
|
99
|
+
"name"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"properties": {
|
|
106
|
+
"name": {
|
|
107
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
108
|
+
"description": "Library name."
|
|
109
|
+
},
|
|
110
|
+
"providers": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"$ref": "#/definitions/StockAssetProviderName"
|
|
114
|
+
},
|
|
115
|
+
"description": "Enabled stock photo/video providers. The stock photo/video section in the asset browser is hidden if an empty array is given. Default: all supported providers."
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": [
|
|
119
|
+
"name"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"description": "Legacy media library option that allows only one library. This overrides the global `media_library` option. Use `media_libraries` instead to support multiple libraries."
|
|
124
|
+
},
|
|
125
|
+
"media_libraries": {
|
|
126
|
+
"$ref": "#/definitions/MediaLibraries",
|
|
127
|
+
"description": "Unified media library option that supports multiple libraries."
|
|
128
|
+
},
|
|
129
|
+
"site_url": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "Site URL. Default: current site’s origin (`location.origin`)."
|
|
132
|
+
},
|
|
133
|
+
"display_url": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"description": "Site URL linked from the UI. Default: `site_url` option value."
|
|
136
|
+
},
|
|
137
|
+
"logo_url": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"description": "Absolute URL or absolute path to the site logo that will be displayed on the entrance page and the browser’s tab (favicon). A square image works best. Default: Sveltia logo."
|
|
140
|
+
},
|
|
141
|
+
"show_preview_links": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"description": "Whether to show site preview links. Default: `true`."
|
|
144
|
+
},
|
|
145
|
+
"slug": {
|
|
146
|
+
"$ref": "#/definitions/SlugOptions",
|
|
147
|
+
"description": "Entry slug options."
|
|
148
|
+
},
|
|
149
|
+
"collections": {
|
|
150
|
+
"type": "array",
|
|
151
|
+
"items": {
|
|
152
|
+
"$ref": "#/definitions/Collection"
|
|
153
|
+
},
|
|
154
|
+
"description": "Set of collections."
|
|
155
|
+
},
|
|
156
|
+
"singletons": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"$ref": "#/definitions/CollectionFile"
|
|
160
|
+
},
|
|
161
|
+
"description": "Set of singleton files, such as the site configuration file or the homepage file. They are not part of any collection and can be accessed directly through the collection list."
|
|
162
|
+
},
|
|
163
|
+
"i18n": {
|
|
164
|
+
"$ref": "#/definitions/I18nOptions",
|
|
165
|
+
"description": "Global i18n options."
|
|
166
|
+
},
|
|
167
|
+
"editor": {
|
|
168
|
+
"$ref": "#/definitions/EditorOptions",
|
|
169
|
+
"description": "Editor view options."
|
|
170
|
+
},
|
|
171
|
+
"output": {
|
|
172
|
+
"$ref": "#/definitions/OutputOptions",
|
|
173
|
+
"description": "Data output options."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": [
|
|
177
|
+
"backend",
|
|
178
|
+
"media_folder",
|
|
179
|
+
"collections"
|
|
180
|
+
],
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"description": "Site configuration."
|
|
183
|
+
},
|
|
184
|
+
"BackendOptions": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"properties": {
|
|
187
|
+
"name": {
|
|
188
|
+
"$ref": "#/definitions/BackendName",
|
|
189
|
+
"description": "Backend name."
|
|
190
|
+
},
|
|
191
|
+
"repo": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"description": "Repository identifier. Required for Git backends. GitHub/Gitea: organization/user name and repository name joined by a slash, e.g. `owner/repo`. GitLab: namespace and project name joined by a slash, e.g. `group/project` or `group/subgroup/project`."
|
|
194
|
+
},
|
|
195
|
+
"branch": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"description": "Git branch name. If omitted, the default branch, usually `main` or `master`, will be used. Git backends only."
|
|
198
|
+
},
|
|
199
|
+
"api_root": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"description": "REST API endpoint for the backend. Git backends only. Required when using GitHub Enterprise Server, a self-hosted GitLab/Gitea instance. Default: `https://api.github.com` (GitHub), `https://gitlab.com/api/v4` (GitLab) or `https://gitea.com/api/v1` (Gitea)."
|
|
202
|
+
},
|
|
203
|
+
"graphql_api_root": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"description": "GraphQL API endpoint for the backend. Git backends only. Default: inferred from `api_root` option value."
|
|
206
|
+
},
|
|
207
|
+
"site_domain": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Site domain used for OAuth, which will be included in the `site_id` param to be sent to the API endpoint. Git backends only. Default: `location.hostname`."
|
|
210
|
+
},
|
|
211
|
+
"base_url": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "OAuth base URL origin. Git backends only. Required when using an OAuth client other than Netlify, including Sveltia CMS Authenticator. Default: `https://api.netlify.com` (GitHub), `https://gitlab.com` (GitLab) or `https://gitea.com/` (Gitea)."
|
|
214
|
+
},
|
|
215
|
+
"auth_endpoint": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"description": "OAuth base URL path. Git backends only. Default: `auth` (GitHub) or `oauth/authorize` (GitLab)."
|
|
218
|
+
},
|
|
219
|
+
"auth_type": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"enum": [
|
|
222
|
+
"pkce",
|
|
223
|
+
"implicit"
|
|
224
|
+
],
|
|
225
|
+
"description": "OAuth authentication method. GitLab only. Default: `pkce`."
|
|
226
|
+
},
|
|
227
|
+
"app_id": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "OAuth application ID. GitLab and Gitea only. Required for Gitea."
|
|
230
|
+
},
|
|
231
|
+
"commit_messages": {
|
|
232
|
+
"$ref": "#/definitions/CommitMessages",
|
|
233
|
+
"description": "Custom commit messages. Git backends only."
|
|
234
|
+
},
|
|
235
|
+
"preview_context": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "Deploy preview link context. GitHub only."
|
|
238
|
+
},
|
|
239
|
+
"cms_label_prefix": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"description": "Pull request label prefix for Editorial Workflow. Git backends only. Default: `sveltia-cms/`."
|
|
242
|
+
},
|
|
243
|
+
"squash_merges": {
|
|
244
|
+
"type": "boolean",
|
|
245
|
+
"description": "Whether to use squash marge for Editorial Workflow. Git backends only. Default: `false`."
|
|
246
|
+
},
|
|
247
|
+
"open_authoring": {
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"description": "Whether to use Open Authoring. Git backends only. Default: `false`."
|
|
250
|
+
},
|
|
251
|
+
"auth_scope": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"enum": [
|
|
254
|
+
"repo",
|
|
255
|
+
"public_repo"
|
|
256
|
+
],
|
|
257
|
+
"description": "Authentication scope for Open Authoring. Git backends only."
|
|
258
|
+
},
|
|
259
|
+
"automatic_deployments": {
|
|
260
|
+
"type": "boolean",
|
|
261
|
+
"description": "Whether to enable or disable automatic deployments with any connected CI/CD provider, such as GitHub Actions or Cloudflare Pages. If `false`, the `[skip ci]` prefix will be added to commit messages. Git backends only. Default: undefined. See https://github.com/sveltia/sveltia-cms#disabling-automatic-deployments for details."
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"required": [
|
|
265
|
+
"name"
|
|
266
|
+
],
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"description": "Backend options."
|
|
269
|
+
},
|
|
270
|
+
"BackendName": {
|
|
271
|
+
"anyOf": [
|
|
272
|
+
{
|
|
273
|
+
"$ref": "#/definitions/GitBackendName"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "string",
|
|
277
|
+
"const": "test-repo"
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"description": "Supported backend name."
|
|
281
|
+
},
|
|
282
|
+
"GitBackendName": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"enum": [
|
|
285
|
+
"github",
|
|
286
|
+
"gitlab",
|
|
287
|
+
"gitea"
|
|
288
|
+
],
|
|
289
|
+
"description": "Supported Git backend name."
|
|
290
|
+
},
|
|
291
|
+
"CommitMessages": {
|
|
292
|
+
"type": "object",
|
|
293
|
+
"properties": {
|
|
294
|
+
"create": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"description": "Message to be used when a new entry is created."
|
|
297
|
+
},
|
|
298
|
+
"update": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"description": "Message to be used when existing entries are updated."
|
|
301
|
+
},
|
|
302
|
+
"delete": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"description": "Message to be used when existing entries are deleted."
|
|
305
|
+
},
|
|
306
|
+
"uploadMedia": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"description": "Message to be used when new files are uploaded/updated."
|
|
309
|
+
},
|
|
310
|
+
"deleteMedia": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"description": "Message to be used when existing files are deleted."
|
|
313
|
+
},
|
|
314
|
+
"openAuthoring": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"description": "Message to be used when committed via a forked repository."
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"additionalProperties": false,
|
|
320
|
+
"description": "Custom commit messages."
|
|
321
|
+
},
|
|
322
|
+
"MediaLibraryName": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"enum": [
|
|
325
|
+
"default",
|
|
326
|
+
"cloudinary",
|
|
327
|
+
"uploadcare",
|
|
328
|
+
"stock_assets"
|
|
329
|
+
],
|
|
330
|
+
"description": "Supported media library name."
|
|
331
|
+
},
|
|
332
|
+
"DefaultMediaLibraryConfig": {
|
|
333
|
+
"type": "object",
|
|
334
|
+
"properties": {
|
|
335
|
+
"max_file_size": {
|
|
336
|
+
"type": "number",
|
|
337
|
+
"description": "Maximum file size in bytes that can be accepted for uploading."
|
|
338
|
+
},
|
|
339
|
+
"slugify_filename": {
|
|
340
|
+
"type": "boolean",
|
|
341
|
+
"description": "Whether to rename an original asset file when saving it, according to the global `slug` option. Default: `false`, meaning that the original file name is kept by default, while Netlify/Decap CMS forces to slugify file names. If set to `true`, for example, `Hello World (1).webp` would be `hello-world-1.webp`."
|
|
342
|
+
},
|
|
343
|
+
"transformations": {
|
|
344
|
+
"$ref": "#/definitions/FileTransformations",
|
|
345
|
+
"description": "File transformation option map. The key is an original format like `png` or `jpeg`. It can also be `raster_image` that matches any supported raster image format."
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"additionalProperties": false,
|
|
349
|
+
"description": "Configuration for the default media library."
|
|
350
|
+
},
|
|
351
|
+
"FileTransformations": {
|
|
352
|
+
"$ref": "#/definitions/ImageTransformations",
|
|
353
|
+
"description": "File transformation option map."
|
|
354
|
+
},
|
|
355
|
+
"ImageTransformations": {
|
|
356
|
+
"type": "object",
|
|
357
|
+
"additionalProperties": {
|
|
358
|
+
"$ref": "#/definitions/RasterImageTransformationOptions"
|
|
359
|
+
},
|
|
360
|
+
"properties": {
|
|
361
|
+
"svg": {
|
|
362
|
+
"$ref": "#/definitions/VectorImageTransformationOptions"
|
|
363
|
+
},
|
|
364
|
+
"avif": {
|
|
365
|
+
"$ref": "#/definitions/RasterImageTransformationOptions"
|
|
366
|
+
},
|
|
367
|
+
"gif": {
|
|
368
|
+
"$ref": "#/definitions/RasterImageTransformationOptions"
|
|
369
|
+
},
|
|
370
|
+
"jpeg": {
|
|
371
|
+
"$ref": "#/definitions/RasterImageTransformationOptions"
|
|
372
|
+
},
|
|
373
|
+
"png": {
|
|
374
|
+
"$ref": "#/definitions/RasterImageTransformationOptions"
|
|
375
|
+
},
|
|
376
|
+
"webp": {
|
|
377
|
+
"$ref": "#/definitions/RasterImageTransformationOptions"
|
|
378
|
+
},
|
|
379
|
+
"raster_image": {
|
|
380
|
+
"$ref": "#/definitions/RasterImageTransformationOptions"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"required": [
|
|
384
|
+
"avif",
|
|
385
|
+
"gif",
|
|
386
|
+
"jpeg",
|
|
387
|
+
"png",
|
|
388
|
+
"raster_image",
|
|
389
|
+
"svg",
|
|
390
|
+
"webp"
|
|
391
|
+
],
|
|
392
|
+
"description": "Image transformation option map."
|
|
393
|
+
},
|
|
394
|
+
"VectorImageTransformationOptions": {
|
|
395
|
+
"type": "object",
|
|
396
|
+
"properties": {
|
|
397
|
+
"optimize": {
|
|
398
|
+
"type": "boolean",
|
|
399
|
+
"description": "Whether to optimize the image."
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"additionalProperties": false,
|
|
403
|
+
"description": "Vector image transformation option map."
|
|
404
|
+
},
|
|
405
|
+
"RasterImageTransformationOptions": {
|
|
406
|
+
"type": "object",
|
|
407
|
+
"properties": {
|
|
408
|
+
"format": {
|
|
409
|
+
"$ref": "#/definitions/RasterImageConversionFormat",
|
|
410
|
+
"description": "New format. Default: `webp`."
|
|
411
|
+
},
|
|
412
|
+
"quality": {
|
|
413
|
+
"type": "number",
|
|
414
|
+
"description": "Image quality between 0 and 100. Default: 85."
|
|
415
|
+
},
|
|
416
|
+
"width": {
|
|
417
|
+
"type": "number",
|
|
418
|
+
"description": "Max width. Default: original width."
|
|
419
|
+
},
|
|
420
|
+
"height": {
|
|
421
|
+
"type": "number",
|
|
422
|
+
"description": "Max height. Default: original height."
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"additionalProperties": false,
|
|
426
|
+
"description": "Raster image transformation options."
|
|
427
|
+
},
|
|
428
|
+
"RasterImageConversionFormat": {
|
|
429
|
+
"type": "string",
|
|
430
|
+
"const": "webp",
|
|
431
|
+
"description": "Supported raster image conversion format. We don’t support AVIF at this time because no browser supports AVIF encoding natively and `@jsquash/avif` is slow. Meanwhile, browsers other than Safari support WebP encoding and `@jsquash/webp` is relatively fast."
|
|
432
|
+
},
|
|
433
|
+
"UploadcareMediaLibrarySettings": {
|
|
434
|
+
"type": "object",
|
|
435
|
+
"properties": {
|
|
436
|
+
"autoFilename": {
|
|
437
|
+
"type": "boolean",
|
|
438
|
+
"description": "Whether to append a file name to an output URL. Default: `false`."
|
|
439
|
+
},
|
|
440
|
+
"defaultOperations": {
|
|
441
|
+
"type": "string",
|
|
442
|
+
"description": "Transformation operations to be included in an output URL. Default: empty string."
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
"additionalProperties": false,
|
|
446
|
+
"description": "Settings for the Uploadcare media library."
|
|
447
|
+
},
|
|
448
|
+
"StockAssetProviderName": {
|
|
449
|
+
"type": "string",
|
|
450
|
+
"enum": [
|
|
451
|
+
"pexels",
|
|
452
|
+
"pixabay",
|
|
453
|
+
"unsplash"
|
|
454
|
+
],
|
|
455
|
+
"description": "Name of supported stock photo/video provider."
|
|
456
|
+
},
|
|
457
|
+
"MediaLibraries": {
|
|
458
|
+
"type": "object",
|
|
459
|
+
"properties": {
|
|
460
|
+
"default": {
|
|
461
|
+
"$ref": "#/definitions/DefaultMediaLibrary",
|
|
462
|
+
"description": "Options for the default media library."
|
|
463
|
+
},
|
|
464
|
+
"cloudinary": {
|
|
465
|
+
"$ref": "#/definitions/CloudinaryMediaLibrary",
|
|
466
|
+
"description": "Options for the Cloudinary media library."
|
|
467
|
+
},
|
|
468
|
+
"uploadcare": {
|
|
469
|
+
"$ref": "#/definitions/UploadcareMediaLibrary",
|
|
470
|
+
"description": "Options for the Uploadcare media library."
|
|
471
|
+
},
|
|
472
|
+
"stock_assets": {
|
|
473
|
+
"$ref": "#/definitions/StockAssetMediaLibrary",
|
|
474
|
+
"description": "Options for the unified stock photo/video media library."
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
"additionalProperties": false,
|
|
478
|
+
"description": "Unified media library option that supports multiple libraries."
|
|
479
|
+
},
|
|
480
|
+
"DefaultMediaLibrary": {
|
|
481
|
+
"type": "object",
|
|
482
|
+
"properties": {
|
|
483
|
+
"config": {
|
|
484
|
+
"$ref": "#/definitions/DefaultMediaLibraryConfig",
|
|
485
|
+
"description": "Configuration for the default media library."
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
"additionalProperties": false,
|
|
489
|
+
"description": "Options for the default media library."
|
|
490
|
+
},
|
|
491
|
+
"CloudinaryMediaLibrary": {
|
|
492
|
+
"type": "object",
|
|
493
|
+
"properties": {
|
|
494
|
+
"output_filename_only": {
|
|
495
|
+
"type": "boolean",
|
|
496
|
+
"description": "Whether to output a file name instead of a full URL. Default: `false`."
|
|
497
|
+
},
|
|
498
|
+
"use_transformations": {
|
|
499
|
+
"type": "boolean",
|
|
500
|
+
"description": "Whether to include transformation segments in an output URL. Default: `true`."
|
|
501
|
+
},
|
|
502
|
+
"use_secure_url": {
|
|
503
|
+
"type": "boolean",
|
|
504
|
+
"description": "Whether to use an HTTP URL. Default: `true`."
|
|
505
|
+
},
|
|
506
|
+
"config": {
|
|
507
|
+
"type": "object",
|
|
508
|
+
"description": "Options to be passed to Uploadcare, such as `multiple`. The `cloud_name` and `api_key` options are required for the global `media_library` option. See https://cloudinary.com/documentation/media_library_widget#2_set_the_configuration_options for a full list of available options."
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
"additionalProperties": false,
|
|
512
|
+
"description": "Options for the Cloudinary media library."
|
|
513
|
+
},
|
|
514
|
+
"UploadcareMediaLibrary": {
|
|
515
|
+
"type": "object",
|
|
516
|
+
"properties": {
|
|
517
|
+
"config": {
|
|
518
|
+
"type": "object",
|
|
519
|
+
"description": "Options to be passed to Uploadcare, such as `multiple`. The `publicKey` option is required for the global `media_library` option. See https://uploadcare.com/docs/uploads/file-uploader-options/ for a full list of available options."
|
|
520
|
+
},
|
|
521
|
+
"settings": {
|
|
522
|
+
"$ref": "#/definitions/UploadcareMediaLibrarySettings",
|
|
523
|
+
"description": "Integration settings."
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"additionalProperties": false,
|
|
527
|
+
"description": "Options for the Uploadcare media library."
|
|
528
|
+
},
|
|
529
|
+
"StockAssetMediaLibrary": {
|
|
530
|
+
"type": "object",
|
|
531
|
+
"properties": {
|
|
532
|
+
"providers": {
|
|
533
|
+
"type": "array",
|
|
534
|
+
"items": {
|
|
535
|
+
"$ref": "#/definitions/StockAssetProviderName"
|
|
536
|
+
},
|
|
537
|
+
"description": "Enabled stock photo/video providers. The stock photo/video section in the asset browser is hidden if an empty array is given. Default: all supported providers."
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
"additionalProperties": false,
|
|
541
|
+
"description": "Options for the unified stock photo/video media library."
|
|
542
|
+
},
|
|
543
|
+
"SlugOptions": {
|
|
544
|
+
"type": "object",
|
|
545
|
+
"properties": {
|
|
546
|
+
"encoding": {
|
|
547
|
+
"type": "string",
|
|
548
|
+
"enum": [
|
|
549
|
+
"unicode",
|
|
550
|
+
"ascii"
|
|
551
|
+
],
|
|
552
|
+
"description": "Encoding option. Default: `unicode`."
|
|
553
|
+
},
|
|
554
|
+
"clean_accents": {
|
|
555
|
+
"type": "boolean",
|
|
556
|
+
"description": "Whether to remove accents. Default: `false`."
|
|
557
|
+
},
|
|
558
|
+
"sanitize_replacement": {
|
|
559
|
+
"type": "string",
|
|
560
|
+
"description": "String to replace sanitized characters. Default: `-`."
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
"additionalProperties": false,
|
|
564
|
+
"description": "Entry slug options."
|
|
565
|
+
},
|
|
566
|
+
"Collection": {
|
|
567
|
+
"type": "object",
|
|
568
|
+
"properties": {
|
|
569
|
+
"name": {
|
|
570
|
+
"type": "string",
|
|
571
|
+
"description": "Unique identifier for the collection."
|
|
572
|
+
},
|
|
573
|
+
"label": {
|
|
574
|
+
"type": "string",
|
|
575
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` option value."
|
|
576
|
+
},
|
|
577
|
+
"label_singular": {
|
|
578
|
+
"type": "string",
|
|
579
|
+
"description": "Singular UI label. It will be Blog Post if the `label` is Blog Posts, for example. Default: `label` option value."
|
|
580
|
+
},
|
|
581
|
+
"description": {
|
|
582
|
+
"type": "string",
|
|
583
|
+
"description": "Short description of the collection to be displayed in the editor UI."
|
|
584
|
+
},
|
|
585
|
+
"icon": {
|
|
586
|
+
"type": "string",
|
|
587
|
+
"description": "Name of a Material Symbols icon to be displayed in the collection list."
|
|
588
|
+
},
|
|
589
|
+
"identifier_field": {
|
|
590
|
+
"$ref": "#/definitions/FieldKeyPath",
|
|
591
|
+
"description": "Field name to be used as the title and slug of an entry. Entry collection only. Default: `title`."
|
|
592
|
+
},
|
|
593
|
+
"files": {
|
|
594
|
+
"type": "array",
|
|
595
|
+
"items": {
|
|
596
|
+
"$ref": "#/definitions/CollectionFile"
|
|
597
|
+
},
|
|
598
|
+
"description": "A set of files. File collection only."
|
|
599
|
+
},
|
|
600
|
+
"folder": {
|
|
601
|
+
"type": "string",
|
|
602
|
+
"description": "Base folder path relative to the project root. Entry collection only."
|
|
603
|
+
},
|
|
604
|
+
"fields": {
|
|
605
|
+
"type": "array",
|
|
606
|
+
"items": {
|
|
607
|
+
"$ref": "#/definitions/Field"
|
|
608
|
+
},
|
|
609
|
+
"description": "Set of fields to be included in entries. Entry collection only."
|
|
610
|
+
},
|
|
611
|
+
"path": {
|
|
612
|
+
"type": "string",
|
|
613
|
+
"description": "File path relative to `folder`, without a file extension. Entry collection only."
|
|
614
|
+
},
|
|
615
|
+
"media_folder": {
|
|
616
|
+
"type": "string",
|
|
617
|
+
"description": "Internal media folder path for the collection. This overrides the global `media_folder` option."
|
|
618
|
+
},
|
|
619
|
+
"public_folder": {
|
|
620
|
+
"type": "string",
|
|
621
|
+
"description": "Public media folder path for an entry collection. This overrides the global `public_folder` option. Default: `media_folder` option value."
|
|
622
|
+
},
|
|
623
|
+
"filter": {
|
|
624
|
+
"$ref": "#/definitions/CollectionFilter",
|
|
625
|
+
"description": "Entry filter. Entry collection only."
|
|
626
|
+
},
|
|
627
|
+
"hide": {
|
|
628
|
+
"type": "boolean",
|
|
629
|
+
"description": "Whether to hide the collection in the UI. Default: `false`."
|
|
630
|
+
},
|
|
631
|
+
"create": {
|
|
632
|
+
"type": "boolean",
|
|
633
|
+
"description": "Whether to allow users to create entries in the collection. Entry collection only. Default: `false`."
|
|
634
|
+
},
|
|
635
|
+
"delete": {
|
|
636
|
+
"type": "boolean",
|
|
637
|
+
"description": "Whether to allow users to delete entries in the collection. Entry collection only. Default: `true`."
|
|
638
|
+
},
|
|
639
|
+
"publish": {
|
|
640
|
+
"type": "boolean",
|
|
641
|
+
"description": "Whether to show the publishing control UI for Editorial Workflow. Default: `true`."
|
|
642
|
+
},
|
|
643
|
+
"extension": {
|
|
644
|
+
"$ref": "#/definitions/FileExtension",
|
|
645
|
+
"description": "File extension. Entry collection only. Default: `md`."
|
|
646
|
+
},
|
|
647
|
+
"format": {
|
|
648
|
+
"$ref": "#/definitions/FileFormat",
|
|
649
|
+
"description": "File format. It should match the file extension. Default: `yaml-frontmatter`."
|
|
650
|
+
},
|
|
651
|
+
"frontmatter_delimiter": {
|
|
652
|
+
"anyOf": [
|
|
653
|
+
{
|
|
654
|
+
"type": "string"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"type": "array",
|
|
658
|
+
"items": {
|
|
659
|
+
"type": "string"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
],
|
|
663
|
+
"description": "Delimiters to be used for the front matter format. Default: depends on the front matter type."
|
|
664
|
+
},
|
|
665
|
+
"slug": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"description": "Item slug template. Entry collection only. Default: `identifier_field` option value."
|
|
668
|
+
},
|
|
669
|
+
"slug_length": {
|
|
670
|
+
"type": "number",
|
|
671
|
+
"description": "The maximum number of characters allowed for an entry slug. Entry collection only. Default: infinity."
|
|
672
|
+
},
|
|
673
|
+
"summary": {
|
|
674
|
+
"type": "string",
|
|
675
|
+
"description": "Entry summary template. Entry collection only. Default: `identifier_field`."
|
|
676
|
+
},
|
|
677
|
+
"sortable_fields": {
|
|
678
|
+
"anyOf": [
|
|
679
|
+
{
|
|
680
|
+
"type": "array",
|
|
681
|
+
"items": {
|
|
682
|
+
"$ref": "#/definitions/FieldKeyPath"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"$ref": "#/definitions/SortableFields"
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
"description": "Custom sortable fields. Entry collection only. Default: `title`, `name`, `date`, `author` and `description`. For a Git backend, commit author and commit date are also included by default."
|
|
690
|
+
},
|
|
691
|
+
"view_filters": {
|
|
692
|
+
"type": "array",
|
|
693
|
+
"items": {
|
|
694
|
+
"$ref": "#/definitions/ViewFilter"
|
|
695
|
+
},
|
|
696
|
+
"description": "View filters to be used in the entry list. Entry collection only."
|
|
697
|
+
},
|
|
698
|
+
"view_groups": {
|
|
699
|
+
"type": "array",
|
|
700
|
+
"items": {
|
|
701
|
+
"$ref": "#/definitions/ViewGroup"
|
|
702
|
+
},
|
|
703
|
+
"description": "View groups to be used in the entry list. Entry collection only."
|
|
704
|
+
},
|
|
705
|
+
"i18n": {
|
|
706
|
+
"anyOf": [
|
|
707
|
+
{
|
|
708
|
+
"$ref": "#/definitions/I18nOptions"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"type": "boolean"
|
|
712
|
+
}
|
|
713
|
+
],
|
|
714
|
+
"description": "I18n options. Default: `false`."
|
|
715
|
+
},
|
|
716
|
+
"preview_path": {
|
|
717
|
+
"type": "string",
|
|
718
|
+
"description": "Preview URL path template."
|
|
719
|
+
},
|
|
720
|
+
"preview_path_date_field": {
|
|
721
|
+
"type": "string",
|
|
722
|
+
"description": "Date field name used for `preview_path`."
|
|
723
|
+
},
|
|
724
|
+
"editor": {
|
|
725
|
+
"$ref": "#/definitions/EditorOptions",
|
|
726
|
+
"description": "Editor view options."
|
|
727
|
+
},
|
|
728
|
+
"nested": {
|
|
729
|
+
"$ref": "#/definitions/NestedCollectionOptions",
|
|
730
|
+
"description": "Options for a nested collection. Entry collection only."
|
|
731
|
+
},
|
|
732
|
+
"meta": {
|
|
733
|
+
"$ref": "#/definitions/CollectionMetaData",
|
|
734
|
+
"description": "Meta data for a nested collection. Entry collection only."
|
|
735
|
+
},
|
|
736
|
+
"index_file": {
|
|
737
|
+
"anyOf": [
|
|
738
|
+
{
|
|
739
|
+
"$ref": "#/definitions/CollectionIndexFile"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"type": "boolean"
|
|
743
|
+
}
|
|
744
|
+
],
|
|
745
|
+
"description": "Index file inclusion options. Entry collection only. If `true`, the default index file name is `_index`, which is used for Hugo’s special index file."
|
|
746
|
+
},
|
|
747
|
+
"yaml_quote": {
|
|
748
|
+
"type": "boolean",
|
|
749
|
+
"description": "Whether to double-quote all the strings values if the YAML format is used for file output. Default: `false`. DEPRECATED in favor of the global YAML format options."
|
|
750
|
+
},
|
|
751
|
+
"divider": {
|
|
752
|
+
"type": "boolean",
|
|
753
|
+
"description": "A special option to make this collection a divider UI in the collection list. Default: `false`. If `true`, other options will be ignored, but you still have to provide a unique `name`."
|
|
754
|
+
},
|
|
755
|
+
"thumbnail": {
|
|
756
|
+
"anyOf": [
|
|
757
|
+
{
|
|
758
|
+
"$ref": "#/definitions/FieldKeyPath"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"type": "array",
|
|
762
|
+
"items": {
|
|
763
|
+
"$ref": "#/definitions/FieldKeyPath"
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
],
|
|
767
|
+
"description": "A field key path to be used to find an entry thumbnail displayed on the entry list. A nested field can be specified using dot notation, e.g. `heroImage.src`. A wildcard in the key path is also supported, e.g. `images.*.src`. Multiple key paths can be specified as an array for fallbacks. If this option is omitted, the `name` of any non-nested, non-empty field using the Image or File widget is used. Entry collection only."
|
|
768
|
+
},
|
|
769
|
+
"limit": {
|
|
770
|
+
"type": "number",
|
|
771
|
+
"description": "The maximum number of entries that can be created in the collection. Entry collection only. Default: infinity."
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
"required": [
|
|
775
|
+
"name"
|
|
776
|
+
],
|
|
777
|
+
"additionalProperties": false,
|
|
778
|
+
"description": "A raw collection defined in the configuration file. Note: In Sveltia CMS, a folder collection is called an entry collection."
|
|
779
|
+
},
|
|
780
|
+
"FieldKeyPath": {
|
|
781
|
+
"type": "string",
|
|
782
|
+
"description": "An entry field name. It can be written in dot notation like `author.name` if the field is nested with an Object field. For a List subfield, a wildcard can be used like `authors.*.name`. We call this a key path, which is derived from the IndexedDB API terminology, and use it everywhere, as entry data is managed as a flatten object for easier access."
|
|
783
|
+
},
|
|
784
|
+
"CollectionFile": {
|
|
785
|
+
"type": "object",
|
|
786
|
+
"properties": {
|
|
787
|
+
"name": {
|
|
788
|
+
"type": "string",
|
|
789
|
+
"description": "Unique identifier for the file."
|
|
790
|
+
},
|
|
791
|
+
"label": {
|
|
792
|
+
"type": "string",
|
|
793
|
+
"description": "Label to be displayed in the editor UI. Default: `name` option value."
|
|
794
|
+
},
|
|
795
|
+
"icon": {
|
|
796
|
+
"type": "string",
|
|
797
|
+
"description": "Name of a Material Symbols icon to be displayed in the collection file list and other places."
|
|
798
|
+
},
|
|
799
|
+
"file": {
|
|
800
|
+
"type": "string",
|
|
801
|
+
"description": "File path relative to the project root."
|
|
802
|
+
},
|
|
803
|
+
"fields": {
|
|
804
|
+
"type": "array",
|
|
805
|
+
"items": {
|
|
806
|
+
"$ref": "#/definitions/Field"
|
|
807
|
+
},
|
|
808
|
+
"description": "Set of fields to be included in the file."
|
|
809
|
+
},
|
|
810
|
+
"media_folder": {
|
|
811
|
+
"type": "string",
|
|
812
|
+
"description": "Internal media folder path for the collection. This overrides the global or collection-level `media_folder` option."
|
|
813
|
+
},
|
|
814
|
+
"public_folder": {
|
|
815
|
+
"type": "string",
|
|
816
|
+
"description": "Public media folder path for an entry collection. This overrides the global or collection-level `public_folder` option. Default: `media_folder` option value."
|
|
817
|
+
},
|
|
818
|
+
"format": {
|
|
819
|
+
"$ref": "#/definitions/FileFormat",
|
|
820
|
+
"description": "File format. This overrides the collection-level `format` option. Default: `yaml-frontmatter`."
|
|
821
|
+
},
|
|
822
|
+
"frontmatter_delimiter": {
|
|
823
|
+
"anyOf": [
|
|
824
|
+
{
|
|
825
|
+
"type": "string"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"type": "array",
|
|
829
|
+
"items": {
|
|
830
|
+
"type": "string"
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
],
|
|
834
|
+
"description": "Delimiters to be used for the front matter format. This overrides the collection-level `frontmatter_delimiter` option. Default: depends on the front matter type."
|
|
835
|
+
},
|
|
836
|
+
"i18n": {
|
|
837
|
+
"anyOf": [
|
|
838
|
+
{
|
|
839
|
+
"$ref": "#/definitions/I18nOptions"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"type": "boolean"
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
"description": "I18n options. Default: `false`."
|
|
846
|
+
},
|
|
847
|
+
"divider": {
|
|
848
|
+
"type": "boolean",
|
|
849
|
+
"description": "A special option to make this file a divider UI in the singleton file list. Default: `false`. Not supported in a file collection. If `true`, other options will be ignored, but you still have to provide a unique `name`."
|
|
850
|
+
},
|
|
851
|
+
"preview_path": {
|
|
852
|
+
"type": "string",
|
|
853
|
+
"description": "Preview URL path template."
|
|
854
|
+
},
|
|
855
|
+
"preview_path_date_field": {
|
|
856
|
+
"$ref": "#/definitions/FieldKeyPath",
|
|
857
|
+
"description": "Date field name used for `preview_path`."
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
"required": [
|
|
861
|
+
"name",
|
|
862
|
+
"file",
|
|
863
|
+
"fields"
|
|
864
|
+
],
|
|
865
|
+
"additionalProperties": false,
|
|
866
|
+
"description": "Single file in a file/singleton collection."
|
|
867
|
+
},
|
|
868
|
+
"Field": {
|
|
869
|
+
"anyOf": [
|
|
870
|
+
{
|
|
871
|
+
"$ref": "#/definitions/StandardField"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"$ref": "#/definitions/CustomField"
|
|
875
|
+
}
|
|
876
|
+
],
|
|
877
|
+
"description": "Entry field."
|
|
878
|
+
},
|
|
879
|
+
"StandardField": {
|
|
880
|
+
"anyOf": [
|
|
881
|
+
{
|
|
882
|
+
"$ref": "#/definitions/BooleanField"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"$ref": "#/definitions/CodeField"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"$ref": "#/definitions/ColorField"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"$ref": "#/definitions/ComputeField"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"$ref": "#/definitions/DateTimeField"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"$ref": "#/definitions/FileField"
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"$ref": "#/definitions/HiddenField"
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"$ref": "#/definitions/ImageField"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"$ref": "#/definitions/KeyValueField"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
"$ref": "#/definitions/ListField"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"$ref": "#/definitions/MapField"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"$ref": "#/definitions/MarkdownField"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"$ref": "#/definitions/NumberField"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"$ref": "#/definitions/ObjectField"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"$ref": "#/definitions/RelationField"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"$ref": "#/definitions/SelectField"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"$ref": "#/definitions/StringField"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
"$ref": "#/definitions/TextField"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"$ref": "#/definitions/UuidField"
|
|
937
|
+
}
|
|
938
|
+
],
|
|
939
|
+
"description": "Entry field using a built-in widget."
|
|
940
|
+
},
|
|
941
|
+
"BooleanField": {
|
|
942
|
+
"type": "object",
|
|
943
|
+
"additionalProperties": false,
|
|
944
|
+
"properties": {
|
|
945
|
+
"before_input": {
|
|
946
|
+
"type": "string",
|
|
947
|
+
"description": "An extra label to be displayed before the input UI. Markdown is supported. Default: empty string."
|
|
948
|
+
},
|
|
949
|
+
"after_input": {
|
|
950
|
+
"type": "string",
|
|
951
|
+
"description": "An extra label to be displayed after the input UI. Markdown is supported. Default: empty string."
|
|
952
|
+
},
|
|
953
|
+
"widget": {
|
|
954
|
+
"type": "string",
|
|
955
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
956
|
+
"const": "boolean"
|
|
957
|
+
},
|
|
958
|
+
"default": {
|
|
959
|
+
"type": "boolean",
|
|
960
|
+
"description": "Default value. Accepts `true` or `false`."
|
|
961
|
+
},
|
|
962
|
+
"name": {
|
|
963
|
+
"type": "string",
|
|
964
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
965
|
+
},
|
|
966
|
+
"label": {
|
|
967
|
+
"type": "string",
|
|
968
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
969
|
+
},
|
|
970
|
+
"comment": {
|
|
971
|
+
"type": "string",
|
|
972
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
973
|
+
},
|
|
974
|
+
"required": {
|
|
975
|
+
"anyOf": [
|
|
976
|
+
{
|
|
977
|
+
"type": "boolean"
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"type": "array",
|
|
981
|
+
"items": {
|
|
982
|
+
"$ref": "#/definitions/LocaleCode"
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
],
|
|
986
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
987
|
+
},
|
|
988
|
+
"readonly": {
|
|
989
|
+
"type": "boolean",
|
|
990
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
991
|
+
},
|
|
992
|
+
"pattern": {
|
|
993
|
+
"type": "array",
|
|
994
|
+
"minItems": 2,
|
|
995
|
+
"items": [
|
|
996
|
+
{
|
|
997
|
+
"anyOf": [
|
|
998
|
+
{
|
|
999
|
+
"type": "string"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"type": "string",
|
|
1003
|
+
"format": "regex"
|
|
1004
|
+
}
|
|
1005
|
+
]
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
"type": "string"
|
|
1009
|
+
}
|
|
1010
|
+
],
|
|
1011
|
+
"maxItems": 2,
|
|
1012
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
1013
|
+
},
|
|
1014
|
+
"hint": {
|
|
1015
|
+
"type": "string",
|
|
1016
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
1017
|
+
},
|
|
1018
|
+
"preview": {
|
|
1019
|
+
"type": "boolean",
|
|
1020
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
1021
|
+
},
|
|
1022
|
+
"i18n": {
|
|
1023
|
+
"anyOf": [
|
|
1024
|
+
{
|
|
1025
|
+
"type": "boolean"
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"type": "string",
|
|
1029
|
+
"const": "duplicate"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"type": "string",
|
|
1033
|
+
"const": "translate"
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"type": "string",
|
|
1037
|
+
"const": "none"
|
|
1038
|
+
}
|
|
1039
|
+
],
|
|
1040
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"required": [
|
|
1044
|
+
"name",
|
|
1045
|
+
"widget"
|
|
1046
|
+
],
|
|
1047
|
+
"description": "Boolean field definition."
|
|
1048
|
+
},
|
|
1049
|
+
"LocaleCode": {
|
|
1050
|
+
"type": "string",
|
|
1051
|
+
"description": "Standard IETF locale tag like `en` or `en-US`."
|
|
1052
|
+
},
|
|
1053
|
+
"CodeField": {
|
|
1054
|
+
"type": "object",
|
|
1055
|
+
"additionalProperties": false,
|
|
1056
|
+
"properties": {
|
|
1057
|
+
"widget": {
|
|
1058
|
+
"type": "string",
|
|
1059
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
1060
|
+
"const": "code"
|
|
1061
|
+
},
|
|
1062
|
+
"default": {
|
|
1063
|
+
"anyOf": [
|
|
1064
|
+
{
|
|
1065
|
+
"type": "string"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"type": "object",
|
|
1069
|
+
"additionalProperties": {
|
|
1070
|
+
"type": "string"
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
],
|
|
1074
|
+
"description": "Default value. It must be a string if `output_code_only` is `false`. Otherwise it must be an object that match the `keys` option."
|
|
1075
|
+
},
|
|
1076
|
+
"default_language": {
|
|
1077
|
+
"type": "string",
|
|
1078
|
+
"description": "Default language to be selected, like `js`. See https://prismjs.com/#supported-languages for a list of supported languages. Default: empty string, which is plaintext."
|
|
1079
|
+
},
|
|
1080
|
+
"allow_language_selection": {
|
|
1081
|
+
"type": "boolean",
|
|
1082
|
+
"description": "Whether to show a language switcher so that users can change the language mode. Default: `true` (the Decap CMS document is wrong)."
|
|
1083
|
+
},
|
|
1084
|
+
"output_code_only": {
|
|
1085
|
+
"type": "boolean",
|
|
1086
|
+
"description": "Whether to output code snippet only. Default: `false`."
|
|
1087
|
+
},
|
|
1088
|
+
"keys": {
|
|
1089
|
+
"type": "object",
|
|
1090
|
+
"properties": {
|
|
1091
|
+
"code": {
|
|
1092
|
+
"type": "string"
|
|
1093
|
+
},
|
|
1094
|
+
"lang": {
|
|
1095
|
+
"type": "string"
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
"required": [
|
|
1099
|
+
"code",
|
|
1100
|
+
"lang"
|
|
1101
|
+
],
|
|
1102
|
+
"additionalProperties": false,
|
|
1103
|
+
"description": "Output property names. It has no effect if `output_code_only` is `true`. Default: `{ code: 'code', lang: 'lang' }`."
|
|
1104
|
+
},
|
|
1105
|
+
"name": {
|
|
1106
|
+
"type": "string",
|
|
1107
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
1108
|
+
},
|
|
1109
|
+
"label": {
|
|
1110
|
+
"type": "string",
|
|
1111
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
1112
|
+
},
|
|
1113
|
+
"comment": {
|
|
1114
|
+
"type": "string",
|
|
1115
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
1116
|
+
},
|
|
1117
|
+
"required": {
|
|
1118
|
+
"anyOf": [
|
|
1119
|
+
{
|
|
1120
|
+
"type": "boolean"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"type": "array",
|
|
1124
|
+
"items": {
|
|
1125
|
+
"$ref": "#/definitions/LocaleCode"
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
],
|
|
1129
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
1130
|
+
},
|
|
1131
|
+
"readonly": {
|
|
1132
|
+
"type": "boolean",
|
|
1133
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
1134
|
+
},
|
|
1135
|
+
"pattern": {
|
|
1136
|
+
"type": "array",
|
|
1137
|
+
"minItems": 2,
|
|
1138
|
+
"items": [
|
|
1139
|
+
{
|
|
1140
|
+
"anyOf": [
|
|
1141
|
+
{
|
|
1142
|
+
"type": "string"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
"type": "string",
|
|
1146
|
+
"format": "regex"
|
|
1147
|
+
}
|
|
1148
|
+
]
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
"type": "string"
|
|
1152
|
+
}
|
|
1153
|
+
],
|
|
1154
|
+
"maxItems": 2,
|
|
1155
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
1156
|
+
},
|
|
1157
|
+
"hint": {
|
|
1158
|
+
"type": "string",
|
|
1159
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
1160
|
+
},
|
|
1161
|
+
"preview": {
|
|
1162
|
+
"type": "boolean",
|
|
1163
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
1164
|
+
},
|
|
1165
|
+
"i18n": {
|
|
1166
|
+
"anyOf": [
|
|
1167
|
+
{
|
|
1168
|
+
"type": "boolean"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"type": "string",
|
|
1172
|
+
"const": "duplicate"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
"type": "string",
|
|
1176
|
+
"const": "translate"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"type": "string",
|
|
1180
|
+
"const": "none"
|
|
1181
|
+
}
|
|
1182
|
+
],
|
|
1183
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
"required": [
|
|
1187
|
+
"name",
|
|
1188
|
+
"widget"
|
|
1189
|
+
],
|
|
1190
|
+
"description": "Code field definition."
|
|
1191
|
+
},
|
|
1192
|
+
"ColorField": {
|
|
1193
|
+
"type": "object",
|
|
1194
|
+
"additionalProperties": false,
|
|
1195
|
+
"properties": {
|
|
1196
|
+
"widget": {
|
|
1197
|
+
"type": "string",
|
|
1198
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
1199
|
+
"const": "color"
|
|
1200
|
+
},
|
|
1201
|
+
"default": {
|
|
1202
|
+
"type": "string",
|
|
1203
|
+
"description": "Default value. Accepts a Hex color code in the six-value (`#RRGGBB`) or eight-value (`#RRGGBBAA`) syntax."
|
|
1204
|
+
},
|
|
1205
|
+
"allowInput": {
|
|
1206
|
+
"type": "boolean",
|
|
1207
|
+
"description": "Whether to show a textbox that allows users to manually edit the value. Default: `false`."
|
|
1208
|
+
},
|
|
1209
|
+
"enableAlpha": {
|
|
1210
|
+
"type": "boolean",
|
|
1211
|
+
"description": "Whether to edit/save the alpha channel value. Default: `false`."
|
|
1212
|
+
},
|
|
1213
|
+
"name": {
|
|
1214
|
+
"type": "string",
|
|
1215
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
1216
|
+
},
|
|
1217
|
+
"label": {
|
|
1218
|
+
"type": "string",
|
|
1219
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
1220
|
+
},
|
|
1221
|
+
"comment": {
|
|
1222
|
+
"type": "string",
|
|
1223
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
1224
|
+
},
|
|
1225
|
+
"required": {
|
|
1226
|
+
"anyOf": [
|
|
1227
|
+
{
|
|
1228
|
+
"type": "boolean"
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"type": "array",
|
|
1232
|
+
"items": {
|
|
1233
|
+
"$ref": "#/definitions/LocaleCode"
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
],
|
|
1237
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
1238
|
+
},
|
|
1239
|
+
"readonly": {
|
|
1240
|
+
"type": "boolean",
|
|
1241
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
1242
|
+
},
|
|
1243
|
+
"pattern": {
|
|
1244
|
+
"type": "array",
|
|
1245
|
+
"minItems": 2,
|
|
1246
|
+
"items": [
|
|
1247
|
+
{
|
|
1248
|
+
"anyOf": [
|
|
1249
|
+
{
|
|
1250
|
+
"type": "string"
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"type": "string",
|
|
1254
|
+
"format": "regex"
|
|
1255
|
+
}
|
|
1256
|
+
]
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"type": "string"
|
|
1260
|
+
}
|
|
1261
|
+
],
|
|
1262
|
+
"maxItems": 2,
|
|
1263
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
1264
|
+
},
|
|
1265
|
+
"hint": {
|
|
1266
|
+
"type": "string",
|
|
1267
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
1268
|
+
},
|
|
1269
|
+
"preview": {
|
|
1270
|
+
"type": "boolean",
|
|
1271
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
1272
|
+
},
|
|
1273
|
+
"i18n": {
|
|
1274
|
+
"anyOf": [
|
|
1275
|
+
{
|
|
1276
|
+
"type": "boolean"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"type": "string",
|
|
1280
|
+
"const": "duplicate"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"type": "string",
|
|
1284
|
+
"const": "translate"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"type": "string",
|
|
1288
|
+
"const": "none"
|
|
1289
|
+
}
|
|
1290
|
+
],
|
|
1291
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
"required": [
|
|
1295
|
+
"name",
|
|
1296
|
+
"widget"
|
|
1297
|
+
],
|
|
1298
|
+
"description": "Color field definition."
|
|
1299
|
+
},
|
|
1300
|
+
"ComputeField": {
|
|
1301
|
+
"type": "object",
|
|
1302
|
+
"additionalProperties": false,
|
|
1303
|
+
"properties": {
|
|
1304
|
+
"widget": {
|
|
1305
|
+
"type": "string",
|
|
1306
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
1307
|
+
"const": "compute"
|
|
1308
|
+
},
|
|
1309
|
+
"value": {
|
|
1310
|
+
"type": "string",
|
|
1311
|
+
"description": "Value template, like `posts-{{fields.slug}}`."
|
|
1312
|
+
},
|
|
1313
|
+
"name": {
|
|
1314
|
+
"type": "string",
|
|
1315
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
1316
|
+
},
|
|
1317
|
+
"label": {
|
|
1318
|
+
"type": "string",
|
|
1319
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
1320
|
+
},
|
|
1321
|
+
"comment": {
|
|
1322
|
+
"type": "string",
|
|
1323
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
1324
|
+
},
|
|
1325
|
+
"required": {
|
|
1326
|
+
"anyOf": [
|
|
1327
|
+
{
|
|
1328
|
+
"type": "boolean"
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"type": "array",
|
|
1332
|
+
"items": {
|
|
1333
|
+
"$ref": "#/definitions/LocaleCode"
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
],
|
|
1337
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
1338
|
+
},
|
|
1339
|
+
"readonly": {
|
|
1340
|
+
"type": "boolean",
|
|
1341
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
1342
|
+
},
|
|
1343
|
+
"pattern": {
|
|
1344
|
+
"type": "array",
|
|
1345
|
+
"minItems": 2,
|
|
1346
|
+
"items": [
|
|
1347
|
+
{
|
|
1348
|
+
"anyOf": [
|
|
1349
|
+
{
|
|
1350
|
+
"type": "string"
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"type": "string",
|
|
1354
|
+
"format": "regex"
|
|
1355
|
+
}
|
|
1356
|
+
]
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"type": "string"
|
|
1360
|
+
}
|
|
1361
|
+
],
|
|
1362
|
+
"maxItems": 2,
|
|
1363
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
1364
|
+
},
|
|
1365
|
+
"hint": {
|
|
1366
|
+
"type": "string",
|
|
1367
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
1368
|
+
},
|
|
1369
|
+
"preview": {
|
|
1370
|
+
"type": "boolean",
|
|
1371
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
1372
|
+
},
|
|
1373
|
+
"i18n": {
|
|
1374
|
+
"anyOf": [
|
|
1375
|
+
{
|
|
1376
|
+
"type": "boolean"
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
"type": "string",
|
|
1380
|
+
"const": "duplicate"
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
"type": "string",
|
|
1384
|
+
"const": "translate"
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"type": "string",
|
|
1388
|
+
"const": "none"
|
|
1389
|
+
}
|
|
1390
|
+
],
|
|
1391
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
"required": [
|
|
1395
|
+
"name",
|
|
1396
|
+
"value",
|
|
1397
|
+
"widget"
|
|
1398
|
+
],
|
|
1399
|
+
"description": "Compute field definition."
|
|
1400
|
+
},
|
|
1401
|
+
"DateTimeField": {
|
|
1402
|
+
"type": "object",
|
|
1403
|
+
"additionalProperties": false,
|
|
1404
|
+
"properties": {
|
|
1405
|
+
"widget": {
|
|
1406
|
+
"type": "string",
|
|
1407
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
1408
|
+
"const": "datetime"
|
|
1409
|
+
},
|
|
1410
|
+
"default": {
|
|
1411
|
+
"type": "string",
|
|
1412
|
+
"description": "Default value. Accepts a date/time string that matches the `format`, or `{{now}}` to populate the current date/time. Default: empty string."
|
|
1413
|
+
},
|
|
1414
|
+
"format": {
|
|
1415
|
+
"type": "string",
|
|
1416
|
+
"description": "Storage format written in Moment.js tokens. See https://momentjs.com/docs/#/displaying/format/ for supported tokens. Default: ISO 8601 format."
|
|
1417
|
+
},
|
|
1418
|
+
"date_format": {
|
|
1419
|
+
"type": [
|
|
1420
|
+
"string",
|
|
1421
|
+
"boolean"
|
|
1422
|
+
],
|
|
1423
|
+
"description": "Date storage format written in Moment.js tokens if the value is a string and the `format` option is not defined. If `true`, ISO 8601 format is used unless the `format` option is defined. If `false`, date input/output is disabled."
|
|
1424
|
+
},
|
|
1425
|
+
"time_format": {
|
|
1426
|
+
"type": [
|
|
1427
|
+
"string",
|
|
1428
|
+
"boolean"
|
|
1429
|
+
],
|
|
1430
|
+
"description": "Time storage format written in Moment.js tokens if the value is a string and the `format` option is not defined. If `true`, ISO 8601 format is used unless the `format` option is defined. If `false`, time input/output is disabled."
|
|
1431
|
+
},
|
|
1432
|
+
"picker_utc": {
|
|
1433
|
+
"type": "boolean",
|
|
1434
|
+
"description": "Whether to make the date input/output UTC. Default: `false`."
|
|
1435
|
+
},
|
|
1436
|
+
"name": {
|
|
1437
|
+
"type": "string",
|
|
1438
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
1439
|
+
},
|
|
1440
|
+
"label": {
|
|
1441
|
+
"type": "string",
|
|
1442
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
1443
|
+
},
|
|
1444
|
+
"comment": {
|
|
1445
|
+
"type": "string",
|
|
1446
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
1447
|
+
},
|
|
1448
|
+
"required": {
|
|
1449
|
+
"anyOf": [
|
|
1450
|
+
{
|
|
1451
|
+
"type": "boolean"
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
"type": "array",
|
|
1455
|
+
"items": {
|
|
1456
|
+
"$ref": "#/definitions/LocaleCode"
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
],
|
|
1460
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
1461
|
+
},
|
|
1462
|
+
"readonly": {
|
|
1463
|
+
"type": "boolean",
|
|
1464
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
1465
|
+
},
|
|
1466
|
+
"pattern": {
|
|
1467
|
+
"type": "array",
|
|
1468
|
+
"minItems": 2,
|
|
1469
|
+
"items": [
|
|
1470
|
+
{
|
|
1471
|
+
"anyOf": [
|
|
1472
|
+
{
|
|
1473
|
+
"type": "string"
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
"type": "string",
|
|
1477
|
+
"format": "regex"
|
|
1478
|
+
}
|
|
1479
|
+
]
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
"type": "string"
|
|
1483
|
+
}
|
|
1484
|
+
],
|
|
1485
|
+
"maxItems": 2,
|
|
1486
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
1487
|
+
},
|
|
1488
|
+
"hint": {
|
|
1489
|
+
"type": "string",
|
|
1490
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
1491
|
+
},
|
|
1492
|
+
"preview": {
|
|
1493
|
+
"type": "boolean",
|
|
1494
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
1495
|
+
},
|
|
1496
|
+
"i18n": {
|
|
1497
|
+
"anyOf": [
|
|
1498
|
+
{
|
|
1499
|
+
"type": "boolean"
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"type": "string",
|
|
1503
|
+
"const": "duplicate"
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
"type": "string",
|
|
1507
|
+
"const": "translate"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"type": "string",
|
|
1511
|
+
"const": "none"
|
|
1512
|
+
}
|
|
1513
|
+
],
|
|
1514
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
"required": [
|
|
1518
|
+
"name",
|
|
1519
|
+
"widget"
|
|
1520
|
+
],
|
|
1521
|
+
"description": "DateTime field definition."
|
|
1522
|
+
},
|
|
1523
|
+
"FileField": {
|
|
1524
|
+
"type": "object",
|
|
1525
|
+
"additionalProperties": false,
|
|
1526
|
+
"properties": {
|
|
1527
|
+
"widget": {
|
|
1528
|
+
"type": "string",
|
|
1529
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
1530
|
+
"const": "file"
|
|
1531
|
+
},
|
|
1532
|
+
"default": {
|
|
1533
|
+
"type": "string",
|
|
1534
|
+
"description": "Default value. Accepts a file path or complete URL."
|
|
1535
|
+
},
|
|
1536
|
+
"accept": {
|
|
1537
|
+
"type": "string",
|
|
1538
|
+
"description": "File types that the field should accept. The value would be a comma-separated list of unique file type specifiers, the format used for the HTML `accept` attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept."
|
|
1539
|
+
},
|
|
1540
|
+
"choose_url": {
|
|
1541
|
+
"type": "boolean",
|
|
1542
|
+
"description": "Whether to show the URL input UI. Default: `true`."
|
|
1543
|
+
},
|
|
1544
|
+
"media_folder": {
|
|
1545
|
+
"type": "string",
|
|
1546
|
+
"description": "Internal media folder path for the field. Default: global or collection-level `media_folder` value."
|
|
1547
|
+
},
|
|
1548
|
+
"public_folder": {
|
|
1549
|
+
"type": "string",
|
|
1550
|
+
"description": "Public media folder path for the field. Default: `media_folder` option value."
|
|
1551
|
+
},
|
|
1552
|
+
"media_library": {
|
|
1553
|
+
"anyOf": [
|
|
1554
|
+
{
|
|
1555
|
+
"type": "object",
|
|
1556
|
+
"additionalProperties": false,
|
|
1557
|
+
"properties": {
|
|
1558
|
+
"name": {
|
|
1559
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
1560
|
+
"description": "Library name."
|
|
1561
|
+
},
|
|
1562
|
+
"config": {
|
|
1563
|
+
"$ref": "#/definitions/DefaultMediaLibraryConfig",
|
|
1564
|
+
"description": "Configuration for the default media library."
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
"type": "object",
|
|
1570
|
+
"additionalProperties": false,
|
|
1571
|
+
"properties": {
|
|
1572
|
+
"name": {
|
|
1573
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
1574
|
+
"description": "Library name."
|
|
1575
|
+
},
|
|
1576
|
+
"output_filename_only": {
|
|
1577
|
+
"type": "boolean",
|
|
1578
|
+
"description": "Whether to output a file name instead of a full URL. Default: `false`."
|
|
1579
|
+
},
|
|
1580
|
+
"use_transformations": {
|
|
1581
|
+
"type": "boolean",
|
|
1582
|
+
"description": "Whether to include transformation segments in an output URL. Default: `true`."
|
|
1583
|
+
},
|
|
1584
|
+
"use_secure_url": {
|
|
1585
|
+
"type": "boolean",
|
|
1586
|
+
"description": "Whether to use an HTTP URL. Default: `true`."
|
|
1587
|
+
},
|
|
1588
|
+
"config": {
|
|
1589
|
+
"type": "object",
|
|
1590
|
+
"description": "Options to be passed to Uploadcare, such as `multiple`. The `cloud_name` and `api_key` options are required for the global `media_library` option. See https://cloudinary.com/documentation/media_library_widget#2_set_the_configuration_options for a full list of available options."
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
"type": "object",
|
|
1596
|
+
"additionalProperties": false,
|
|
1597
|
+
"properties": {
|
|
1598
|
+
"name": {
|
|
1599
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
1600
|
+
"description": "Library name."
|
|
1601
|
+
},
|
|
1602
|
+
"config": {
|
|
1603
|
+
"type": "object",
|
|
1604
|
+
"description": "Options to be passed to Uploadcare, such as `multiple`. The `publicKey` option is required for the global `media_library` option. See https://uploadcare.com/docs/uploads/file-uploader-options/ for a full list of available options."
|
|
1605
|
+
},
|
|
1606
|
+
"settings": {
|
|
1607
|
+
"$ref": "#/definitions/UploadcareMediaLibrarySettings",
|
|
1608
|
+
"description": "Integration settings."
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
"type": "object",
|
|
1614
|
+
"additionalProperties": false,
|
|
1615
|
+
"properties": {
|
|
1616
|
+
"name": {
|
|
1617
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
1618
|
+
"description": "Library name."
|
|
1619
|
+
},
|
|
1620
|
+
"providers": {
|
|
1621
|
+
"type": "array",
|
|
1622
|
+
"items": {
|
|
1623
|
+
"$ref": "#/definitions/StockAssetProviderName"
|
|
1624
|
+
},
|
|
1625
|
+
"description": "Enabled stock photo/video providers. The stock photo/video section in the asset browser is hidden if an empty array is given. Default: all supported providers."
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
],
|
|
1630
|
+
"description": "Legacy media library option that allows only one library. This overrides the global `media_library` option. Use `media_libraries` instead to support multiple libraries."
|
|
1631
|
+
},
|
|
1632
|
+
"media_libraries": {
|
|
1633
|
+
"$ref": "#/definitions/MediaLibraries",
|
|
1634
|
+
"description": "Unified media library option that supports multiple libraries. This overrides the global `media_libraries` option."
|
|
1635
|
+
},
|
|
1636
|
+
"allow_multiple": {
|
|
1637
|
+
"type": "boolean",
|
|
1638
|
+
"description": "Whether to enable multiple item selection in an external media library. Default: `true`."
|
|
1639
|
+
},
|
|
1640
|
+
"name": {
|
|
1641
|
+
"type": "string",
|
|
1642
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
1643
|
+
},
|
|
1644
|
+
"label": {
|
|
1645
|
+
"type": "string",
|
|
1646
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
1647
|
+
},
|
|
1648
|
+
"comment": {
|
|
1649
|
+
"type": "string",
|
|
1650
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
1651
|
+
},
|
|
1652
|
+
"required": {
|
|
1653
|
+
"anyOf": [
|
|
1654
|
+
{
|
|
1655
|
+
"type": "boolean"
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
"type": "array",
|
|
1659
|
+
"items": {
|
|
1660
|
+
"$ref": "#/definitions/LocaleCode"
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
],
|
|
1664
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
1665
|
+
},
|
|
1666
|
+
"readonly": {
|
|
1667
|
+
"type": "boolean",
|
|
1668
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
1669
|
+
},
|
|
1670
|
+
"pattern": {
|
|
1671
|
+
"type": "array",
|
|
1672
|
+
"minItems": 2,
|
|
1673
|
+
"items": [
|
|
1674
|
+
{
|
|
1675
|
+
"anyOf": [
|
|
1676
|
+
{
|
|
1677
|
+
"type": "string"
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
"type": "string",
|
|
1681
|
+
"format": "regex"
|
|
1682
|
+
}
|
|
1683
|
+
]
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
"type": "string"
|
|
1687
|
+
}
|
|
1688
|
+
],
|
|
1689
|
+
"maxItems": 2,
|
|
1690
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
1691
|
+
},
|
|
1692
|
+
"hint": {
|
|
1693
|
+
"type": "string",
|
|
1694
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
1695
|
+
},
|
|
1696
|
+
"preview": {
|
|
1697
|
+
"type": "boolean",
|
|
1698
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
1699
|
+
},
|
|
1700
|
+
"i18n": {
|
|
1701
|
+
"anyOf": [
|
|
1702
|
+
{
|
|
1703
|
+
"type": "boolean"
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
"type": "string",
|
|
1707
|
+
"const": "duplicate"
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"type": "string",
|
|
1711
|
+
"const": "translate"
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"type": "string",
|
|
1715
|
+
"const": "none"
|
|
1716
|
+
}
|
|
1717
|
+
],
|
|
1718
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
1719
|
+
}
|
|
1720
|
+
},
|
|
1721
|
+
"required": [
|
|
1722
|
+
"name",
|
|
1723
|
+
"widget"
|
|
1724
|
+
],
|
|
1725
|
+
"description": "File field definition."
|
|
1726
|
+
},
|
|
1727
|
+
"HiddenField": {
|
|
1728
|
+
"type": "object",
|
|
1729
|
+
"additionalProperties": false,
|
|
1730
|
+
"properties": {
|
|
1731
|
+
"widget": {
|
|
1732
|
+
"type": "string",
|
|
1733
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
1734
|
+
"const": "hidden"
|
|
1735
|
+
},
|
|
1736
|
+
"default": {
|
|
1737
|
+
"description": "Default value. Accepts any data type that can be stored with the configured file format."
|
|
1738
|
+
},
|
|
1739
|
+
"name": {
|
|
1740
|
+
"type": "string",
|
|
1741
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
1742
|
+
},
|
|
1743
|
+
"label": {
|
|
1744
|
+
"type": "string",
|
|
1745
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
1746
|
+
},
|
|
1747
|
+
"comment": {
|
|
1748
|
+
"type": "string",
|
|
1749
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
1750
|
+
},
|
|
1751
|
+
"required": {
|
|
1752
|
+
"anyOf": [
|
|
1753
|
+
{
|
|
1754
|
+
"type": "boolean"
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
"type": "array",
|
|
1758
|
+
"items": {
|
|
1759
|
+
"$ref": "#/definitions/LocaleCode"
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
],
|
|
1763
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
1764
|
+
},
|
|
1765
|
+
"readonly": {
|
|
1766
|
+
"type": "boolean",
|
|
1767
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
1768
|
+
},
|
|
1769
|
+
"pattern": {
|
|
1770
|
+
"type": "array",
|
|
1771
|
+
"minItems": 2,
|
|
1772
|
+
"items": [
|
|
1773
|
+
{
|
|
1774
|
+
"anyOf": [
|
|
1775
|
+
{
|
|
1776
|
+
"type": "string"
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
"type": "string",
|
|
1780
|
+
"format": "regex"
|
|
1781
|
+
}
|
|
1782
|
+
]
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
"type": "string"
|
|
1786
|
+
}
|
|
1787
|
+
],
|
|
1788
|
+
"maxItems": 2,
|
|
1789
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
1790
|
+
},
|
|
1791
|
+
"hint": {
|
|
1792
|
+
"type": "string",
|
|
1793
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
1794
|
+
},
|
|
1795
|
+
"preview": {
|
|
1796
|
+
"type": "boolean",
|
|
1797
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
1798
|
+
},
|
|
1799
|
+
"i18n": {
|
|
1800
|
+
"anyOf": [
|
|
1801
|
+
{
|
|
1802
|
+
"type": "boolean"
|
|
1803
|
+
},
|
|
1804
|
+
{
|
|
1805
|
+
"type": "string",
|
|
1806
|
+
"const": "duplicate"
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
"type": "string",
|
|
1810
|
+
"const": "translate"
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
"type": "string",
|
|
1814
|
+
"const": "none"
|
|
1815
|
+
}
|
|
1816
|
+
],
|
|
1817
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
1818
|
+
}
|
|
1819
|
+
},
|
|
1820
|
+
"required": [
|
|
1821
|
+
"name",
|
|
1822
|
+
"widget"
|
|
1823
|
+
],
|
|
1824
|
+
"description": "Hidden field definition."
|
|
1825
|
+
},
|
|
1826
|
+
"ImageField": {
|
|
1827
|
+
"type": "object",
|
|
1828
|
+
"additionalProperties": false,
|
|
1829
|
+
"properties": {
|
|
1830
|
+
"widget": {
|
|
1831
|
+
"type": "string",
|
|
1832
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
1833
|
+
"const": "image"
|
|
1834
|
+
},
|
|
1835
|
+
"default": {
|
|
1836
|
+
"type": "string",
|
|
1837
|
+
"description": "Default value. Accepts a file path or complete URL."
|
|
1838
|
+
},
|
|
1839
|
+
"accept": {
|
|
1840
|
+
"type": "string",
|
|
1841
|
+
"description": "File types that the field should accept. The value would be a comma-separated list of unique file type specifiers, the format used for the HTML `accept` attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept."
|
|
1842
|
+
},
|
|
1843
|
+
"choose_url": {
|
|
1844
|
+
"type": "boolean",
|
|
1845
|
+
"description": "Whether to show the URL input UI. Default: `true`."
|
|
1846
|
+
},
|
|
1847
|
+
"media_folder": {
|
|
1848
|
+
"type": "string",
|
|
1849
|
+
"description": "Internal media folder path for the field. Default: global or collection-level `media_folder` value."
|
|
1850
|
+
},
|
|
1851
|
+
"public_folder": {
|
|
1852
|
+
"type": "string",
|
|
1853
|
+
"description": "Public media folder path for the field. Default: `media_folder` option value."
|
|
1854
|
+
},
|
|
1855
|
+
"media_library": {
|
|
1856
|
+
"anyOf": [
|
|
1857
|
+
{
|
|
1858
|
+
"type": "object",
|
|
1859
|
+
"additionalProperties": false,
|
|
1860
|
+
"properties": {
|
|
1861
|
+
"name": {
|
|
1862
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
1863
|
+
"description": "Library name."
|
|
1864
|
+
},
|
|
1865
|
+
"config": {
|
|
1866
|
+
"$ref": "#/definitions/DefaultMediaLibraryConfig",
|
|
1867
|
+
"description": "Configuration for the default media library."
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
"type": "object",
|
|
1873
|
+
"additionalProperties": false,
|
|
1874
|
+
"properties": {
|
|
1875
|
+
"name": {
|
|
1876
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
1877
|
+
"description": "Library name."
|
|
1878
|
+
},
|
|
1879
|
+
"output_filename_only": {
|
|
1880
|
+
"type": "boolean",
|
|
1881
|
+
"description": "Whether to output a file name instead of a full URL. Default: `false`."
|
|
1882
|
+
},
|
|
1883
|
+
"use_transformations": {
|
|
1884
|
+
"type": "boolean",
|
|
1885
|
+
"description": "Whether to include transformation segments in an output URL. Default: `true`."
|
|
1886
|
+
},
|
|
1887
|
+
"use_secure_url": {
|
|
1888
|
+
"type": "boolean",
|
|
1889
|
+
"description": "Whether to use an HTTP URL. Default: `true`."
|
|
1890
|
+
},
|
|
1891
|
+
"config": {
|
|
1892
|
+
"type": "object",
|
|
1893
|
+
"description": "Options to be passed to Uploadcare, such as `multiple`. The `cloud_name` and `api_key` options are required for the global `media_library` option. See https://cloudinary.com/documentation/media_library_widget#2_set_the_configuration_options for a full list of available options."
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
"type": "object",
|
|
1899
|
+
"additionalProperties": false,
|
|
1900
|
+
"properties": {
|
|
1901
|
+
"name": {
|
|
1902
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
1903
|
+
"description": "Library name."
|
|
1904
|
+
},
|
|
1905
|
+
"config": {
|
|
1906
|
+
"type": "object",
|
|
1907
|
+
"description": "Options to be passed to Uploadcare, such as `multiple`. The `publicKey` option is required for the global `media_library` option. See https://uploadcare.com/docs/uploads/file-uploader-options/ for a full list of available options."
|
|
1908
|
+
},
|
|
1909
|
+
"settings": {
|
|
1910
|
+
"$ref": "#/definitions/UploadcareMediaLibrarySettings",
|
|
1911
|
+
"description": "Integration settings."
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1915
|
+
{
|
|
1916
|
+
"type": "object",
|
|
1917
|
+
"additionalProperties": false,
|
|
1918
|
+
"properties": {
|
|
1919
|
+
"name": {
|
|
1920
|
+
"$ref": "#/definitions/MediaLibraryName",
|
|
1921
|
+
"description": "Library name."
|
|
1922
|
+
},
|
|
1923
|
+
"providers": {
|
|
1924
|
+
"type": "array",
|
|
1925
|
+
"items": {
|
|
1926
|
+
"$ref": "#/definitions/StockAssetProviderName"
|
|
1927
|
+
},
|
|
1928
|
+
"description": "Enabled stock photo/video providers. The stock photo/video section in the asset browser is hidden if an empty array is given. Default: all supported providers."
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
],
|
|
1933
|
+
"description": "Legacy media library option that allows only one library. This overrides the global `media_library` option. Use `media_libraries` instead to support multiple libraries."
|
|
1934
|
+
},
|
|
1935
|
+
"media_libraries": {
|
|
1936
|
+
"$ref": "#/definitions/MediaLibraries",
|
|
1937
|
+
"description": "Unified media library option that supports multiple libraries. This overrides the global `media_libraries` option."
|
|
1938
|
+
},
|
|
1939
|
+
"allow_multiple": {
|
|
1940
|
+
"type": "boolean",
|
|
1941
|
+
"description": "Whether to enable multiple item selection in an external media library. Default: `true`."
|
|
1942
|
+
},
|
|
1943
|
+
"name": {
|
|
1944
|
+
"type": "string",
|
|
1945
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
1946
|
+
},
|
|
1947
|
+
"label": {
|
|
1948
|
+
"type": "string",
|
|
1949
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
1950
|
+
},
|
|
1951
|
+
"comment": {
|
|
1952
|
+
"type": "string",
|
|
1953
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
1954
|
+
},
|
|
1955
|
+
"required": {
|
|
1956
|
+
"anyOf": [
|
|
1957
|
+
{
|
|
1958
|
+
"type": "boolean"
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
"type": "array",
|
|
1962
|
+
"items": {
|
|
1963
|
+
"$ref": "#/definitions/LocaleCode"
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
],
|
|
1967
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
1968
|
+
},
|
|
1969
|
+
"readonly": {
|
|
1970
|
+
"type": "boolean",
|
|
1971
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
1972
|
+
},
|
|
1973
|
+
"pattern": {
|
|
1974
|
+
"type": "array",
|
|
1975
|
+
"minItems": 2,
|
|
1976
|
+
"items": [
|
|
1977
|
+
{
|
|
1978
|
+
"anyOf": [
|
|
1979
|
+
{
|
|
1980
|
+
"type": "string"
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
"type": "string",
|
|
1984
|
+
"format": "regex"
|
|
1985
|
+
}
|
|
1986
|
+
]
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
"type": "string"
|
|
1990
|
+
}
|
|
1991
|
+
],
|
|
1992
|
+
"maxItems": 2,
|
|
1993
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
1994
|
+
},
|
|
1995
|
+
"hint": {
|
|
1996
|
+
"type": "string",
|
|
1997
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
1998
|
+
},
|
|
1999
|
+
"preview": {
|
|
2000
|
+
"type": "boolean",
|
|
2001
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
2002
|
+
},
|
|
2003
|
+
"i18n": {
|
|
2004
|
+
"anyOf": [
|
|
2005
|
+
{
|
|
2006
|
+
"type": "boolean"
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
"type": "string",
|
|
2010
|
+
"const": "duplicate"
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
"type": "string",
|
|
2014
|
+
"const": "translate"
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
"type": "string",
|
|
2018
|
+
"const": "none"
|
|
2019
|
+
}
|
|
2020
|
+
],
|
|
2021
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
2022
|
+
}
|
|
2023
|
+
},
|
|
2024
|
+
"required": [
|
|
2025
|
+
"name",
|
|
2026
|
+
"widget"
|
|
2027
|
+
],
|
|
2028
|
+
"description": "Image field definition."
|
|
2029
|
+
},
|
|
2030
|
+
"KeyValueField": {
|
|
2031
|
+
"type": "object",
|
|
2032
|
+
"additionalProperties": false,
|
|
2033
|
+
"properties": {
|
|
2034
|
+
"min": {
|
|
2035
|
+
"type": "number",
|
|
2036
|
+
"description": "Minimum number of items that can be added. Default: 0."
|
|
2037
|
+
},
|
|
2038
|
+
"max": {
|
|
2039
|
+
"type": "number",
|
|
2040
|
+
"description": "Maximum number of items that can be added. Default: infinity."
|
|
2041
|
+
},
|
|
2042
|
+
"widget": {
|
|
2043
|
+
"type": "string",
|
|
2044
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
2045
|
+
"const": "keyvalue"
|
|
2046
|
+
},
|
|
2047
|
+
"default": {
|
|
2048
|
+
"type": "object",
|
|
2049
|
+
"additionalProperties": {
|
|
2050
|
+
"type": "string"
|
|
2051
|
+
},
|
|
2052
|
+
"description": "Default key-value pairs."
|
|
2053
|
+
},
|
|
2054
|
+
"key_label": {
|
|
2055
|
+
"type": "string",
|
|
2056
|
+
"description": "Label for the key column. Default: Key."
|
|
2057
|
+
},
|
|
2058
|
+
"value_label": {
|
|
2059
|
+
"type": "string",
|
|
2060
|
+
"description": "Label for the value column. Default: Value."
|
|
2061
|
+
},
|
|
2062
|
+
"name": {
|
|
2063
|
+
"type": "string",
|
|
2064
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
2065
|
+
},
|
|
2066
|
+
"label": {
|
|
2067
|
+
"type": "string",
|
|
2068
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
2069
|
+
},
|
|
2070
|
+
"comment": {
|
|
2071
|
+
"type": "string",
|
|
2072
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
2073
|
+
},
|
|
2074
|
+
"required": {
|
|
2075
|
+
"anyOf": [
|
|
2076
|
+
{
|
|
2077
|
+
"type": "boolean"
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
"type": "array",
|
|
2081
|
+
"items": {
|
|
2082
|
+
"$ref": "#/definitions/LocaleCode"
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
],
|
|
2086
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
2087
|
+
},
|
|
2088
|
+
"readonly": {
|
|
2089
|
+
"type": "boolean",
|
|
2090
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
2091
|
+
},
|
|
2092
|
+
"pattern": {
|
|
2093
|
+
"type": "array",
|
|
2094
|
+
"minItems": 2,
|
|
2095
|
+
"items": [
|
|
2096
|
+
{
|
|
2097
|
+
"anyOf": [
|
|
2098
|
+
{
|
|
2099
|
+
"type": "string"
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
"type": "string",
|
|
2103
|
+
"format": "regex"
|
|
2104
|
+
}
|
|
2105
|
+
]
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
"type": "string"
|
|
2109
|
+
}
|
|
2110
|
+
],
|
|
2111
|
+
"maxItems": 2,
|
|
2112
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
2113
|
+
},
|
|
2114
|
+
"hint": {
|
|
2115
|
+
"type": "string",
|
|
2116
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
2117
|
+
},
|
|
2118
|
+
"preview": {
|
|
2119
|
+
"type": "boolean",
|
|
2120
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
2121
|
+
},
|
|
2122
|
+
"i18n": {
|
|
2123
|
+
"anyOf": [
|
|
2124
|
+
{
|
|
2125
|
+
"type": "boolean"
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
"type": "string",
|
|
2129
|
+
"const": "duplicate"
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
"type": "string",
|
|
2133
|
+
"const": "translate"
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
"type": "string",
|
|
2137
|
+
"const": "none"
|
|
2138
|
+
}
|
|
2139
|
+
],
|
|
2140
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
2141
|
+
}
|
|
2142
|
+
},
|
|
2143
|
+
"required": [
|
|
2144
|
+
"name",
|
|
2145
|
+
"widget"
|
|
2146
|
+
],
|
|
2147
|
+
"description": "KeyValue field definition."
|
|
2148
|
+
},
|
|
2149
|
+
"ListField": {
|
|
2150
|
+
"type": "object",
|
|
2151
|
+
"additionalProperties": false,
|
|
2152
|
+
"properties": {
|
|
2153
|
+
"types": {
|
|
2154
|
+
"type": "array",
|
|
2155
|
+
"items": {
|
|
2156
|
+
"$ref": "#/definitions/VariableFieldType"
|
|
2157
|
+
},
|
|
2158
|
+
"description": "Set of nested Object fields to be selected or added."
|
|
2159
|
+
},
|
|
2160
|
+
"typeKey": {
|
|
2161
|
+
"type": "string",
|
|
2162
|
+
"description": "Property name to store the type name in nested objects. Default: `type`."
|
|
2163
|
+
},
|
|
2164
|
+
"min": {
|
|
2165
|
+
"type": "number",
|
|
2166
|
+
"description": "Minimum number of items that can be added. Default: 0."
|
|
2167
|
+
},
|
|
2168
|
+
"max": {
|
|
2169
|
+
"type": "number",
|
|
2170
|
+
"description": "Maximum number of items that can be added. Default: infinity."
|
|
2171
|
+
},
|
|
2172
|
+
"widget": {
|
|
2173
|
+
"type": "string",
|
|
2174
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
2175
|
+
"const": "list"
|
|
2176
|
+
},
|
|
2177
|
+
"default": {
|
|
2178
|
+
"anyOf": [
|
|
2179
|
+
{
|
|
2180
|
+
"type": "array",
|
|
2181
|
+
"items": {
|
|
2182
|
+
"type": "string"
|
|
2183
|
+
}
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
"type": "array",
|
|
2187
|
+
"items": {
|
|
2188
|
+
"type": "object"
|
|
2189
|
+
}
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
"type": "object"
|
|
2193
|
+
}
|
|
2194
|
+
],
|
|
2195
|
+
"description": "Default value. The format depends on how the field is configured, with or without `field`, `fields` or `types`. See the document for details."
|
|
2196
|
+
},
|
|
2197
|
+
"allow_add": {
|
|
2198
|
+
"type": "boolean",
|
|
2199
|
+
"description": "Whether to allow users to add new values. Default: `true`."
|
|
2200
|
+
},
|
|
2201
|
+
"add_to_top": {
|
|
2202
|
+
"type": "boolean",
|
|
2203
|
+
"description": "Whether to add new items to the top of the list instead of the bottom. Default: `false`."
|
|
2204
|
+
},
|
|
2205
|
+
"label_singular": {
|
|
2206
|
+
"type": "string",
|
|
2207
|
+
"description": "Label to be displayed on the Add button. Default: `label` field value."
|
|
2208
|
+
},
|
|
2209
|
+
"summary": {
|
|
2210
|
+
"type": "string",
|
|
2211
|
+
"description": "Template of a label to be displayed on a collapsed list item."
|
|
2212
|
+
},
|
|
2213
|
+
"collapsed": {
|
|
2214
|
+
"anyOf": [
|
|
2215
|
+
{
|
|
2216
|
+
"type": "boolean"
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
"type": "string",
|
|
2220
|
+
"const": "auto"
|
|
2221
|
+
}
|
|
2222
|
+
],
|
|
2223
|
+
"description": "Whether to collapse the list items by default. Default: `false`. If set to `auto`, the UI is collapsed if the item has any filled subfields and expanded if all the subfields are empty."
|
|
2224
|
+
},
|
|
2225
|
+
"minimize_collapsed": {
|
|
2226
|
+
"anyOf": [
|
|
2227
|
+
{
|
|
2228
|
+
"type": "boolean"
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
"type": "string",
|
|
2232
|
+
"const": "auto"
|
|
2233
|
+
}
|
|
2234
|
+
],
|
|
2235
|
+
"description": "Whether to collapse the entire list. Default: `false`. If set to `auto`, the UI is collapsed if the list has any items and expanded if it’s empty."
|
|
2236
|
+
},
|
|
2237
|
+
"field": {
|
|
2238
|
+
"$ref": "#/definitions/Field",
|
|
2239
|
+
"description": "Single field to be included in a list item."
|
|
2240
|
+
},
|
|
2241
|
+
"fields": {
|
|
2242
|
+
"type": "array",
|
|
2243
|
+
"items": {
|
|
2244
|
+
"$ref": "#/definitions/Field"
|
|
2245
|
+
},
|
|
2246
|
+
"description": "Set of fields to be included in a list item."
|
|
2247
|
+
},
|
|
2248
|
+
"root": {
|
|
2249
|
+
"type": "boolean",
|
|
2250
|
+
"description": "Whether to save the field value at the top-level of the data file without the field name. If the `single_file` i18n structure is enabled, the lists will still be saved under locale keys. Default: `false`. See https://github.com/sveltia/sveltia-cms#editing-data-files-with-a-top-level-list for details."
|
|
2251
|
+
},
|
|
2252
|
+
"name": {
|
|
2253
|
+
"type": "string",
|
|
2254
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
2255
|
+
},
|
|
2256
|
+
"label": {
|
|
2257
|
+
"type": "string",
|
|
2258
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
2259
|
+
},
|
|
2260
|
+
"comment": {
|
|
2261
|
+
"type": "string",
|
|
2262
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
2263
|
+
},
|
|
2264
|
+
"required": {
|
|
2265
|
+
"anyOf": [
|
|
2266
|
+
{
|
|
2267
|
+
"type": "boolean"
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
"type": "array",
|
|
2271
|
+
"items": {
|
|
2272
|
+
"$ref": "#/definitions/LocaleCode"
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
],
|
|
2276
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
2277
|
+
},
|
|
2278
|
+
"readonly": {
|
|
2279
|
+
"type": "boolean",
|
|
2280
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
2281
|
+
},
|
|
2282
|
+
"pattern": {
|
|
2283
|
+
"type": "array",
|
|
2284
|
+
"minItems": 2,
|
|
2285
|
+
"items": [
|
|
2286
|
+
{
|
|
2287
|
+
"anyOf": [
|
|
2288
|
+
{
|
|
2289
|
+
"type": "string"
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
"type": "string",
|
|
2293
|
+
"format": "regex"
|
|
2294
|
+
}
|
|
2295
|
+
]
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
"type": "string"
|
|
2299
|
+
}
|
|
2300
|
+
],
|
|
2301
|
+
"maxItems": 2,
|
|
2302
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
2303
|
+
},
|
|
2304
|
+
"hint": {
|
|
2305
|
+
"type": "string",
|
|
2306
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
2307
|
+
},
|
|
2308
|
+
"preview": {
|
|
2309
|
+
"type": "boolean",
|
|
2310
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
2311
|
+
},
|
|
2312
|
+
"i18n": {
|
|
2313
|
+
"anyOf": [
|
|
2314
|
+
{
|
|
2315
|
+
"type": "boolean"
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
"type": "string",
|
|
2319
|
+
"const": "duplicate"
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
"type": "string",
|
|
2323
|
+
"const": "translate"
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
"type": "string",
|
|
2327
|
+
"const": "none"
|
|
2328
|
+
}
|
|
2329
|
+
],
|
|
2330
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
2331
|
+
}
|
|
2332
|
+
},
|
|
2333
|
+
"required": [
|
|
2334
|
+
"name",
|
|
2335
|
+
"widget"
|
|
2336
|
+
],
|
|
2337
|
+
"description": "List field definition."
|
|
2338
|
+
},
|
|
2339
|
+
"VariableFieldType": {
|
|
2340
|
+
"type": "object",
|
|
2341
|
+
"properties": {
|
|
2342
|
+
"name": {
|
|
2343
|
+
"type": "string",
|
|
2344
|
+
"description": "Unique identifier for the type."
|
|
2345
|
+
},
|
|
2346
|
+
"label": {
|
|
2347
|
+
"type": "string",
|
|
2348
|
+
"description": "Label of the type to be displayed in the editor UI. Default: `name` field value."
|
|
2349
|
+
},
|
|
2350
|
+
"widget": {
|
|
2351
|
+
"type": "string",
|
|
2352
|
+
"const": "object",
|
|
2353
|
+
"description": "Widget name. Values other than `object` are ignored."
|
|
2354
|
+
},
|
|
2355
|
+
"summary": {
|
|
2356
|
+
"type": "string",
|
|
2357
|
+
"description": "Template of a label to be displayed on a collapsed object."
|
|
2358
|
+
},
|
|
2359
|
+
"fields": {
|
|
2360
|
+
"type": "array",
|
|
2361
|
+
"items": {
|
|
2362
|
+
"$ref": "#/definitions/Field"
|
|
2363
|
+
},
|
|
2364
|
+
"description": "Set of subfields. This option can be omitted; in that case, only the `type` property will be saved."
|
|
2365
|
+
}
|
|
2366
|
+
},
|
|
2367
|
+
"required": [
|
|
2368
|
+
"name"
|
|
2369
|
+
],
|
|
2370
|
+
"additionalProperties": false,
|
|
2371
|
+
"description": "Variable type for List/Object fields."
|
|
2372
|
+
},
|
|
2373
|
+
"MapField": {
|
|
2374
|
+
"type": "object",
|
|
2375
|
+
"additionalProperties": false,
|
|
2376
|
+
"properties": {
|
|
2377
|
+
"widget": {
|
|
2378
|
+
"type": "string",
|
|
2379
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
2380
|
+
"const": "map"
|
|
2381
|
+
},
|
|
2382
|
+
"default": {
|
|
2383
|
+
"type": "string",
|
|
2384
|
+
"description": "Default value. Accepts a stringified single GeoJSON geometry object that contains `type` and `coordinates` properties."
|
|
2385
|
+
},
|
|
2386
|
+
"decimals": {
|
|
2387
|
+
"type": "number",
|
|
2388
|
+
"description": "Precision of coordinates to be saved. Default: 7."
|
|
2389
|
+
},
|
|
2390
|
+
"type": {
|
|
2391
|
+
"type": "string",
|
|
2392
|
+
"enum": [
|
|
2393
|
+
"Point",
|
|
2394
|
+
"LineString",
|
|
2395
|
+
"Polygon"
|
|
2396
|
+
],
|
|
2397
|
+
"description": "Geometry type. Default: Point."
|
|
2398
|
+
},
|
|
2399
|
+
"name": {
|
|
2400
|
+
"type": "string",
|
|
2401
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
2402
|
+
},
|
|
2403
|
+
"label": {
|
|
2404
|
+
"type": "string",
|
|
2405
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
2406
|
+
},
|
|
2407
|
+
"comment": {
|
|
2408
|
+
"type": "string",
|
|
2409
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
2410
|
+
},
|
|
2411
|
+
"required": {
|
|
2412
|
+
"anyOf": [
|
|
2413
|
+
{
|
|
2414
|
+
"type": "boolean"
|
|
2415
|
+
},
|
|
2416
|
+
{
|
|
2417
|
+
"type": "array",
|
|
2418
|
+
"items": {
|
|
2419
|
+
"$ref": "#/definitions/LocaleCode"
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
],
|
|
2423
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
2424
|
+
},
|
|
2425
|
+
"readonly": {
|
|
2426
|
+
"type": "boolean",
|
|
2427
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
2428
|
+
},
|
|
2429
|
+
"pattern": {
|
|
2430
|
+
"type": "array",
|
|
2431
|
+
"minItems": 2,
|
|
2432
|
+
"items": [
|
|
2433
|
+
{
|
|
2434
|
+
"anyOf": [
|
|
2435
|
+
{
|
|
2436
|
+
"type": "string"
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
"type": "string",
|
|
2440
|
+
"format": "regex"
|
|
2441
|
+
}
|
|
2442
|
+
]
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
"type": "string"
|
|
2446
|
+
}
|
|
2447
|
+
],
|
|
2448
|
+
"maxItems": 2,
|
|
2449
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
2450
|
+
},
|
|
2451
|
+
"hint": {
|
|
2452
|
+
"type": "string",
|
|
2453
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
2454
|
+
},
|
|
2455
|
+
"preview": {
|
|
2456
|
+
"type": "boolean",
|
|
2457
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
2458
|
+
},
|
|
2459
|
+
"i18n": {
|
|
2460
|
+
"anyOf": [
|
|
2461
|
+
{
|
|
2462
|
+
"type": "boolean"
|
|
2463
|
+
},
|
|
2464
|
+
{
|
|
2465
|
+
"type": "string",
|
|
2466
|
+
"const": "duplicate"
|
|
2467
|
+
},
|
|
2468
|
+
{
|
|
2469
|
+
"type": "string",
|
|
2470
|
+
"const": "translate"
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
"type": "string",
|
|
2474
|
+
"const": "none"
|
|
2475
|
+
}
|
|
2476
|
+
],
|
|
2477
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
2478
|
+
}
|
|
2479
|
+
},
|
|
2480
|
+
"required": [
|
|
2481
|
+
"name",
|
|
2482
|
+
"widget"
|
|
2483
|
+
],
|
|
2484
|
+
"description": "Map field definition."
|
|
2485
|
+
},
|
|
2486
|
+
"MarkdownField": {
|
|
2487
|
+
"type": "object",
|
|
2488
|
+
"additionalProperties": false,
|
|
2489
|
+
"properties": {
|
|
2490
|
+
"widget": {
|
|
2491
|
+
"type": "string",
|
|
2492
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
2493
|
+
"const": "markdown"
|
|
2494
|
+
},
|
|
2495
|
+
"default": {
|
|
2496
|
+
"type": "string",
|
|
2497
|
+
"description": "Default value."
|
|
2498
|
+
},
|
|
2499
|
+
"minimal": {
|
|
2500
|
+
"type": "boolean",
|
|
2501
|
+
"description": "Whether to minimize the toolbar height."
|
|
2502
|
+
},
|
|
2503
|
+
"buttons": {
|
|
2504
|
+
"type": "array",
|
|
2505
|
+
"items": {
|
|
2506
|
+
"$ref": "#/definitions/RichTextEditorButtonName"
|
|
2507
|
+
},
|
|
2508
|
+
"description": "Names of formatting buttons and menu items to be enabled in the editor UI. Default: all the supported button names."
|
|
2509
|
+
},
|
|
2510
|
+
"editor_components": {
|
|
2511
|
+
"type": "array",
|
|
2512
|
+
"items": {
|
|
2513
|
+
"anyOf": [
|
|
2514
|
+
{
|
|
2515
|
+
"$ref": "#/definitions/RichTextEditorComponentName"
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
"type": "string"
|
|
2519
|
+
}
|
|
2520
|
+
]
|
|
2521
|
+
},
|
|
2522
|
+
"description": "Names of components to be enabled in the editor UI. This may include custom component names. Default: all the built-in component names."
|
|
2523
|
+
},
|
|
2524
|
+
"modes": {
|
|
2525
|
+
"type": "array",
|
|
2526
|
+
"items": {
|
|
2527
|
+
"$ref": "#/definitions/RichTextEditorMode"
|
|
2528
|
+
},
|
|
2529
|
+
"description": "Editor modes to be enabled. If it’s `[raw, rich_text]`, rich text mode is disabled by default. Default: `[rich_text, raw]`."
|
|
2530
|
+
},
|
|
2531
|
+
"sanitize_preview": {
|
|
2532
|
+
"type": "boolean",
|
|
2533
|
+
"description": "Whether to sanitize the preview HTML. Default: `false`."
|
|
2534
|
+
},
|
|
2535
|
+
"linked_images": {
|
|
2536
|
+
"type": "boolean",
|
|
2537
|
+
"description": "Whether to enable the linked images feature for the built-in `image` component. Default: `true`. When enabled, the image component provides an additional text field for specifying a URL to wrap the image as a link. The resulting Markdown output will be in the format `[](link)`, where clicking the image navigates to the provided link. This feature can be disabled if it causes conflicts with certain frameworks."
|
|
2538
|
+
},
|
|
2539
|
+
"name": {
|
|
2540
|
+
"type": "string",
|
|
2541
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
2542
|
+
},
|
|
2543
|
+
"label": {
|
|
2544
|
+
"type": "string",
|
|
2545
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
2546
|
+
},
|
|
2547
|
+
"comment": {
|
|
2548
|
+
"type": "string",
|
|
2549
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
2550
|
+
},
|
|
2551
|
+
"required": {
|
|
2552
|
+
"anyOf": [
|
|
2553
|
+
{
|
|
2554
|
+
"type": "boolean"
|
|
2555
|
+
},
|
|
2556
|
+
{
|
|
2557
|
+
"type": "array",
|
|
2558
|
+
"items": {
|
|
2559
|
+
"$ref": "#/definitions/LocaleCode"
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
],
|
|
2563
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
2564
|
+
},
|
|
2565
|
+
"readonly": {
|
|
2566
|
+
"type": "boolean",
|
|
2567
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
2568
|
+
},
|
|
2569
|
+
"pattern": {
|
|
2570
|
+
"type": "array",
|
|
2571
|
+
"minItems": 2,
|
|
2572
|
+
"items": [
|
|
2573
|
+
{
|
|
2574
|
+
"anyOf": [
|
|
2575
|
+
{
|
|
2576
|
+
"type": "string"
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
"type": "string",
|
|
2580
|
+
"format": "regex"
|
|
2581
|
+
}
|
|
2582
|
+
]
|
|
2583
|
+
},
|
|
2584
|
+
{
|
|
2585
|
+
"type": "string"
|
|
2586
|
+
}
|
|
2587
|
+
],
|
|
2588
|
+
"maxItems": 2,
|
|
2589
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
2590
|
+
},
|
|
2591
|
+
"hint": {
|
|
2592
|
+
"type": "string",
|
|
2593
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
2594
|
+
},
|
|
2595
|
+
"preview": {
|
|
2596
|
+
"type": "boolean",
|
|
2597
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
2598
|
+
},
|
|
2599
|
+
"i18n": {
|
|
2600
|
+
"anyOf": [
|
|
2601
|
+
{
|
|
2602
|
+
"type": "boolean"
|
|
2603
|
+
},
|
|
2604
|
+
{
|
|
2605
|
+
"type": "string",
|
|
2606
|
+
"const": "duplicate"
|
|
2607
|
+
},
|
|
2608
|
+
{
|
|
2609
|
+
"type": "string",
|
|
2610
|
+
"const": "translate"
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
"type": "string",
|
|
2614
|
+
"const": "none"
|
|
2615
|
+
}
|
|
2616
|
+
],
|
|
2617
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
2618
|
+
}
|
|
2619
|
+
},
|
|
2620
|
+
"required": [
|
|
2621
|
+
"name",
|
|
2622
|
+
"widget"
|
|
2623
|
+
],
|
|
2624
|
+
"description": "Markdown field definition."
|
|
2625
|
+
},
|
|
2626
|
+
"RichTextEditorButtonName": {
|
|
2627
|
+
"type": "string",
|
|
2628
|
+
"enum": [
|
|
2629
|
+
"bold",
|
|
2630
|
+
"italic",
|
|
2631
|
+
"code",
|
|
2632
|
+
"link",
|
|
2633
|
+
"heading-one",
|
|
2634
|
+
"heading-two",
|
|
2635
|
+
"heading-three",
|
|
2636
|
+
"heading-four",
|
|
2637
|
+
"heading-five",
|
|
2638
|
+
"heading-six",
|
|
2639
|
+
"quote",
|
|
2640
|
+
"bulleted-list",
|
|
2641
|
+
"numbered-list"
|
|
2642
|
+
],
|
|
2643
|
+
"description": "Supported button name for the rich text editor."
|
|
2644
|
+
},
|
|
2645
|
+
"RichTextEditorComponentName": {
|
|
2646
|
+
"type": "string",
|
|
2647
|
+
"enum": [
|
|
2648
|
+
"code-block",
|
|
2649
|
+
"image"
|
|
2650
|
+
],
|
|
2651
|
+
"description": "Built-in editor component name for the rich text editor."
|
|
2652
|
+
},
|
|
2653
|
+
"RichTextEditorMode": {
|
|
2654
|
+
"type": "string",
|
|
2655
|
+
"enum": [
|
|
2656
|
+
"rich_text",
|
|
2657
|
+
"raw"
|
|
2658
|
+
],
|
|
2659
|
+
"description": "Supported mode name for the rich text editor."
|
|
2660
|
+
},
|
|
2661
|
+
"NumberField": {
|
|
2662
|
+
"type": "object",
|
|
2663
|
+
"additionalProperties": false,
|
|
2664
|
+
"properties": {
|
|
2665
|
+
"before_input": {
|
|
2666
|
+
"type": "string",
|
|
2667
|
+
"description": "An extra label to be displayed before the input UI. Markdown is supported. Default: empty string."
|
|
2668
|
+
},
|
|
2669
|
+
"after_input": {
|
|
2670
|
+
"type": "string",
|
|
2671
|
+
"description": "An extra label to be displayed after the input UI. Markdown is supported. Default: empty string."
|
|
2672
|
+
},
|
|
2673
|
+
"widget": {
|
|
2674
|
+
"type": "string",
|
|
2675
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
2676
|
+
"const": "number"
|
|
2677
|
+
},
|
|
2678
|
+
"default": {
|
|
2679
|
+
"type": [
|
|
2680
|
+
"number",
|
|
2681
|
+
"string"
|
|
2682
|
+
],
|
|
2683
|
+
"description": "Default value."
|
|
2684
|
+
},
|
|
2685
|
+
"value_type": {
|
|
2686
|
+
"type": "string",
|
|
2687
|
+
"description": "Type of value to be saved. Default: `int`."
|
|
2688
|
+
},
|
|
2689
|
+
"min": {
|
|
2690
|
+
"type": "number",
|
|
2691
|
+
"description": "Minimum value that can be entered in the input. Default: undefined."
|
|
2692
|
+
},
|
|
2693
|
+
"max": {
|
|
2694
|
+
"type": "number",
|
|
2695
|
+
"description": "Maximum value that can be entered in the input. Default: undefined."
|
|
2696
|
+
},
|
|
2697
|
+
"step": {
|
|
2698
|
+
"type": "number",
|
|
2699
|
+
"description": "Number to increase/decrease with the arrow key/button. Default: 1."
|
|
2700
|
+
},
|
|
2701
|
+
"name": {
|
|
2702
|
+
"type": "string",
|
|
2703
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
2704
|
+
},
|
|
2705
|
+
"label": {
|
|
2706
|
+
"type": "string",
|
|
2707
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
2708
|
+
},
|
|
2709
|
+
"comment": {
|
|
2710
|
+
"type": "string",
|
|
2711
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
2712
|
+
},
|
|
2713
|
+
"required": {
|
|
2714
|
+
"anyOf": [
|
|
2715
|
+
{
|
|
2716
|
+
"type": "boolean"
|
|
2717
|
+
},
|
|
2718
|
+
{
|
|
2719
|
+
"type": "array",
|
|
2720
|
+
"items": {
|
|
2721
|
+
"$ref": "#/definitions/LocaleCode"
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
],
|
|
2725
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
2726
|
+
},
|
|
2727
|
+
"readonly": {
|
|
2728
|
+
"type": "boolean",
|
|
2729
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
2730
|
+
},
|
|
2731
|
+
"pattern": {
|
|
2732
|
+
"type": "array",
|
|
2733
|
+
"minItems": 2,
|
|
2734
|
+
"items": [
|
|
2735
|
+
{
|
|
2736
|
+
"anyOf": [
|
|
2737
|
+
{
|
|
2738
|
+
"type": "string"
|
|
2739
|
+
},
|
|
2740
|
+
{
|
|
2741
|
+
"type": "string",
|
|
2742
|
+
"format": "regex"
|
|
2743
|
+
}
|
|
2744
|
+
]
|
|
2745
|
+
},
|
|
2746
|
+
{
|
|
2747
|
+
"type": "string"
|
|
2748
|
+
}
|
|
2749
|
+
],
|
|
2750
|
+
"maxItems": 2,
|
|
2751
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
2752
|
+
},
|
|
2753
|
+
"hint": {
|
|
2754
|
+
"type": "string",
|
|
2755
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
2756
|
+
},
|
|
2757
|
+
"preview": {
|
|
2758
|
+
"type": "boolean",
|
|
2759
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
2760
|
+
},
|
|
2761
|
+
"i18n": {
|
|
2762
|
+
"anyOf": [
|
|
2763
|
+
{
|
|
2764
|
+
"type": "boolean"
|
|
2765
|
+
},
|
|
2766
|
+
{
|
|
2767
|
+
"type": "string",
|
|
2768
|
+
"const": "duplicate"
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
"type": "string",
|
|
2772
|
+
"const": "translate"
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
"type": "string",
|
|
2776
|
+
"const": "none"
|
|
2777
|
+
}
|
|
2778
|
+
],
|
|
2779
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
2780
|
+
}
|
|
2781
|
+
},
|
|
2782
|
+
"required": [
|
|
2783
|
+
"name",
|
|
2784
|
+
"widget"
|
|
2785
|
+
],
|
|
2786
|
+
"description": "Number field definition."
|
|
2787
|
+
},
|
|
2788
|
+
"ObjectField": {
|
|
2789
|
+
"type": "object",
|
|
2790
|
+
"additionalProperties": false,
|
|
2791
|
+
"properties": {
|
|
2792
|
+
"types": {
|
|
2793
|
+
"type": "array",
|
|
2794
|
+
"items": {
|
|
2795
|
+
"$ref": "#/definitions/VariableFieldType"
|
|
2796
|
+
},
|
|
2797
|
+
"description": "Set of nested Object fields to be selected or added."
|
|
2798
|
+
},
|
|
2799
|
+
"typeKey": {
|
|
2800
|
+
"type": "string",
|
|
2801
|
+
"description": "Property name to store the type name in nested objects. Default: `type`."
|
|
2802
|
+
},
|
|
2803
|
+
"widget": {
|
|
2804
|
+
"type": "string",
|
|
2805
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
2806
|
+
"const": "object"
|
|
2807
|
+
},
|
|
2808
|
+
"default": {
|
|
2809
|
+
"type": "object",
|
|
2810
|
+
"description": "Default values."
|
|
2811
|
+
},
|
|
2812
|
+
"collapsed": {
|
|
2813
|
+
"anyOf": [
|
|
2814
|
+
{
|
|
2815
|
+
"type": "boolean"
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
"type": "string",
|
|
2819
|
+
"const": "auto"
|
|
2820
|
+
}
|
|
2821
|
+
],
|
|
2822
|
+
"description": "Whether to collapse the object by default. Default: `false`. If set to `auto`, the UI is collapsed if the object has any filled subfields and expanded if all the subfields are empty."
|
|
2823
|
+
},
|
|
2824
|
+
"summary": {
|
|
2825
|
+
"type": "string",
|
|
2826
|
+
"description": "Template of a label to be displayed on a collapsed object."
|
|
2827
|
+
},
|
|
2828
|
+
"fields": {
|
|
2829
|
+
"type": "array",
|
|
2830
|
+
"items": {
|
|
2831
|
+
"$ref": "#/definitions/Field"
|
|
2832
|
+
},
|
|
2833
|
+
"description": "Set of fields to be included."
|
|
2834
|
+
},
|
|
2835
|
+
"name": {
|
|
2836
|
+
"type": "string",
|
|
2837
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
2838
|
+
},
|
|
2839
|
+
"label": {
|
|
2840
|
+
"type": "string",
|
|
2841
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
2842
|
+
},
|
|
2843
|
+
"comment": {
|
|
2844
|
+
"type": "string",
|
|
2845
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
2846
|
+
},
|
|
2847
|
+
"required": {
|
|
2848
|
+
"anyOf": [
|
|
2849
|
+
{
|
|
2850
|
+
"type": "boolean"
|
|
2851
|
+
},
|
|
2852
|
+
{
|
|
2853
|
+
"type": "array",
|
|
2854
|
+
"items": {
|
|
2855
|
+
"$ref": "#/definitions/LocaleCode"
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2858
|
+
],
|
|
2859
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
2860
|
+
},
|
|
2861
|
+
"readonly": {
|
|
2862
|
+
"type": "boolean",
|
|
2863
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
2864
|
+
},
|
|
2865
|
+
"pattern": {
|
|
2866
|
+
"type": "array",
|
|
2867
|
+
"minItems": 2,
|
|
2868
|
+
"items": [
|
|
2869
|
+
{
|
|
2870
|
+
"anyOf": [
|
|
2871
|
+
{
|
|
2872
|
+
"type": "string"
|
|
2873
|
+
},
|
|
2874
|
+
{
|
|
2875
|
+
"type": "string",
|
|
2876
|
+
"format": "regex"
|
|
2877
|
+
}
|
|
2878
|
+
]
|
|
2879
|
+
},
|
|
2880
|
+
{
|
|
2881
|
+
"type": "string"
|
|
2882
|
+
}
|
|
2883
|
+
],
|
|
2884
|
+
"maxItems": 2,
|
|
2885
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
2886
|
+
},
|
|
2887
|
+
"hint": {
|
|
2888
|
+
"type": "string",
|
|
2889
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
2890
|
+
},
|
|
2891
|
+
"preview": {
|
|
2892
|
+
"type": "boolean",
|
|
2893
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
2894
|
+
},
|
|
2895
|
+
"i18n": {
|
|
2896
|
+
"anyOf": [
|
|
2897
|
+
{
|
|
2898
|
+
"type": "boolean"
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
"type": "string",
|
|
2902
|
+
"const": "duplicate"
|
|
2903
|
+
},
|
|
2904
|
+
{
|
|
2905
|
+
"type": "string",
|
|
2906
|
+
"const": "translate"
|
|
2907
|
+
},
|
|
2908
|
+
{
|
|
2909
|
+
"type": "string",
|
|
2910
|
+
"const": "none"
|
|
2911
|
+
}
|
|
2912
|
+
],
|
|
2913
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
2914
|
+
}
|
|
2915
|
+
},
|
|
2916
|
+
"required": [
|
|
2917
|
+
"fields",
|
|
2918
|
+
"name",
|
|
2919
|
+
"widget"
|
|
2920
|
+
],
|
|
2921
|
+
"description": "Object field definition."
|
|
2922
|
+
},
|
|
2923
|
+
"RelationField": {
|
|
2924
|
+
"type": "object",
|
|
2925
|
+
"additionalProperties": false,
|
|
2926
|
+
"properties": {
|
|
2927
|
+
"multiple": {
|
|
2928
|
+
"type": "boolean",
|
|
2929
|
+
"description": "Whether to accept multiple values. Default: `false`."
|
|
2930
|
+
},
|
|
2931
|
+
"min": {
|
|
2932
|
+
"type": "number",
|
|
2933
|
+
"description": "Minimum number of items that can be selected. Ignored if `multiple` is `false`. Default: 0."
|
|
2934
|
+
},
|
|
2935
|
+
"max": {
|
|
2936
|
+
"type": "number",
|
|
2937
|
+
"description": "Maximum number of items that can be selected. Ignored if `multiple` is `false`. Default: infinity."
|
|
2938
|
+
},
|
|
2939
|
+
"dropdown_threshold": {
|
|
2940
|
+
"type": "number",
|
|
2941
|
+
"description": "Maximum number of options to be displayed as radio buttons (single-select) or checkboxes (multi-select) rather than a dropdown list. Default: 5."
|
|
2942
|
+
},
|
|
2943
|
+
"widget": {
|
|
2944
|
+
"type": "string",
|
|
2945
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
2946
|
+
"const": "relation"
|
|
2947
|
+
},
|
|
2948
|
+
"default": {
|
|
2949
|
+
"anyOf": [
|
|
2950
|
+
{},
|
|
2951
|
+
{
|
|
2952
|
+
"type": "array",
|
|
2953
|
+
"items": {}
|
|
2954
|
+
}
|
|
2955
|
+
],
|
|
2956
|
+
"description": "Default value(s), which should match the options. When `multiple` is `false`, it should be a single value that matches the `value_field` option."
|
|
2957
|
+
},
|
|
2958
|
+
"collection": {
|
|
2959
|
+
"type": "string",
|
|
2960
|
+
"description": "Referenced collection name. Use `_singletons` for the singleton collection."
|
|
2961
|
+
},
|
|
2962
|
+
"file": {
|
|
2963
|
+
"type": "string",
|
|
2964
|
+
"description": "Referenced file identifier for a file/singleton collection. Required if the `collection` is defined."
|
|
2965
|
+
},
|
|
2966
|
+
"value_field": {
|
|
2967
|
+
"anyOf": [
|
|
2968
|
+
{
|
|
2969
|
+
"$ref": "#/definitions/FieldKeyPath"
|
|
2970
|
+
},
|
|
2971
|
+
{
|
|
2972
|
+
"type": "string"
|
|
2973
|
+
}
|
|
2974
|
+
],
|
|
2975
|
+
"description": "Field name to be stored as the value, or `{{slug}}` (entry slug). It can contain a locale prefix like `{{locale}}/{{slug}}` if i18n is enabled. Default: `{{slug}}`."
|
|
2976
|
+
},
|
|
2977
|
+
"display_fields": {
|
|
2978
|
+
"type": "array",
|
|
2979
|
+
"items": {
|
|
2980
|
+
"anyOf": [
|
|
2981
|
+
{
|
|
2982
|
+
"$ref": "#/definitions/FieldKeyPath"
|
|
2983
|
+
},
|
|
2984
|
+
{
|
|
2985
|
+
"type": "string"
|
|
2986
|
+
}
|
|
2987
|
+
]
|
|
2988
|
+
},
|
|
2989
|
+
"description": "Name of fields to be displayed. It can contain string templates. Default: `value_field` field value or the referenced collection’s `identifier_field`, which is `title` by default."
|
|
2990
|
+
},
|
|
2991
|
+
"search_fields": {
|
|
2992
|
+
"type": "array",
|
|
2993
|
+
"items": {
|
|
2994
|
+
"$ref": "#/definitions/FieldKeyPath"
|
|
2995
|
+
},
|
|
2996
|
+
"description": "Name of fields to be searched. Default: `display_fields` field value."
|
|
2997
|
+
},
|
|
2998
|
+
"filters": {
|
|
2999
|
+
"type": "array",
|
|
3000
|
+
"items": {
|
|
3001
|
+
"$ref": "#/definitions/RelationFieldFilterOptions"
|
|
3002
|
+
},
|
|
3003
|
+
"description": "Entry filter options."
|
|
3004
|
+
},
|
|
3005
|
+
"name": {
|
|
3006
|
+
"type": "string",
|
|
3007
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
3008
|
+
},
|
|
3009
|
+
"label": {
|
|
3010
|
+
"type": "string",
|
|
3011
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
3012
|
+
},
|
|
3013
|
+
"comment": {
|
|
3014
|
+
"type": "string",
|
|
3015
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
3016
|
+
},
|
|
3017
|
+
"required": {
|
|
3018
|
+
"anyOf": [
|
|
3019
|
+
{
|
|
3020
|
+
"type": "boolean"
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
"type": "array",
|
|
3024
|
+
"items": {
|
|
3025
|
+
"$ref": "#/definitions/LocaleCode"
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
],
|
|
3029
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
3030
|
+
},
|
|
3031
|
+
"readonly": {
|
|
3032
|
+
"type": "boolean",
|
|
3033
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
3034
|
+
},
|
|
3035
|
+
"pattern": {
|
|
3036
|
+
"type": "array",
|
|
3037
|
+
"minItems": 2,
|
|
3038
|
+
"items": [
|
|
3039
|
+
{
|
|
3040
|
+
"anyOf": [
|
|
3041
|
+
{
|
|
3042
|
+
"type": "string"
|
|
3043
|
+
},
|
|
3044
|
+
{
|
|
3045
|
+
"type": "string",
|
|
3046
|
+
"format": "regex"
|
|
3047
|
+
}
|
|
3048
|
+
]
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
"type": "string"
|
|
3052
|
+
}
|
|
3053
|
+
],
|
|
3054
|
+
"maxItems": 2,
|
|
3055
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
3056
|
+
},
|
|
3057
|
+
"hint": {
|
|
3058
|
+
"type": "string",
|
|
3059
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
3060
|
+
},
|
|
3061
|
+
"preview": {
|
|
3062
|
+
"type": "boolean",
|
|
3063
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
3064
|
+
},
|
|
3065
|
+
"i18n": {
|
|
3066
|
+
"anyOf": [
|
|
3067
|
+
{
|
|
3068
|
+
"type": "boolean"
|
|
3069
|
+
},
|
|
3070
|
+
{
|
|
3071
|
+
"type": "string",
|
|
3072
|
+
"const": "duplicate"
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
"type": "string",
|
|
3076
|
+
"const": "translate"
|
|
3077
|
+
},
|
|
3078
|
+
{
|
|
3079
|
+
"type": "string",
|
|
3080
|
+
"const": "none"
|
|
3081
|
+
}
|
|
3082
|
+
],
|
|
3083
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
3084
|
+
}
|
|
3085
|
+
},
|
|
3086
|
+
"required": [
|
|
3087
|
+
"collection",
|
|
3088
|
+
"name",
|
|
3089
|
+
"widget"
|
|
3090
|
+
],
|
|
3091
|
+
"description": "Relation field definition."
|
|
3092
|
+
},
|
|
3093
|
+
"RelationFieldFilterOptions": {
|
|
3094
|
+
"type": "object",
|
|
3095
|
+
"properties": {
|
|
3096
|
+
"field": {
|
|
3097
|
+
"$ref": "#/definitions/FieldKeyPath",
|
|
3098
|
+
"description": "Field name."
|
|
3099
|
+
},
|
|
3100
|
+
"values": {
|
|
3101
|
+
"type": "array",
|
|
3102
|
+
"items": {},
|
|
3103
|
+
"description": "One or more values to be matched."
|
|
3104
|
+
}
|
|
3105
|
+
},
|
|
3106
|
+
"required": [
|
|
3107
|
+
"field",
|
|
3108
|
+
"values"
|
|
3109
|
+
],
|
|
3110
|
+
"additionalProperties": false,
|
|
3111
|
+
"description": "Entry filter options for a Relation field."
|
|
3112
|
+
},
|
|
3113
|
+
"SelectField": {
|
|
3114
|
+
"type": "object",
|
|
3115
|
+
"additionalProperties": false,
|
|
3116
|
+
"properties": {
|
|
3117
|
+
"multiple": {
|
|
3118
|
+
"type": "boolean",
|
|
3119
|
+
"description": "Whether to accept multiple values. Default: `false`."
|
|
3120
|
+
},
|
|
3121
|
+
"min": {
|
|
3122
|
+
"type": "number",
|
|
3123
|
+
"description": "Minimum number of items that can be selected. Ignored if `multiple` is `false`. Default: 0."
|
|
3124
|
+
},
|
|
3125
|
+
"max": {
|
|
3126
|
+
"type": "number",
|
|
3127
|
+
"description": "Maximum number of items that can be selected. Ignored if `multiple` is `false`. Default: infinity."
|
|
3128
|
+
},
|
|
3129
|
+
"dropdown_threshold": {
|
|
3130
|
+
"type": "number",
|
|
3131
|
+
"description": "Maximum number of options to be displayed as radio buttons (single-select) or checkboxes (multi-select) rather than a dropdown list. Default: 5."
|
|
3132
|
+
},
|
|
3133
|
+
"widget": {
|
|
3134
|
+
"type": "string",
|
|
3135
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
3136
|
+
"const": "select"
|
|
3137
|
+
},
|
|
3138
|
+
"default": {
|
|
3139
|
+
"anyOf": [
|
|
3140
|
+
{},
|
|
3141
|
+
{
|
|
3142
|
+
"type": "array",
|
|
3143
|
+
"items": {}
|
|
3144
|
+
}
|
|
3145
|
+
],
|
|
3146
|
+
"description": "Default value(s), which should match the options. When `multiple` is `false`, it should be a single value that matches the `value` option."
|
|
3147
|
+
},
|
|
3148
|
+
"options": {
|
|
3149
|
+
"anyOf": [
|
|
3150
|
+
{
|
|
3151
|
+
"type": "array",
|
|
3152
|
+
"items": {
|
|
3153
|
+
"type": "string"
|
|
3154
|
+
}
|
|
3155
|
+
},
|
|
3156
|
+
{
|
|
3157
|
+
"type": "array",
|
|
3158
|
+
"items": {
|
|
3159
|
+
"type": "object",
|
|
3160
|
+
"properties": {
|
|
3161
|
+
"label": {
|
|
3162
|
+
"type": "string"
|
|
3163
|
+
},
|
|
3164
|
+
"value": {
|
|
3165
|
+
"type": "string"
|
|
3166
|
+
}
|
|
3167
|
+
},
|
|
3168
|
+
"required": [
|
|
3169
|
+
"label",
|
|
3170
|
+
"value"
|
|
3171
|
+
],
|
|
3172
|
+
"additionalProperties": false
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
],
|
|
3176
|
+
"description": "Options."
|
|
3177
|
+
},
|
|
3178
|
+
"name": {
|
|
3179
|
+
"type": "string",
|
|
3180
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
3181
|
+
},
|
|
3182
|
+
"label": {
|
|
3183
|
+
"type": "string",
|
|
3184
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
3185
|
+
},
|
|
3186
|
+
"comment": {
|
|
3187
|
+
"type": "string",
|
|
3188
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
3189
|
+
},
|
|
3190
|
+
"required": {
|
|
3191
|
+
"anyOf": [
|
|
3192
|
+
{
|
|
3193
|
+
"type": "boolean"
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
"type": "array",
|
|
3197
|
+
"items": {
|
|
3198
|
+
"$ref": "#/definitions/LocaleCode"
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
],
|
|
3202
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
3203
|
+
},
|
|
3204
|
+
"readonly": {
|
|
3205
|
+
"type": "boolean",
|
|
3206
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
3207
|
+
},
|
|
3208
|
+
"pattern": {
|
|
3209
|
+
"type": "array",
|
|
3210
|
+
"minItems": 2,
|
|
3211
|
+
"items": [
|
|
3212
|
+
{
|
|
3213
|
+
"anyOf": [
|
|
3214
|
+
{
|
|
3215
|
+
"type": "string"
|
|
3216
|
+
},
|
|
3217
|
+
{
|
|
3218
|
+
"type": "string",
|
|
3219
|
+
"format": "regex"
|
|
3220
|
+
}
|
|
3221
|
+
]
|
|
3222
|
+
},
|
|
3223
|
+
{
|
|
3224
|
+
"type": "string"
|
|
3225
|
+
}
|
|
3226
|
+
],
|
|
3227
|
+
"maxItems": 2,
|
|
3228
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
3229
|
+
},
|
|
3230
|
+
"hint": {
|
|
3231
|
+
"type": "string",
|
|
3232
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
3233
|
+
},
|
|
3234
|
+
"preview": {
|
|
3235
|
+
"type": "boolean",
|
|
3236
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
3237
|
+
},
|
|
3238
|
+
"i18n": {
|
|
3239
|
+
"anyOf": [
|
|
3240
|
+
{
|
|
3241
|
+
"type": "boolean"
|
|
3242
|
+
},
|
|
3243
|
+
{
|
|
3244
|
+
"type": "string",
|
|
3245
|
+
"const": "duplicate"
|
|
3246
|
+
},
|
|
3247
|
+
{
|
|
3248
|
+
"type": "string",
|
|
3249
|
+
"const": "translate"
|
|
3250
|
+
},
|
|
3251
|
+
{
|
|
3252
|
+
"type": "string",
|
|
3253
|
+
"const": "none"
|
|
3254
|
+
}
|
|
3255
|
+
],
|
|
3256
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
3257
|
+
}
|
|
3258
|
+
},
|
|
3259
|
+
"required": [
|
|
3260
|
+
"name",
|
|
3261
|
+
"options",
|
|
3262
|
+
"widget"
|
|
3263
|
+
],
|
|
3264
|
+
"description": "Select field definition."
|
|
3265
|
+
},
|
|
3266
|
+
"StringField": {
|
|
3267
|
+
"type": "object",
|
|
3268
|
+
"additionalProperties": false,
|
|
3269
|
+
"properties": {
|
|
3270
|
+
"minlength": {
|
|
3271
|
+
"type": "number",
|
|
3272
|
+
"description": "Minimum number of characters that can be entered in the input. Default: 0."
|
|
3273
|
+
},
|
|
3274
|
+
"maxlength": {
|
|
3275
|
+
"type": "number",
|
|
3276
|
+
"description": "Maximum number of characters that can be entered in the input. Default: infinity."
|
|
3277
|
+
},
|
|
3278
|
+
"before_input": {
|
|
3279
|
+
"type": "string",
|
|
3280
|
+
"description": "An extra label to be displayed before the input UI. Markdown is supported. Default: empty string."
|
|
3281
|
+
},
|
|
3282
|
+
"after_input": {
|
|
3283
|
+
"type": "string",
|
|
3284
|
+
"description": "An extra label to be displayed after the input UI. Markdown is supported. Default: empty string."
|
|
3285
|
+
},
|
|
3286
|
+
"widget": {
|
|
3287
|
+
"type": "string",
|
|
3288
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
3289
|
+
"const": "string"
|
|
3290
|
+
},
|
|
3291
|
+
"default": {
|
|
3292
|
+
"type": "string",
|
|
3293
|
+
"description": "Default value."
|
|
3294
|
+
},
|
|
3295
|
+
"type": {
|
|
3296
|
+
"type": "string",
|
|
3297
|
+
"enum": [
|
|
3298
|
+
"text",
|
|
3299
|
+
"url",
|
|
3300
|
+
"email"
|
|
3301
|
+
],
|
|
3302
|
+
"description": "Data type. It’s useful when the input value needs a validation. Default: text."
|
|
3303
|
+
},
|
|
3304
|
+
"prefix": {
|
|
3305
|
+
"type": "string",
|
|
3306
|
+
"description": "A string to be prepended to the value. Default: empty string."
|
|
3307
|
+
},
|
|
3308
|
+
"suffix": {
|
|
3309
|
+
"type": "string",
|
|
3310
|
+
"description": "A string to be appended to the value. Default: empty string."
|
|
3311
|
+
},
|
|
3312
|
+
"name": {
|
|
3313
|
+
"type": "string",
|
|
3314
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
3315
|
+
},
|
|
3316
|
+
"label": {
|
|
3317
|
+
"type": "string",
|
|
3318
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
3319
|
+
},
|
|
3320
|
+
"comment": {
|
|
3321
|
+
"type": "string",
|
|
3322
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
3323
|
+
},
|
|
3324
|
+
"required": {
|
|
3325
|
+
"anyOf": [
|
|
3326
|
+
{
|
|
3327
|
+
"type": "boolean"
|
|
3328
|
+
},
|
|
3329
|
+
{
|
|
3330
|
+
"type": "array",
|
|
3331
|
+
"items": {
|
|
3332
|
+
"$ref": "#/definitions/LocaleCode"
|
|
3333
|
+
}
|
|
3334
|
+
}
|
|
3335
|
+
],
|
|
3336
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
3337
|
+
},
|
|
3338
|
+
"readonly": {
|
|
3339
|
+
"type": "boolean",
|
|
3340
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
3341
|
+
},
|
|
3342
|
+
"pattern": {
|
|
3343
|
+
"type": "array",
|
|
3344
|
+
"minItems": 2,
|
|
3345
|
+
"items": [
|
|
3346
|
+
{
|
|
3347
|
+
"anyOf": [
|
|
3348
|
+
{
|
|
3349
|
+
"type": "string"
|
|
3350
|
+
},
|
|
3351
|
+
{
|
|
3352
|
+
"type": "string",
|
|
3353
|
+
"format": "regex"
|
|
3354
|
+
}
|
|
3355
|
+
]
|
|
3356
|
+
},
|
|
3357
|
+
{
|
|
3358
|
+
"type": "string"
|
|
3359
|
+
}
|
|
3360
|
+
],
|
|
3361
|
+
"maxItems": 2,
|
|
3362
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
3363
|
+
},
|
|
3364
|
+
"hint": {
|
|
3365
|
+
"type": "string",
|
|
3366
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
3367
|
+
},
|
|
3368
|
+
"preview": {
|
|
3369
|
+
"type": "boolean",
|
|
3370
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
3371
|
+
},
|
|
3372
|
+
"i18n": {
|
|
3373
|
+
"anyOf": [
|
|
3374
|
+
{
|
|
3375
|
+
"type": "boolean"
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
"type": "string",
|
|
3379
|
+
"const": "duplicate"
|
|
3380
|
+
},
|
|
3381
|
+
{
|
|
3382
|
+
"type": "string",
|
|
3383
|
+
"const": "translate"
|
|
3384
|
+
},
|
|
3385
|
+
{
|
|
3386
|
+
"type": "string",
|
|
3387
|
+
"const": "none"
|
|
3388
|
+
}
|
|
3389
|
+
],
|
|
3390
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
3391
|
+
}
|
|
3392
|
+
},
|
|
3393
|
+
"required": [
|
|
3394
|
+
"name",
|
|
3395
|
+
"widget"
|
|
3396
|
+
],
|
|
3397
|
+
"description": "String field definition."
|
|
3398
|
+
},
|
|
3399
|
+
"TextField": {
|
|
3400
|
+
"type": "object",
|
|
3401
|
+
"additionalProperties": false,
|
|
3402
|
+
"properties": {
|
|
3403
|
+
"minlength": {
|
|
3404
|
+
"type": "number",
|
|
3405
|
+
"description": "Minimum number of characters that can be entered in the input. Default: 0."
|
|
3406
|
+
},
|
|
3407
|
+
"maxlength": {
|
|
3408
|
+
"type": "number",
|
|
3409
|
+
"description": "Maximum number of characters that can be entered in the input. Default: infinity."
|
|
3410
|
+
},
|
|
3411
|
+
"widget": {
|
|
3412
|
+
"type": "string",
|
|
3413
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
3414
|
+
"const": "text"
|
|
3415
|
+
},
|
|
3416
|
+
"default": {
|
|
3417
|
+
"type": "string",
|
|
3418
|
+
"description": "Default value."
|
|
3419
|
+
},
|
|
3420
|
+
"name": {
|
|
3421
|
+
"type": "string",
|
|
3422
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
3423
|
+
},
|
|
3424
|
+
"label": {
|
|
3425
|
+
"type": "string",
|
|
3426
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
3427
|
+
},
|
|
3428
|
+
"comment": {
|
|
3429
|
+
"type": "string",
|
|
3430
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
3431
|
+
},
|
|
3432
|
+
"required": {
|
|
3433
|
+
"anyOf": [
|
|
3434
|
+
{
|
|
3435
|
+
"type": "boolean"
|
|
3436
|
+
},
|
|
3437
|
+
{
|
|
3438
|
+
"type": "array",
|
|
3439
|
+
"items": {
|
|
3440
|
+
"$ref": "#/definitions/LocaleCode"
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
],
|
|
3444
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
3445
|
+
},
|
|
3446
|
+
"readonly": {
|
|
3447
|
+
"type": "boolean",
|
|
3448
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
3449
|
+
},
|
|
3450
|
+
"pattern": {
|
|
3451
|
+
"type": "array",
|
|
3452
|
+
"minItems": 2,
|
|
3453
|
+
"items": [
|
|
3454
|
+
{
|
|
3455
|
+
"anyOf": [
|
|
3456
|
+
{
|
|
3457
|
+
"type": "string"
|
|
3458
|
+
},
|
|
3459
|
+
{
|
|
3460
|
+
"type": "string",
|
|
3461
|
+
"format": "regex"
|
|
3462
|
+
}
|
|
3463
|
+
]
|
|
3464
|
+
},
|
|
3465
|
+
{
|
|
3466
|
+
"type": "string"
|
|
3467
|
+
}
|
|
3468
|
+
],
|
|
3469
|
+
"maxItems": 2,
|
|
3470
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
3471
|
+
},
|
|
3472
|
+
"hint": {
|
|
3473
|
+
"type": "string",
|
|
3474
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
3475
|
+
},
|
|
3476
|
+
"preview": {
|
|
3477
|
+
"type": "boolean",
|
|
3478
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
3479
|
+
},
|
|
3480
|
+
"i18n": {
|
|
3481
|
+
"anyOf": [
|
|
3482
|
+
{
|
|
3483
|
+
"type": "boolean"
|
|
3484
|
+
},
|
|
3485
|
+
{
|
|
3486
|
+
"type": "string",
|
|
3487
|
+
"const": "duplicate"
|
|
3488
|
+
},
|
|
3489
|
+
{
|
|
3490
|
+
"type": "string",
|
|
3491
|
+
"const": "translate"
|
|
3492
|
+
},
|
|
3493
|
+
{
|
|
3494
|
+
"type": "string",
|
|
3495
|
+
"const": "none"
|
|
3496
|
+
}
|
|
3497
|
+
],
|
|
3498
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
3499
|
+
}
|
|
3500
|
+
},
|
|
3501
|
+
"required": [
|
|
3502
|
+
"name",
|
|
3503
|
+
"widget"
|
|
3504
|
+
],
|
|
3505
|
+
"description": "Text field definition."
|
|
3506
|
+
},
|
|
3507
|
+
"UuidField": {
|
|
3508
|
+
"type": "object",
|
|
3509
|
+
"additionalProperties": false,
|
|
3510
|
+
"properties": {
|
|
3511
|
+
"widget": {
|
|
3512
|
+
"type": "string",
|
|
3513
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`.",
|
|
3514
|
+
"const": "uuid"
|
|
3515
|
+
},
|
|
3516
|
+
"default": {
|
|
3517
|
+
"type": "string",
|
|
3518
|
+
"description": "Default value."
|
|
3519
|
+
},
|
|
3520
|
+
"prefix": {
|
|
3521
|
+
"type": "string",
|
|
3522
|
+
"description": "A string to be prepended to the value. Default: empty string."
|
|
3523
|
+
},
|
|
3524
|
+
"use_b32_encoding": {
|
|
3525
|
+
"type": "boolean",
|
|
3526
|
+
"description": "Whether to encode the value with Base32. Default: `false`."
|
|
3527
|
+
},
|
|
3528
|
+
"read_only": {
|
|
3529
|
+
"type": "boolean",
|
|
3530
|
+
"description": "Whether to make the field read-only. Default: `true`."
|
|
3531
|
+
},
|
|
3532
|
+
"name": {
|
|
3533
|
+
"type": "string",
|
|
3534
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
3535
|
+
},
|
|
3536
|
+
"label": {
|
|
3537
|
+
"type": "string",
|
|
3538
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
3539
|
+
},
|
|
3540
|
+
"comment": {
|
|
3541
|
+
"type": "string",
|
|
3542
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
3543
|
+
},
|
|
3544
|
+
"required": {
|
|
3545
|
+
"anyOf": [
|
|
3546
|
+
{
|
|
3547
|
+
"type": "boolean"
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
"type": "array",
|
|
3551
|
+
"items": {
|
|
3552
|
+
"$ref": "#/definitions/LocaleCode"
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
],
|
|
3556
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
3557
|
+
},
|
|
3558
|
+
"readonly": {
|
|
3559
|
+
"type": "boolean",
|
|
3560
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
3561
|
+
},
|
|
3562
|
+
"pattern": {
|
|
3563
|
+
"type": "array",
|
|
3564
|
+
"minItems": 2,
|
|
3565
|
+
"items": [
|
|
3566
|
+
{
|
|
3567
|
+
"anyOf": [
|
|
3568
|
+
{
|
|
3569
|
+
"type": "string"
|
|
3570
|
+
},
|
|
3571
|
+
{
|
|
3572
|
+
"type": "string",
|
|
3573
|
+
"format": "regex"
|
|
3574
|
+
}
|
|
3575
|
+
]
|
|
3576
|
+
},
|
|
3577
|
+
{
|
|
3578
|
+
"type": "string"
|
|
3579
|
+
}
|
|
3580
|
+
],
|
|
3581
|
+
"maxItems": 2,
|
|
3582
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
3583
|
+
},
|
|
3584
|
+
"hint": {
|
|
3585
|
+
"type": "string",
|
|
3586
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
3587
|
+
},
|
|
3588
|
+
"preview": {
|
|
3589
|
+
"type": "boolean",
|
|
3590
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
3591
|
+
},
|
|
3592
|
+
"i18n": {
|
|
3593
|
+
"anyOf": [
|
|
3594
|
+
{
|
|
3595
|
+
"type": "boolean"
|
|
3596
|
+
},
|
|
3597
|
+
{
|
|
3598
|
+
"type": "string",
|
|
3599
|
+
"const": "duplicate"
|
|
3600
|
+
},
|
|
3601
|
+
{
|
|
3602
|
+
"type": "string",
|
|
3603
|
+
"const": "translate"
|
|
3604
|
+
},
|
|
3605
|
+
{
|
|
3606
|
+
"type": "string",
|
|
3607
|
+
"const": "none"
|
|
3608
|
+
}
|
|
3609
|
+
],
|
|
3610
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
3611
|
+
}
|
|
3612
|
+
},
|
|
3613
|
+
"required": [
|
|
3614
|
+
"name",
|
|
3615
|
+
"widget"
|
|
3616
|
+
],
|
|
3617
|
+
"description": "UUID field definition."
|
|
3618
|
+
},
|
|
3619
|
+
"CustomField": {
|
|
3620
|
+
"type": "object",
|
|
3621
|
+
"properties": {
|
|
3622
|
+
"name": {
|
|
3623
|
+
"type": "string",
|
|
3624
|
+
"description": "Unique identifier for the field. It cannot include periods and spaces."
|
|
3625
|
+
},
|
|
3626
|
+
"label": {
|
|
3627
|
+
"type": "string",
|
|
3628
|
+
"description": "Label of the field to be displayed in the editor UI. Default: `name` field value."
|
|
3629
|
+
},
|
|
3630
|
+
"comment": {
|
|
3631
|
+
"type": "string",
|
|
3632
|
+
"description": "Short description of the field to be displayed in the editor UI."
|
|
3633
|
+
},
|
|
3634
|
+
"widget": {
|
|
3635
|
+
"type": "string",
|
|
3636
|
+
"description": "Name of a widget that defines the input UI and data type. Default: `string`."
|
|
3637
|
+
},
|
|
3638
|
+
"required": {
|
|
3639
|
+
"anyOf": [
|
|
3640
|
+
{
|
|
3641
|
+
"type": "boolean"
|
|
3642
|
+
},
|
|
3643
|
+
{
|
|
3644
|
+
"type": "array",
|
|
3645
|
+
"items": {
|
|
3646
|
+
"$ref": "#/definitions/LocaleCode"
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
3649
|
+
],
|
|
3650
|
+
"description": "Whether to make data input on the field required. Default: `true`. This option also affects data output if the `omit_empty_optional_fields` global output option is `true`. If i18n is enabled and the field doesn’t require input in all locales, required locale codes can be passed as an array like `[en, fr]` instead of a boolean."
|
|
3651
|
+
},
|
|
3652
|
+
"readonly": {
|
|
3653
|
+
"type": "boolean",
|
|
3654
|
+
"description": "Whether to make the field read-only. Default: `false`. This is useful when a `default` value is provided and the field should not be editable by users."
|
|
3655
|
+
},
|
|
3656
|
+
"pattern": {
|
|
3657
|
+
"type": "array",
|
|
3658
|
+
"minItems": 2,
|
|
3659
|
+
"items": [
|
|
3660
|
+
{
|
|
3661
|
+
"anyOf": [
|
|
3662
|
+
{
|
|
3663
|
+
"type": "string"
|
|
3664
|
+
},
|
|
3665
|
+
{
|
|
3666
|
+
"type": "string",
|
|
3667
|
+
"format": "regex"
|
|
3668
|
+
}
|
|
3669
|
+
]
|
|
3670
|
+
},
|
|
3671
|
+
{
|
|
3672
|
+
"type": "string"
|
|
3673
|
+
}
|
|
3674
|
+
],
|
|
3675
|
+
"maxItems": 2,
|
|
3676
|
+
"description": "Validation format. The first argument is a regular expression matching pattern for a valid input value, and the second argument is an error message. This option has no effect on a List or Object field with subfields."
|
|
3677
|
+
},
|
|
3678
|
+
"hint": {
|
|
3679
|
+
"type": "string",
|
|
3680
|
+
"description": "Help message to be displayed below the input UI. Limited Markdown formatting is supported: bold, italic, strikethrough and links."
|
|
3681
|
+
},
|
|
3682
|
+
"preview": {
|
|
3683
|
+
"type": "boolean",
|
|
3684
|
+
"description": "Whether to show the preview of the field. Default: `true`."
|
|
3685
|
+
},
|
|
3686
|
+
"i18n": {
|
|
3687
|
+
"anyOf": [
|
|
3688
|
+
{
|
|
3689
|
+
"type": "boolean"
|
|
3690
|
+
},
|
|
3691
|
+
{
|
|
3692
|
+
"type": "string",
|
|
3693
|
+
"const": "duplicate"
|
|
3694
|
+
},
|
|
3695
|
+
{
|
|
3696
|
+
"type": "string",
|
|
3697
|
+
"const": "translate"
|
|
3698
|
+
},
|
|
3699
|
+
{
|
|
3700
|
+
"type": "string",
|
|
3701
|
+
"const": "none"
|
|
3702
|
+
}
|
|
3703
|
+
],
|
|
3704
|
+
"description": "Whether to enable the editor UI in locales other than the default locale. Default: `false`. `duplicate` disables the UI in non-default like `false` but automatically copies the default locale’s value to other locales. `translate` and `none` are aliases of `true` and `false`, respectively. This option only works when i18n is set up with the global and collection-level `i18n` option."
|
|
3705
|
+
}
|
|
3706
|
+
},
|
|
3707
|
+
"required": [
|
|
3708
|
+
"name"
|
|
3709
|
+
],
|
|
3710
|
+
"description": "Entry field using a custom widget. It can contain any properties."
|
|
3711
|
+
},
|
|
3712
|
+
"FileFormat": {
|
|
3713
|
+
"anyOf": [
|
|
3714
|
+
{
|
|
3715
|
+
"type": "string",
|
|
3716
|
+
"const": "yml"
|
|
3717
|
+
},
|
|
3718
|
+
{
|
|
3719
|
+
"type": "string",
|
|
3720
|
+
"const": "yaml"
|
|
3721
|
+
},
|
|
3722
|
+
{
|
|
3723
|
+
"type": "string",
|
|
3724
|
+
"const": "toml"
|
|
3725
|
+
},
|
|
3726
|
+
{
|
|
3727
|
+
"type": "string",
|
|
3728
|
+
"const": "json"
|
|
3729
|
+
},
|
|
3730
|
+
{
|
|
3731
|
+
"type": "string",
|
|
3732
|
+
"const": "frontmatter"
|
|
3733
|
+
},
|
|
3734
|
+
{
|
|
3735
|
+
"$ref": "#/definitions/FrontMatterFormat"
|
|
3736
|
+
}
|
|
3737
|
+
],
|
|
3738
|
+
"description": "Supported file format."
|
|
3739
|
+
},
|
|
3740
|
+
"FrontMatterFormat": {
|
|
3741
|
+
"type": "string",
|
|
3742
|
+
"enum": [
|
|
3743
|
+
"yaml-frontmatter",
|
|
3744
|
+
"toml-frontmatter",
|
|
3745
|
+
"json-frontmatter"
|
|
3746
|
+
],
|
|
3747
|
+
"description": "Supported Markdown front matter format."
|
|
3748
|
+
},
|
|
3749
|
+
"I18nOptions": {
|
|
3750
|
+
"type": "object",
|
|
3751
|
+
"properties": {
|
|
3752
|
+
"structure": {
|
|
3753
|
+
"$ref": "#/definitions/I18nFileStructure",
|
|
3754
|
+
"description": "File structure for entry collections. File/singleton collection must define the structure using `{{locale}}` in the `file` option."
|
|
3755
|
+
},
|
|
3756
|
+
"locales": {
|
|
3757
|
+
"type": "array",
|
|
3758
|
+
"items": {
|
|
3759
|
+
"$ref": "#/definitions/LocaleCode"
|
|
3760
|
+
},
|
|
3761
|
+
"description": "List of all available locales."
|
|
3762
|
+
},
|
|
3763
|
+
"default_locale": {
|
|
3764
|
+
"$ref": "#/definitions/LocaleCode",
|
|
3765
|
+
"description": "Default locale. Default: first locale in the `locales` option."
|
|
3766
|
+
},
|
|
3767
|
+
"initial_locales": {
|
|
3768
|
+
"anyOf": [
|
|
3769
|
+
{
|
|
3770
|
+
"type": "array",
|
|
3771
|
+
"items": {
|
|
3772
|
+
"$ref": "#/definitions/LocaleCode"
|
|
3773
|
+
}
|
|
3774
|
+
},
|
|
3775
|
+
{
|
|
3776
|
+
"type": "string",
|
|
3777
|
+
"const": "all"
|
|
3778
|
+
},
|
|
3779
|
+
{
|
|
3780
|
+
"type": "string",
|
|
3781
|
+
"const": "default"
|
|
3782
|
+
}
|
|
3783
|
+
],
|
|
3784
|
+
"description": "Locales to be enabled when creating a new entry draft. If this option is used, users will be able to disable the output of non-default locales through the UI. See https://github.com/sveltia/sveltia-cms#disabling-non-default-locale-content for details."
|
|
3785
|
+
},
|
|
3786
|
+
"save_all_locales": {
|
|
3787
|
+
"type": "boolean",
|
|
3788
|
+
"description": "Whether to save collection entries in all the locales. If `false`, users will be able to disable the output of non-default locales through the UI. See https://github.com/sveltia/sveltia-cms#disabling-non-default-locale-content for details."
|
|
3789
|
+
},
|
|
3790
|
+
"canonical_slug": {
|
|
3791
|
+
"type": "object",
|
|
3792
|
+
"properties": {
|
|
3793
|
+
"key": {
|
|
3794
|
+
"type": "string"
|
|
3795
|
+
},
|
|
3796
|
+
"value": {
|
|
3797
|
+
"type": "string"
|
|
3798
|
+
}
|
|
3799
|
+
},
|
|
3800
|
+
"required": [
|
|
3801
|
+
"key",
|
|
3802
|
+
"value"
|
|
3803
|
+
],
|
|
3804
|
+
"additionalProperties": false,
|
|
3805
|
+
"description": "Property name and value template used to add a canonical slug to entry files, which helps Sveltia CMS and some frameworks to link localized files when entry slugs are localized. The default property name is `translationKey` used in Hugo’s multilingual support, and the default value is the default locale’s slug. See https://github.com/sveltia/sveltia-cms#localizing-entry-slugs for details."
|
|
3806
|
+
},
|
|
3807
|
+
"omit_default_locale_from_filename": {
|
|
3808
|
+
"type": "boolean",
|
|
3809
|
+
"description": "Whether to exclude the default locale from entry filenames. Default: `false`. This option applies to entry collections with the `multiple_files` i18n structure enabled, as well as to file/singleton collection items with the `file` path ending with `.{{locale}}.<extension>`, aiming to support Zola’s multilingual sites: https://www.getzola.org/documentation/content/multilingual/."
|
|
3810
|
+
}
|
|
3811
|
+
},
|
|
3812
|
+
"required": [
|
|
3813
|
+
"structure",
|
|
3814
|
+
"locales"
|
|
3815
|
+
],
|
|
3816
|
+
"additionalProperties": false,
|
|
3817
|
+
"description": "Global, collection-level or collection file-level i18n options."
|
|
3818
|
+
},
|
|
3819
|
+
"I18nFileStructure": {
|
|
3820
|
+
"type": "string",
|
|
3821
|
+
"enum": [
|
|
3822
|
+
"single_file",
|
|
3823
|
+
"multiple_files",
|
|
3824
|
+
"multiple_folders",
|
|
3825
|
+
"multiple_folders_i18n_root"
|
|
3826
|
+
],
|
|
3827
|
+
"description": "Internationalization (i18n) file structure type."
|
|
3828
|
+
},
|
|
3829
|
+
"CollectionFilter": {
|
|
3830
|
+
"type": "object",
|
|
3831
|
+
"properties": {
|
|
3832
|
+
"field": {
|
|
3833
|
+
"$ref": "#/definitions/FieldKeyPath",
|
|
3834
|
+
"description": "Field name."
|
|
3835
|
+
},
|
|
3836
|
+
"value": {
|
|
3837
|
+
"anyOf": [
|
|
3838
|
+
{},
|
|
3839
|
+
{
|
|
3840
|
+
"type": "array",
|
|
3841
|
+
"items": {}
|
|
3842
|
+
}
|
|
3843
|
+
],
|
|
3844
|
+
"description": "Field value. `null` can be used to match an undefined field. Multiple values can be defined with an array. This option or `pattern` is required."
|
|
3845
|
+
},
|
|
3846
|
+
"pattern": {
|
|
3847
|
+
"anyOf": [
|
|
3848
|
+
{
|
|
3849
|
+
"type": "string"
|
|
3850
|
+
},
|
|
3851
|
+
{
|
|
3852
|
+
"type": "string",
|
|
3853
|
+
"format": "regex"
|
|
3854
|
+
}
|
|
3855
|
+
],
|
|
3856
|
+
"description": "Regular expression matching pattern."
|
|
3857
|
+
}
|
|
3858
|
+
},
|
|
3859
|
+
"required": [
|
|
3860
|
+
"field"
|
|
3861
|
+
],
|
|
3862
|
+
"additionalProperties": false,
|
|
3863
|
+
"description": "Collection filter options."
|
|
3864
|
+
},
|
|
3865
|
+
"FileExtension": {
|
|
3866
|
+
"type": "string",
|
|
3867
|
+
"description": "Supported file extension."
|
|
3868
|
+
},
|
|
3869
|
+
"SortableFields": {
|
|
3870
|
+
"type": "object",
|
|
3871
|
+
"properties": {
|
|
3872
|
+
"fields": {
|
|
3873
|
+
"type": "array",
|
|
3874
|
+
"items": {
|
|
3875
|
+
"$ref": "#/definitions/FieldKeyPath"
|
|
3876
|
+
},
|
|
3877
|
+
"description": "A list of sortable field names."
|
|
3878
|
+
},
|
|
3879
|
+
"default": {
|
|
3880
|
+
"$ref": "#/definitions/SortableFieldsDefaultOptions",
|
|
3881
|
+
"description": "Default sort settings. See https://github.com/sveltia/sveltia-cms#specifying-default-sort-field-and-direction for details."
|
|
3882
|
+
}
|
|
3883
|
+
},
|
|
3884
|
+
"required": [
|
|
3885
|
+
"fields"
|
|
3886
|
+
],
|
|
3887
|
+
"additionalProperties": false,
|
|
3888
|
+
"description": "A collection’s advanced sortable fields definition, which is compatible with Static CMS."
|
|
3889
|
+
},
|
|
3890
|
+
"SortableFieldsDefaultOptions": {
|
|
3891
|
+
"type": "object",
|
|
3892
|
+
"properties": {
|
|
3893
|
+
"field": {
|
|
3894
|
+
"$ref": "#/definitions/FieldKeyPath",
|
|
3895
|
+
"description": "A field name to be sorted by default."
|
|
3896
|
+
},
|
|
3897
|
+
"direction": {
|
|
3898
|
+
"type": "string",
|
|
3899
|
+
"enum": [
|
|
3900
|
+
"ascending",
|
|
3901
|
+
"descending",
|
|
3902
|
+
"Ascending",
|
|
3903
|
+
"Descending",
|
|
3904
|
+
"None"
|
|
3905
|
+
],
|
|
3906
|
+
"description": "Default sort direction. Title case values are supported for Static CMS compatibility. However, `None` is the same as `ascending`. Default: `ascending`."
|
|
3907
|
+
}
|
|
3908
|
+
},
|
|
3909
|
+
"required": [
|
|
3910
|
+
"field"
|
|
3911
|
+
],
|
|
3912
|
+
"additionalProperties": false,
|
|
3913
|
+
"description": "The default options for the sortable fields."
|
|
3914
|
+
},
|
|
3915
|
+
"ViewFilter": {
|
|
3916
|
+
"type": "object",
|
|
3917
|
+
"properties": {
|
|
3918
|
+
"label": {
|
|
3919
|
+
"type": "string",
|
|
3920
|
+
"description": "Label."
|
|
3921
|
+
},
|
|
3922
|
+
"field": {
|
|
3923
|
+
"$ref": "#/definitions/FieldKeyPath",
|
|
3924
|
+
"description": "Field name."
|
|
3925
|
+
},
|
|
3926
|
+
"pattern": {
|
|
3927
|
+
"anyOf": [
|
|
3928
|
+
{
|
|
3929
|
+
"type": "string"
|
|
3930
|
+
},
|
|
3931
|
+
{
|
|
3932
|
+
"type": "string",
|
|
3933
|
+
"format": "regex"
|
|
3934
|
+
},
|
|
3935
|
+
{
|
|
3936
|
+
"type": "boolean"
|
|
3937
|
+
}
|
|
3938
|
+
],
|
|
3939
|
+
"description": "Regular expression matching pattern or exact value."
|
|
3940
|
+
}
|
|
3941
|
+
},
|
|
3942
|
+
"required": [
|
|
3943
|
+
"label",
|
|
3944
|
+
"field",
|
|
3945
|
+
"pattern"
|
|
3946
|
+
],
|
|
3947
|
+
"additionalProperties": false,
|
|
3948
|
+
"description": "View filter."
|
|
3949
|
+
},
|
|
3950
|
+
"ViewGroup": {
|
|
3951
|
+
"type": "object",
|
|
3952
|
+
"properties": {
|
|
3953
|
+
"label": {
|
|
3954
|
+
"type": "string",
|
|
3955
|
+
"description": "Label."
|
|
3956
|
+
},
|
|
3957
|
+
"field": {
|
|
3958
|
+
"$ref": "#/definitions/FieldKeyPath",
|
|
3959
|
+
"description": "Field name."
|
|
3960
|
+
},
|
|
3961
|
+
"pattern": {
|
|
3962
|
+
"anyOf": [
|
|
3963
|
+
{
|
|
3964
|
+
"type": "string"
|
|
3965
|
+
},
|
|
3966
|
+
{
|
|
3967
|
+
"type": "string",
|
|
3968
|
+
"format": "regex"
|
|
3969
|
+
},
|
|
3970
|
+
{
|
|
3971
|
+
"type": "boolean"
|
|
3972
|
+
}
|
|
3973
|
+
],
|
|
3974
|
+
"description": "Regular expression matching pattern or exact value."
|
|
3975
|
+
}
|
|
3976
|
+
},
|
|
3977
|
+
"required": [
|
|
3978
|
+
"label",
|
|
3979
|
+
"field",
|
|
3980
|
+
"pattern"
|
|
3981
|
+
],
|
|
3982
|
+
"additionalProperties": false,
|
|
3983
|
+
"description": "View group."
|
|
3984
|
+
},
|
|
3985
|
+
"EditorOptions": {
|
|
3986
|
+
"type": "object",
|
|
3987
|
+
"properties": {
|
|
3988
|
+
"preview": {
|
|
3989
|
+
"type": "boolean",
|
|
3990
|
+
"description": "Whether to show the preview pane. Default: `true`."
|
|
3991
|
+
}
|
|
3992
|
+
},
|
|
3993
|
+
"required": [
|
|
3994
|
+
"preview"
|
|
3995
|
+
],
|
|
3996
|
+
"additionalProperties": false,
|
|
3997
|
+
"description": "Editor options."
|
|
3998
|
+
},
|
|
3999
|
+
"NestedCollectionOptions": {
|
|
4000
|
+
"type": "object",
|
|
4001
|
+
"properties": {
|
|
4002
|
+
"depth": {
|
|
4003
|
+
"type": "number",
|
|
4004
|
+
"description": "Maximum depth to show nested items in the collection tree. Default: infinity."
|
|
4005
|
+
},
|
|
4006
|
+
"summary": {
|
|
4007
|
+
"type": "string",
|
|
4008
|
+
"description": "Summary template for a tree item. Default: `{{title}}`."
|
|
4009
|
+
}
|
|
4010
|
+
},
|
|
4011
|
+
"additionalProperties": false,
|
|
4012
|
+
"description": "Nested collection options."
|
|
4013
|
+
},
|
|
4014
|
+
"CollectionMetaData": {
|
|
4015
|
+
"type": "object",
|
|
4016
|
+
"properties": {
|
|
4017
|
+
"path": {
|
|
4018
|
+
"$ref": "#/definitions/CollectionMetaDataPath",
|
|
4019
|
+
"description": "Entry path options."
|
|
4020
|
+
}
|
|
4021
|
+
},
|
|
4022
|
+
"additionalProperties": false,
|
|
4023
|
+
"description": "Collection meta data."
|
|
4024
|
+
},
|
|
4025
|
+
"CollectionMetaDataPath": {
|
|
4026
|
+
"type": "object",
|
|
4027
|
+
"properties": {
|
|
4028
|
+
"widget": {
|
|
4029
|
+
"type": "string",
|
|
4030
|
+
"const": "string",
|
|
4031
|
+
"description": "Widget for editing the path name."
|
|
4032
|
+
},
|
|
4033
|
+
"label": {
|
|
4034
|
+
"type": "string",
|
|
4035
|
+
"description": "Label for the path editor."
|
|
4036
|
+
},
|
|
4037
|
+
"index_file": {
|
|
4038
|
+
"type": "string",
|
|
4039
|
+
"description": "Index file name to be used."
|
|
4040
|
+
}
|
|
4041
|
+
},
|
|
4042
|
+
"additionalProperties": false,
|
|
4043
|
+
"description": "Collection meta data’s path options."
|
|
4044
|
+
},
|
|
4045
|
+
"CollectionIndexFile": {
|
|
4046
|
+
"type": "object",
|
|
4047
|
+
"properties": {
|
|
4048
|
+
"name": {
|
|
4049
|
+
"type": "string",
|
|
4050
|
+
"description": "Index file name without a locale or file extension. Default: `_index`, which is used for Hugo’s special index file."
|
|
4051
|
+
},
|
|
4052
|
+
"label": {
|
|
4053
|
+
"type": "string",
|
|
4054
|
+
"description": "Label to be displayed in the editor UI. Default: Index File or its localized version."
|
|
4055
|
+
},
|
|
4056
|
+
"icon": {
|
|
4057
|
+
"type": "string",
|
|
4058
|
+
"description": "Name of a Material Symbols icon to be displayed in the editor UI. Default: `home`."
|
|
4059
|
+
},
|
|
4060
|
+
"fields": {
|
|
4061
|
+
"type": "array",
|
|
4062
|
+
"items": {
|
|
4063
|
+
"$ref": "#/definitions/Field"
|
|
4064
|
+
},
|
|
4065
|
+
"description": "Set of fields for the index file. If omitted, the regular entry collection `fields` will be used instead."
|
|
4066
|
+
},
|
|
4067
|
+
"editor": {
|
|
4068
|
+
"$ref": "#/definitions/EditorOptions",
|
|
4069
|
+
"description": "Editor view options."
|
|
4070
|
+
}
|
|
4071
|
+
},
|
|
4072
|
+
"additionalProperties": false,
|
|
4073
|
+
"description": "Index file inclusion options."
|
|
4074
|
+
},
|
|
4075
|
+
"OutputOptions": {
|
|
4076
|
+
"type": "object",
|
|
4077
|
+
"properties": {
|
|
4078
|
+
"omit_empty_optional_fields": {
|
|
4079
|
+
"type": "boolean",
|
|
4080
|
+
"description": "Whether to prevent fields with `required: false` and an empty value from being included in entry data output. Default: `false`."
|
|
4081
|
+
},
|
|
4082
|
+
"encode_file_path": {
|
|
4083
|
+
"type": "boolean",
|
|
4084
|
+
"description": "Whether to encode the file path in File/Image fields. Default: `false`. This is useful when a file path contains special characters that need to be URL-encoded, such as spaces and parentheses. For example, `Hello World (1).webp` would be `Hello%20World%20%281%29.webp`. In general, File/Image fields should contain the original file path, and web-specific encoding should be done in the front-end code."
|
|
4085
|
+
},
|
|
4086
|
+
"json": {
|
|
4087
|
+
"$ref": "#/definitions/JsonFormatOptions",
|
|
4088
|
+
"description": "JSON format options."
|
|
4089
|
+
},
|
|
4090
|
+
"yaml": {
|
|
4091
|
+
"$ref": "#/definitions/YamlFormatOptions",
|
|
4092
|
+
"description": "YAML format options."
|
|
4093
|
+
}
|
|
4094
|
+
},
|
|
4095
|
+
"additionalProperties": false,
|
|
4096
|
+
"description": "Data output options."
|
|
4097
|
+
},
|
|
4098
|
+
"JsonFormatOptions": {
|
|
4099
|
+
"type": "object",
|
|
4100
|
+
"properties": {
|
|
4101
|
+
"indent_style": {
|
|
4102
|
+
"type": "string",
|
|
4103
|
+
"enum": [
|
|
4104
|
+
"space",
|
|
4105
|
+
"tab"
|
|
4106
|
+
],
|
|
4107
|
+
"description": "Indent style. Default: 'space'."
|
|
4108
|
+
},
|
|
4109
|
+
"indent_size": {
|
|
4110
|
+
"type": "number",
|
|
4111
|
+
"description": "Indent size. Default: 2."
|
|
4112
|
+
}
|
|
4113
|
+
},
|
|
4114
|
+
"additionalProperties": false,
|
|
4115
|
+
"description": "JSON format options."
|
|
4116
|
+
},
|
|
4117
|
+
"YamlFormatOptions": {
|
|
4118
|
+
"type": "object",
|
|
4119
|
+
"properties": {
|
|
4120
|
+
"indent_size": {
|
|
4121
|
+
"type": "number",
|
|
4122
|
+
"description": "Indent size. Default: 2."
|
|
4123
|
+
},
|
|
4124
|
+
"quote": {
|
|
4125
|
+
"type": "string",
|
|
4126
|
+
"enum": [
|
|
4127
|
+
"none",
|
|
4128
|
+
"single",
|
|
4129
|
+
"double"
|
|
4130
|
+
],
|
|
4131
|
+
"description": "String value’s default quote type. Default: 'none'."
|
|
4132
|
+
}
|
|
4133
|
+
},
|
|
4134
|
+
"additionalProperties": false,
|
|
4135
|
+
"description": "YAML format options."
|
|
4136
|
+
}
|
|
4137
|
+
},
|
|
4138
|
+
"title": "Sveltia CMS configuration file",
|
|
4139
|
+
"description": "JSON schema for the Sveltia CMS site configuration."
|
|
4140
|
+
}
|