#370 - updated JSON schema

This commit is contained in:
Elio Struyf
2022-07-20 15:00:17 +03:00
parent dab6a46d98
commit 1aa8f77590
3 changed files with 31 additions and 4 deletions
+1
View File
@@ -4,6 +4,7 @@
### 🎨 Enhancements
- [#370](https://github.com/estruyf/vscode-front-matter/issues/370): Define the tags and categories as reserved keywords for custom taxonomy
- [#372](https://github.com/estruyf/vscode-front-matter/issues/372): Rename Taxonomy tab to Taxonomies
### ⚡️ Optimizations
+29 -3
View File
@@ -893,7 +893,20 @@
"taxonomyId": {
"type": "string",
"default": "",
"description": "The ID of your taxonomy field"
"description": "The ID of your taxonomy field. It cannot contain the \"tags\" or \"categories\" value.",
"not": {
"anyOf": [
{
"const": ""
},
{
"const": "tags"
},
{
"const": "categories"
}
]
}
},
"fileExtensions": {
"type": "array",
@@ -1151,11 +1164,24 @@
"properties": {
"id": {
"type": "string",
"description": "ID for your taxonomy field"
"description": "ID for your taxonomy field. It cannot contain the \"tags\" or \"categories\" value.",
"not": {
"anyOf": [
{
"const": ""
},
{
"const": "tags"
},
{
"const": "categories"
}
]
}
},
"options": {
"type": "array",
"description": "Options from which you can pick",
"description": "Options from which you can pick.",
"items": {
"type": "string"
}
+1 -1
View File
@@ -116,7 +116,7 @@ export class TaxonomyHelper {
const options = this.getTaxonomyOptions(taxonomyType);
const newOption = await window.showInputBox({
title: `Create a new ${taxonomyType} value`,
title: `Create a new ${type} value`,
placeHolder: `The value you want to add`,
ignoreFocusOut: true,
validateInput: (text) => {