Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement json schema for config #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"hexadecimal_color": {
"type": "string",
"pattern": "^\\S+$",
"examples": [
"#000000",
"#FF0000",
"#00FF00",
"#0000FF",
"#FFFF00",
"#FF00FF",
"#FFFFFF"
]
},
"color_number": {
"type": "string",
"pattern": "^[0-7]$"
}
},
"title": "nap settings",
"description": "nap settings",
"type": "object",
"properties": {
"home": {
"title": "home",
"description": "A home directory\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"type": "string",
"minLength": 1,
"default": "~/.nap"
},
"default_language": {
"title": "default language",
"description": "A default language\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"type": "string",
"minLength": 1,
"default": "go"
},
"theme": {
"title": "theme",
"description": "A theme\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"type": "string",
"minLength": 1,
"default": "nord"
},
"background": {
"title": "background",
"description": "A background\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/color_number"
},
"foreground": {
"title": "foreground",
"description": "A foreground\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/color_number"
},
"primary_color": {
"title": "primary color",
"description": "A primary color\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
},
"primary_color_subdued": {
"title": "primary color subdued",
"description": "A primary color subdued\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
},
"green": {
"title": "green",
"description": "A green\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
},
"bright_green": {
"title": "bright green",
"description": "A bright green\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
},
"bright_red": {
"title": "bright red",
"description": "A bright red\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
},
"red": {
"title": "red",
"description": "A red\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
},
"black": {
"title": "black",
"description": "A black\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
},
"gray": {
"title": "gray",
"description": "A gray\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
},
"white": {
"title": "white",
"description": "A white\nhttps://github.com/maaslalani/nap?tab=readme-ov-file#customization",
"$ref": "#/definitions/hexadecimal_color"
}
},
"additionalProperties": false
}