Skip to content

Instantly share code, notes, and snippets.

@gleb-lobastov
Created May 23, 2023 09:03
Show Gist options
  • Select an option

  • Save gleb-lobastov/55bc19e96ec429c458072185e42e28cd to your computer and use it in GitHub Desktop.

Select an option

Save gleb-lobastov/55bc19e96ec429c458072185e42e28cd to your computer and use it in GitHub Desktop.

Revisions

  1. gleb-lobastov created this gist May 23, 2023.
    95 changes: 95 additions & 0 deletions json schema matrix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,95 @@
    {
    "$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"
    ]
    }