diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c49bbb2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "yaml.schemas": { + "types.json": "types.yaml" + } +} diff --git a/types.json b/types.json new file mode 100644 index 0000000..bce9836 --- /dev/null +++ b/types.json @@ -0,0 +1,52 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "colors", + "description": "Colors for file categories\nhttps://github.com/karlding/dirchromatic", + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "title": "color", + "description": "A color for file category\nhttps://github.com/karlding/dirchromatic", + "type": "object", + "properties": { + "colour": { + "title": "color", + "description": "A file category color\nhttps://github.com/karlding/dirchromatic", + "type": "string", + "pattern": "^0[01234];[39][0-8]$" + }, + "description": { + "title": "description", + "description": "A file category description\nhttps://github.com/karlding/dirchromatic", + "type": "string", + "minLength": 1, + "pattern": "[^ ]", + "examples": [ + "archive files" + ] + }, + "src": { + "title": "source", + "description": "File category extensions\nhttps://github.com/karlding/dirchromatic", + "type": "string", + "enum": [ + "types/archive.yaml", + "types/audio.yaml", + "types/binary.yaml", + "types/build.yaml", + "types/code.yaml", + "types/config.yaml", + "types/data.yaml", + "types/doc.yaml", + "types/image-raw.yaml", + "types/image.yaml", + "types/other.yaml", + "types/video.yaml" + ] + } + }, + "minProperties": 3, + "additionalProperties": false + } +}