Skip to content

Instantly share code, notes, and snippets.

@gleb-lobastov
Created May 23, 2023 09:03
Show Gist options
  • Save gleb-lobastov/55bc19e96ec429c458072185e42e28cd to your computer and use it in GitHub Desktop.
Save gleb-lobastov/55bc19e96ec429c458072185e42e28cd to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"image": {
"type": "string"
},
"fileName": {
"type": "string"
},
"background": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
},
"complexityLevel": {
"type": "integer",
"minimum": 1,
"maximum": 3
},
"important": {
"type": "boolean"
},
"topics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"requireLevel": {
"type": "string",
"enum": ["mustHave", "medium", "niceToHave"]
},
"type": {
"type": "string",
"enum": ["basic", "intermediate", "advanced"]
},
"desc": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"more": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
]
}
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"link": {
"type": "string"
}
},
"required": ["text", "link"]
}
}
},
"required": ["name", "type", "desc"]
}
}
},
"additionalProperties": false,
"required": [
"title",
"image",
"fileName",
"background",
"complexityLevel",
"topics"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment