Schema
This document contains the JSON schema for a data file.
Use
To use this schema in a YAML language server -supporting IDE, prepend the following modeline to your data file:
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShineyDev/sync-labels-action/v1.2.3/schema.json
Schema
{
"$id": "https://raw.githubusercontent.com/ShineyDev/sync-labels-action/main/schema.json",
"$schema": "https://json-schema.org/draft-07/schema",
"additionalProperties": false,
"definitions": {
"color_value": {
"oneOf": [
{
"maximum": 16777215,
"minimum": 0,
"type": "integer"
},
{
"pattern": "^[a-zA-Z]+(?:[+-][rRgGbBhHsSvV][0-9]+)*$",
"type": "string"
}
]
},
"description_value": {
"minLength": 1,
"type": "string"
},
"name_value": {
"minLength": 1,
"type": "string"
}
},
"minProperties": 1,
"properties": {
"colors": {
"oneOf": [
{
"additionalItems": false,
"items": {
"additionalProperties": false,
"properties": {
"name": {
"pattern": "^[a-zA-Z]+$",
"type": "string"
},
"value": {
"$ref": "#/definitions/color_value"
}
},
"required": [ "name", "value" ],
"type": "object"
},
"minItems": 1,
"type": "array"
},
{
"additionalProperties": false,
"minProperties": 1,
"patternProperties": {
"^[a-zA-Z]+$": {
"$ref": "#/definitions/color_value"
}
},
"type": "object"
}
]
},
"defaults": {
"additionalProperties": false,
"minProperties": 1,
"properties": {
"color": {
"$ref": "#/definitions/color_value"
},
"description": {
"$ref": "#/definitions/description_value"
}
},
"type": "object"
},
"groups": {
"oneOf": [
{
"additionalItems": false,
"items": {
"additionalProperties": false,
"minProperties": 1,
"properties": {
"color": {
"$ref": "#/definitions/color_value"
},
"description": {
"$ref": "#/definitions/description_value"
},
"labels": {
"$ref": "#/properties/labels"
},
"name": {
"$ref": "#/definitions/name_value"
}
},
"type": "object"
},
"minItems": 1,
"type": "array"
},
{
"additionalProperties": false,
"minProperties": 1,
"patternProperties": {
"^.+$": {
"additionalProperties": false,
"minProperties": 1,
"properties": {
"color": {
"$ref": "#/definitions/color_value"
},
"description": {
"$ref": "#/definitions/description_value"
},
"labels": {
"$ref": "#/properties/labels"
}
},
"type": "object"
}
},
"type": "object"
}
]
},
"inherit": {
"oneOf": [
{
"additionalItems": false,
"items": {
"pattern": "^https?:\\/\\/.+$",
"type": "string"
},
"minItems": 1,
"type": "array"
},
{
"pattern": "^https?:\\/\\/.+$",
"type": "string"
}
]
},
"labels": {
"oneOf": [
{
"additionalItems": false,
"items": {
"additionalProperties": false,
"minProperties": 1,
"properties": {
"color": {
"$ref": "#/definitions/color_value"
},
"description": {
"$ref": "#/definitions/description_value"
},
"name": {
"$ref": "#/definitions/name_value"
}
},
"required": [ "name" ],
"type": "object"
},
"minItems": 1,
"type": "array"
},
{
"additionalProperties": false,
"minProperties": 1,
"patternProperties": {
"^.+$": {
"additionalProperties": false,
"minProperties": 1,
"properties": {
"color": {
"$ref": "#/definitions/color_value"
},
"description": {
"$ref": "#/definitions/description_value"
}
},
"type": "object"
}
},
"type": "object"
}
]
}
},
"title": "ShineyDev/sync-labels-action: data file schema",
"type": "object"
}