-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(schema): support LinUtil configs
- Loading branch information
1 parent
c084075
commit dc96c84
Showing
3 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"$id": "https://raw.githubusercontent.com/linutil-tab-data.json", | ||
"definitions": { | ||
"string-property": { | ||
"type": "string", | ||
"minLength": 1, | ||
"pattern": "[^ ]" | ||
} | ||
}, | ||
"title": "tab data", | ||
"description": "Tab data", | ||
"type": "object", | ||
"required": ["name", "data"], | ||
"properties": { | ||
"name": { | ||
"title": "name", | ||
"description": "The name of a tab", | ||
"$ref": "#/definitions/string-property" | ||
}, | ||
"data": { | ||
"title": "data", | ||
"description": "The data of a tab", | ||
"type": "array", | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"items": { | ||
"title": "data entry", | ||
"description": "The data entry of a tab", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"title": "name", | ||
"description": "The name of a tab entry", | ||
"$ref": "#/definitions/string-property" | ||
}, | ||
"script": { | ||
"title": "script", | ||
"description": "The script run of a tab entry", | ||
"$ref": "#/definitions/string-property" | ||
}, | ||
"preconditions": { | ||
"title": "preconditions", | ||
"description": "Preconditions of a tab entry", | ||
"type": "array", | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"items": { | ||
"title": "precondition entry", | ||
"description": "The precondition entry of a tab entry", | ||
"type": "object", | ||
"properties": { | ||
"matches": { | ||
"title": "matches", | ||
"description": "Whether to require the condition to match or not for a precondition entry", | ||
"type": "boolean" | ||
}, | ||
"data": { | ||
"title": "data", | ||
"description": "The data of a tab precondition entry", | ||
"type": "object", | ||
"properties": { | ||
"environment": { | ||
"title": "environment", | ||
"description": "The environment variable of a data", | ||
"$ref": "#/definitions/string-property" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"values": { | ||
"title": "values", | ||
"description": "The values of a tab precondition entry", | ||
"type": "array", | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"items": { | ||
"title": "entry", | ||
"description": "The entry of values", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"entries": { | ||
"title": "entries", | ||
"description": "The entries of a tab entry", | ||
"type": "array", | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"items": { | ||
"title": "entry", | ||
"description": "The entry", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"title": "name", | ||
"description": "The name of a tab entry", | ||
"$ref": "#/definitions/string-property" | ||
}, | ||
"script": { | ||
"title": "script", | ||
"description": "The script run of a tab entry", | ||
"$ref": "#/definitions/string-property" | ||
}, | ||
"matches": { | ||
"title": "matches", | ||
"description": "Whether to require the condition to match or not for an entry", | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"$id": "https://raw.githubusercontent.com/linutil-tabs.json", | ||
"title": "tab data", | ||
"description": "Tab data", | ||
"type": "object", | ||
"required": ["directories"], | ||
"properties": { | ||
"directories": { | ||
"title": "directories", | ||
"description": "The directories of tabs", | ||
"type": "array", | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"items": { | ||
"title": "directory entry", | ||
"description": "The directory entry of a tab", | ||
"type": "string", | ||
"minLength": 1, | ||
"pattern": "[^ ]" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |