SPB Git

Repository Public MIT

component.schema.json 4.6 KB 214 lines json

1{2  "$schema": "https://json-schema.org/draft/2020-12/schema",3  "$id": "https://glass.spboucher.ai/registry/schema/component.schema.json",4  "title": "SP Glass Registry component manifest (manifest.json)",5  "type": "object",6  "additionalProperties": false,7  "required": [8    "schemaVersion",9    "id",10    "name",11    "version",12    "description",13    "kind",14    "platforms",15    "minimumOS",16    "dependencies",17    "frameworks",18    "files",19    "sha256",20    "license",21    "symbols",22    "examples",23    "accessibility",24    "changelog"25  ],26  "properties": {27    "schemaVersion": {28      "const": 129    },30    "id": {31      "type": "string",32      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",33      "maxLength": 6434    },35    "name": {36      "type": "string",37      "minLength": 1,38      "maxLength": 8039    },40    "version": {41      "type": "string",42      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z]+(\\.[0-9A-Za-z]+)*)?$",43      "maxLength": 6444    },45    "description": {46      "type": "string",47      "maxLength": 60048    },49    "kind": {50      "enum": [51        "native-wrapper",52        "custom-glass",53        "content-component",54        "primitive"55      ]56    },57    "category": {58      "type": "string"59    },60    "platforms": {61      "type": "array",62      "items": {63        "enum": [64          "iOS",65          "iPadOS",66          "macOS"67        ]68      }69    },70    "minimumOS": {71      "type": "object",72      "additionalProperties": {73        "type": "string"74      }75    },76    "dependencies": {77      "type": "array",78      "maxItems": 32,79      "items": {80        "type": "object",81        "additionalProperties": false,82        "required": [83          "id",84          "version"85        ],86        "properties": {87          "id": {88            "type": "string",89            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",90            "maxLength": 6491          },92          "version": {93            "type": "string",94            "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z]+(\\.[0-9A-Za-z]+)*)?$",95            "maxLength": 6496          }97        }98      }99    },100    "frameworks": {101      "type": "array",102      "items": {103        "type": "string"104      }105    },106    "files": {107      "type": "array",108      "minItems": 1,109      "maxItems": 96,110      "items": {111        "type": "object",112        "additionalProperties": false,113        "required": [114          "path",115          "sha256",116          "bytes"117        ],118        "properties": {119          "path": {120            "type": "string",121            "minLength": 1,122            "maxLength": 240,123            "pattern": "^(?!/)(?!~)(?!.*(^|/)\\.)(?!.*//)[A-Za-z0-9+_. /-]+$",124            "description": "Relative path with forward slashes. No component may be empty, start with a dot, or be '.' or '..'."125          },126          "sha256": {127            "type": "string",128            "pattern": "^[0-9a-f]{64}$"129          },130          "bytes": {131            "type": "integer",132            "minimum": 0,133            "maximum": 1048576134          }135        }136      }137    },138    "sha256": {139      "type": "string",140      "pattern": "^[0-9a-f]{64}$",141      "description": "SHA-256 over the lines 'path<TAB>sha256<LF>' of the files sorted by path."142    },143    "license": {144      "enum": [145        "MIT"146      ]147    },148    "symbols": {149      "type": "array",150      "maxItems": 256,151      "items": {152        "type": "string"153      }154    },155    "examples": {156      "type": "array",157      "maxItems": 16,158      "items": {159        "type": "object",160        "additionalProperties": false,161        "required": [162          "title",163          "code"164        ],165        "properties": {166          "title": {167            "type": "string"168          },169          "code": {170            "type": "string"171          }172        }173      }174    },175    "accessibility": {176      "type": "array",177      "maxItems": 32,178      "items": {179        "type": "string"180      }181    },182    "changelog": {183      "type": "array",184      "maxItems": 256,185      "items": {186        "type": "object",187        "additionalProperties": false,188        "required": [189          "version",190          "date",191          "changes"192        ],193        "properties": {194          "version": {195            "type": "string",196            "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z]+(\\.[0-9A-Za-z]+)*)?$",197            "maxLength": 64198          },199          "date": {200            "type": "string",201            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"202          },203          "changes": {204            "type": "array",205            "items": {206              "type": "string"207            }208          }209        }210      }211    }212  }213}214
Files main
Menu

Theme