github.com/Theta-Dev/Talon@v0.0.0-20211018130634-ff179e19fa9a/ui/menu/testdata/testSchema.json (about)

     1  {
     2    "$schema": "http://json-schema.org/draft-07/schema#",
     3    "title": "Talon menu data",
     4    "definitions": {
     5      "Version": {
     6        "type": "object",
     7        "properties": {
     8          "date": {
     9            "type": "string",
    10            "format": "date-time"
    11          },
    12          "name": {
    13            "type": "string"
    14          },
    15          "user": {
    16            "type": "string"
    17          },
    18          "tags": {
    19            "type": "object",
    20            "additionalProperties": {
    21              "type": "string"
    22            }
    23          }
    24        },
    25        "required": ["date", "user"]
    26      },
    27      "Link": {
    28        "type": "object",
    29        "properties": {
    30          "url": {
    31            "type": "string"
    32          },
    33          "type": {
    34            "type": "string",
    35            "enum": ["link", "git", "github", "gitlab", "gitea", "bitbucket"]
    36          }
    37        },
    38        "required": ["url", "type"]
    39      },
    40      "Page": {
    41        "type": "object",
    42        "properties": {
    43          "name": {
    44            "type": "string",
    45            "maxLength": 100
    46          },
    47          "path": {
    48            "type": "string"
    49          },
    50          "color": {
    51            "type": "string",
    52            "format": "regex",
    53            "pattern": "^#[A-z\\d]{6}$"
    54          },
    55          "image": {
    56            "type": "string",
    57            "format": "uri"
    58          },
    59          "visibility": {
    60            "type": "string",
    61            "enum": ["featured", "searchable", "hidden"]
    62          },
    63          "source": {
    64            "$ref": "#/definitions/Link"
    65          }
    66        },
    67        "required": ["name", "path", "color", "visibility"]
    68      }
    69    },
    70    "oneOf": [
    71      {
    72        "type": "object",
    73        "properties": {
    74          "root_path": {
    75            "type": "string"
    76          },
    77          "current_page": {
    78            "type": ["string", "null"]
    79          },
    80          "current_version": {
    81            "type": "string"
    82          },
    83          "versions": {
    84            "type": "object",
    85            "additionalProperties": {
    86              "$ref": "#/definitions/Version"
    87            }
    88          },
    89          "pages": {
    90            "type": "object",
    91            "additionalProperties": {
    92              "$ref": "#/definitions/Page"
    93            }
    94          }
    95        },
    96        "required": ["root_path", "current_page", "current_version", "versions", "pages"]
    97      }
    98    ]
    99  }