Skip to content

Commit 322f861

Browse files
committed
Update schema files
1 parent e4ae5bd commit 322f861

11 files changed

+106
-18
lines changed

content/docs/settings.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ The following settings are supported to be split in multiple files:
5151

5252
| Setting name | Folder path | Information | JSON Schema |
5353
| ----------------------------------- | --------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------- |
54-
| `frontMatter.content.pageFolders` | `./.frontmatter/config/content/pagefolders/` | | `https://beta.frontmatter.codes/config/content.pagefolders.schema.json` |
55-
| `frontMatter.content.placeholders` | `./.frontmatter/config/content/placeholders/` | | `https://beta.frontmatter.codes/config/content.placeholders.schema.json` |
56-
| `frontMatter.content.snippets` | `./.frontmatter/config/content/snippets/` | The file name will be used as the ID/title of the snippet. | `https://beta.frontmatter.codes/config/content.snippets.schema.json` |
57-
| `frontMatter.custom.scripts` | `./.frontmatter/config/custom/scripts/` | | `https://beta.frontmatter.codes/config/custom.scripts.schema.json` |
58-
| `frontMatter.data.files` | `./.frontmatter/config/data/files/` | | `https://beta.frontmatter.codes/config/data.files.schema.json` |
59-
| `frontMatter.data.folders` | `./.frontmatter/config/data/folders/` | | `https://beta.frontmatter.codes/config/data.folders.schema.json` |
60-
| `frontMatter.data.types` | `./.frontmatter/config/data/types/` | | `https://beta.frontmatter.codes/config/data.types.schema.json` |
61-
| `frontMatter.taxonomy.contentTypes` | `./.frontmatter/config/taxonomy/contenttypes/` | | `https://beta.frontmatter.codes/config/taxonomy.contenttypes.schema.json` |
54+
| `frontMatter.content.pageFolders` | `./.frontmatter/config/content/pagefolders/` | | `https://frontmatter.codes/config/content.pagefolders.schema.json` |
55+
| `frontMatter.content.placeholders` | `./.frontmatter/config/content/placeholders/` | | `https://frontmatter.codes/config/content.placeholders.schema.json` |
56+
| `frontMatter.content.snippets` | `./.frontmatter/config/content/snippets/` | The file name will be used as the ID/title of the snippet. | `https://frontmatter.codes/config/content.snippets.schema.json` |
57+
| `frontMatter.custom.scripts` | `./.frontmatter/config/custom/scripts/` | | `https://frontmatter.codes/config/custom.scripts.schema.json` |
58+
| `frontMatter.data.files` | `./.frontmatter/config/data/files/` | | `https://frontmatter.codes/config/data.files.schema.json` |
59+
| `frontMatter.data.folders` | `./.frontmatter/config/data/folders/` | | `https://frontmatter.codes/config/data.folders.schema.json` |
60+
| `frontMatter.data.types` | `./.frontmatter/config/data/types/` | | `https://frontmatter.codes/config/data.types.schema.json` |
61+
| `frontMatter.taxonomy.contentTypes` | `./.frontmatter/config/taxonomy/contenttypes/` | | `https://frontmatter.codes/config/taxonomy.contenttypes.schema.json` |
6262

6363
> **Important**: The folder path is relative to the root of your project/solution and you create the
6464
> files in their corresponding folder. The file name is the same as the `id` of the setting.

public/config/content.pagefolders.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/content.pagefolders.schema.json",
44
"description": "Defines the settings for Front Matter page folder",
5-
"lastModified": "2022-12-08T15:44:28.298Z",
5+
"lastModified": "2022-12-12T14:13:34.448Z",
66
"type": "object",
77
"title": "Front Matter - page folder",
88
"properties": {

public/config/content.placeholders.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/content.placeholders.schema.json",
44
"description": "Defines the settings for Front Matter placeholder",
5-
"lastModified": "2022-12-08T15:44:28.298Z",
5+
"lastModified": "2022-12-12T14:13:34.448Z",
66
"type": "object",
77
"title": "Front Matter - placeholder",
88
"properties": {

public/config/content.snippets.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/content.snippets.schema.json",
44
"description": "Defines the settings for Front Matter snippet",
5-
"lastModified": "2022-12-08T15:44:28.298Z",
5+
"lastModified": "2022-12-12T14:13:34.449Z",
66
"type": "object",
77
"title": "Front Matter - snippet",
88
"required": [

public/config/custom.scripts.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/custom.scripts.schema.json",
44
"description": "Defines the settings for Front Matter custom script",
5-
"lastModified": "2022-12-08T15:44:28.297Z",
5+
"lastModified": "2022-12-12T14:13:34.448Z",
66
"type": "object",
77
"title": "Front Matter - custom script",
88
"properties": {

public/config/data.files.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/data.files.schema.json",
44
"description": "Defines the settings for Front Matter data file",
5-
"lastModified": "2022-12-08T15:44:28.298Z",
5+
"lastModified": "2022-12-12T14:13:34.448Z",
66
"type": "object",
77
"title": "Front Matter - data file",
88
"properties": {

public/config/data.folders.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/data.folders.schema.json",
44
"description": "Defines the settings for Front Matter data folder",
5-
"lastModified": "2022-12-08T15:44:28.298Z",
5+
"lastModified": "2022-12-12T14:13:34.449Z",
66
"type": "object",
77
"title": "Front Matter - data folder",
88
"properties": {

public/config/data.types.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/data.types.schema.json",
44
"description": "Defines the settings for Front Matter data type",
5-
"lastModified": "2022-12-08T15:44:28.298Z",
5+
"lastModified": "2022-12-12T14:13:34.449Z",
66
"type": "object",
77
"title": "Front Matter - data type",
88
"properties": {

public/config/taxonomy.contenttype.schema.json

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/taxonomy.contenttype.schema.json",
44
"description": "Defines the settings for Front Matter content type",
5-
"lastModified": "2022-12-08T15:44:28.297Z",
5+
"lastModified": "2022-12-12T14:13:34.448Z",
66
"type": "object",
77
"title": "Front Matter - content type",
88
"properties": {
@@ -212,6 +212,50 @@
212212
"type": "boolean",
213213
"default": false,
214214
"description": "Specify if the field is required"
215+
},
216+
"when": {
217+
"type": "object",
218+
"description": "Specify the conditions to show the field",
219+
"properties": {
220+
"fieldRef": {
221+
"type": "string",
222+
"description": "The field ID to use"
223+
},
224+
"operator": {
225+
"type": "string",
226+
"description": "The operator to use",
227+
"enum": [
228+
"eq",
229+
"neq",
230+
"contains",
231+
"notContains",
232+
"startsWith",
233+
"endsWith",
234+
"gt",
235+
"gte",
236+
"lt",
237+
"lte",
238+
"minimum",
239+
"maximum",
240+
"exlusiveMinimum",
241+
"exclusiveMaximum"
242+
]
243+
},
244+
"value": {
245+
"type": [
246+
"string",
247+
"number",
248+
"boolean",
249+
"array"
250+
],
251+
"description": "The value to compare"
252+
},
253+
"caseSensitive": {
254+
"type": "boolean",
255+
"default": true,
256+
"description": "Specify if the comparison is case sensitive. Default: true"
257+
}
258+
}
215259
}
216260
},
217261
"additionalProperties": false,

public/frontmatter.schema.json

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/frontmatter.schema.json",
44
"description": "Defines the settings for Front Matter",
5-
"lastModified": "2022-12-08T15:44:28.295Z",
5+
"lastModified": "2022-12-12T14:13:34.446Z",
66
"type": "object",
77
"title": "Front Matter - Team Settings",
88
"properties": {
@@ -997,6 +997,50 @@
997997
"type": "boolean",
998998
"default": false,
999999
"description": "Specify if the field is required"
1000+
},
1001+
"when": {
1002+
"type": "object",
1003+
"description": "Specify the conditions to show the field",
1004+
"properties": {
1005+
"fieldRef": {
1006+
"type": "string",
1007+
"description": "The field ID to use"
1008+
},
1009+
"operator": {
1010+
"type": "string",
1011+
"description": "The operator to use",
1012+
"enum": [
1013+
"eq",
1014+
"neq",
1015+
"contains",
1016+
"notContains",
1017+
"startsWith",
1018+
"endsWith",
1019+
"gt",
1020+
"gte",
1021+
"lt",
1022+
"lte",
1023+
"minimum",
1024+
"maximum",
1025+
"exlusiveMinimum",
1026+
"exclusiveMaximum"
1027+
]
1028+
},
1029+
"value": {
1030+
"type": [
1031+
"string",
1032+
"number",
1033+
"boolean",
1034+
"array"
1035+
],
1036+
"description": "The value to compare"
1037+
},
1038+
"caseSensitive": {
1039+
"type": "boolean",
1040+
"default": true,
1041+
"description": "Specify if the comparison is case sensitive. Default: true"
1042+
}
1043+
}
10001044
}
10011045
},
10021046
"additionalProperties": false,

scripts/generate-schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const fetch = require('node-fetch');
8888
}
8989

9090
// Sub-schema's filenames
91-
const ctSchemaName = "taxonomy.contenttype.schema.json";
91+
const ctSchemaName = "taxonomy.contenttypes.schema.json";
9292
const pageFoldersSchemaName = "content.pagefolders.schema.json";
9393
const snippetSchemaName = "content.snippets.schema.json";
9494
const placeholderSchemaName = "content.placeholders.schema.json";

0 commit comments

Comments
 (0)