UNPKG

@open-rpc/specification-extension-spec

Version:
96 lines (95 loc) 3.47 kB
{ "$schema": "../meta-schema.json", "openrpcExtension": "0.0.0-development", "name": "x-transport", "version": "0.0.1", "description": "Describe a transport for OpenRPC", "summary": "OpenRPC Transports", "externalDocumentation": { "description": "github", "url": "https://github.com/open-rpc/specification-extensions-spec/examples/x-transport-openrpc-ext.json" }, "required": true, "restricted": ["serverObject"], "schema": { "oneOf": [ { "type": "object", "title": "HTTP Transport", "description": "HTTP Transport", "required": ["name"], "properties": { "name": { "type": "string", "const": "HTTPTransport" }, "options": { "type": "object", "properties": { "headers": { "patternProperties": { "": { "type": "string" } } }, "credentials": { "type": "string", "enum": ["omit", "same-origin", "include"] } } } }, "examples": [ { "x-transport": { "name": "HTTPTransport", "options": { "headers": { "Bearer": "string" } } } } ] }, { "type": "object", "title": "PostMessageWindow Transport", "description": "Post Message Window Transport", "required": ["name"], "properties": { "name": { "type": "string", "const": "PostMessageWindow" }, "options": { "type": "object", "properties": { "top": { "type": "integer", "title": "top", "description": "top" }, "left": { "type": "integer", "title": "left", "description": "left" }, "height": { "type": "integer", "title": "height", "description": "height" }, "width": { "type": "integer", "title": "width", "description": "width" } } } } } ] } }