{ "$id": "https://raw.githubusercontent.com/micro-lc/compose-toolkit/main/schemas/manifest.schema.json#", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Manifest", "definitions": { "method": { "title": "Method", "type": "string", "default": "GET", "enum": ["GET", "POST", "PATCH", "PUT", "DELETE", "OPTIONS", "HEAD"] }, "url": { "title": "FetchUrl", "type": "object", "properties": { "origin": { "type": "string" }, "pathname": { "type": "string" } }, "additionalProperties": false, "required": ["pathname"] }, "handler": { "title": "ReducedFetchHandler", "type": "object", "instanceOf": "Function", "tsType": "(info: URL, init?: RequestInit | undefined) => Promise" }, "fetch": { "title": "Fetch", "type": "array", "default": [], "items": { "type": "object", "properties": { "url": { "$ref": "#/definitions/url" }, "method": { "$ref": "#/definitions/method" }, "notify": { "type": "boolean", "default": false }, "handler": { "$ref": "#/definitions/handler" } }, "required": ["url"] } }, "fetchFactory": { "title": "FetchFactory", "type": "object", "instanceOf": "Function", "tsType": "((context: Record) => Fetch)" }, "storageFactory": { "title": "StorageFactory", "type": "object", "instanceOf": "Function", "tsType": "(context: Record) => Storage" } }, "type": "object", "properties": { "label": { "description": "Human-readable name of the component", "$ref": "https://raw.githubusercontent.com/micro-lc/compose-toolkit/main/schemas/mia.schema.json#/definitions/localized-text" }, "description": { "description": "Short description of the component", "$ref": "https://raw.githubusercontent.com/micro-lc/compose-toolkit/main/schemas/mia.schema.json#/definitions/localized-text" }, "descriptionLong": { "description": "Long description of the component, usually in Markdown syntax", "$ref": "https://raw.githubusercontent.com/micro-lc/compose-toolkit/main/schemas/mia.schema.json#/definitions/localized-text" }, "docLink": { "description": "Link to the component documentation", "type": "string" }, "type": { "description": "Type of the component", "type": "string", "enum": ["layout", "connector", "adapter"] }, "example": { "description": "Example of component usage", "type": "string" }, "iconSrc": { "description": "URL (with origin) of an icon describing the component", "type": "string", "format": "uri" }, "previewImage": { "description": "URL (with origin) of a preview image of the component", "type": "string", "format": "uri" }, "mocks": { "description": "Common browser APIs mock definitions", "type": "object", "properties": { "fetch": { "$ref": "#/definitions/fetchFactory" }, "localStorage": { "$ref": "#/definitions/storageFactory" }, "sessionStorage": { "$ref": "#/definitions/storageFactory" } } }, "definitions": { "description": "Utilities that can be referenced with $ref syntax in properties definitions", "type": "object", "default": {}, "additionalProperties": { "$ref": "https://raw.githubusercontent.com/micro-lc/compose-toolkit/main/schemas/mia.schema.json#" } }, "properties": { "description": "Components properties/attributes definitions", "type": "object", "additionalProperties": { "$ref": "https://raw.githubusercontent.com/micro-lc/compose-toolkit/main/schemas/mia.schema.json#" } } } }