1 | {
|
2 | "title": "Component protocol",
|
3 | "description": "Protocol for handling the component registry.",
|
4 | "output": {
|
5 | "error": {
|
6 | "description": "Component error"
|
7 | },
|
8 | "component": {
|
9 | "description": "Transmit the metadata about a component instance.",
|
10 | "properties": {
|
11 | "name": {
|
12 | "type": "string",
|
13 | "description": "component name in format that can be used in graphs"
|
14 | },
|
15 | "description": {
|
16 | "type": "string",
|
17 | "description": "(optional) textual description on what the component does"
|
18 | },
|
19 | "icon": {
|
20 | "type": "string",
|
21 | "description": "(optional): visual icon for the component, matching icon names in [Font Awesome](http://fortawesome.github.io/Font-Awesome/icons/)"
|
22 | },
|
23 | "subgraph": {
|
24 | "type": "boolean",
|
25 | "description": "boolean telling whether the component is a subgraph"
|
26 | },
|
27 | "inPorts": {
|
28 | "description": "list of input ports, each containing:",
|
29 | "properties": {
|
30 | "id": {
|
31 | "type": "string",
|
32 | "description": "port name"
|
33 | },
|
34 | "type": {
|
35 | "type": "string",
|
36 | "description": "port datatype, for example `boolean`"
|
37 | },
|
38 | "description": {
|
39 | "type": "string",
|
40 | "description": "textual description of the port"
|
41 | },
|
42 | "addressable": {
|
43 | "type": "boolean",
|
44 | "description": "boolean telling whether the port is an ArrayPort"
|
45 | },
|
46 | "required": {
|
47 | "type": "boolean",
|
48 | "description": "boolean telling whether the port needs to be connected for the component to work"
|
49 | },
|
50 | "values": {
|
51 | "type": "array",
|
52 | "description": "(optional) array of the values that the port accepts for enum ports"
|
53 | },
|
54 | "default": {
|
55 | "type": "any",
|
56 | "description": "(optional) the default value received by the port"
|
57 | }
|
58 | }
|
59 | },
|
60 | "outPorts": {
|
61 | "description": "list of output ports",
|
62 | "properties": {
|
63 | "id": {
|
64 | "type": "string",
|
65 | "description": "port name"
|
66 | },
|
67 | "type": {
|
68 | "type": "string",
|
69 | "description": "port datatype, for example `boolean`"
|
70 | },
|
71 | "description": {
|
72 | "type": "string",
|
73 | "description": "textual description of the port"
|
74 | },
|
75 | "addressable": {
|
76 | "type": "boolean",
|
77 | "description": "boolean telling whether the port is an ArrayPort"
|
78 | },
|
79 | "required": {
|
80 | "type": "boolean",
|
81 | "description": "boolean telling whether the port needs to be connected for the component to work"
|
82 | }
|
83 | }
|
84 | }
|
85 | }
|
86 | },
|
87 | "source": {
|
88 | "description": "Source code for a component. In cases where a runtime receives a `source` message, it should do whatever operations are needed for making that component available for graphs, including possible compilation.",
|
89 | "properties": {
|
90 | "name": {
|
91 | "type": "string",
|
92 | "description": "Name of the component"
|
93 | },
|
94 | "language": {
|
95 | "type": "string",
|
96 | "description": "The programming language used for the component code, for example `coffeescript`"
|
97 | },
|
98 | "library": {
|
99 | "type": "string",
|
100 | "description": "(optional) Component library identifier"
|
101 | },
|
102 | "code": {
|
103 | "type": "string",
|
104 | "description": "Component source code"
|
105 | },
|
106 | "tests": {
|
107 | "type": "string",
|
108 | "description": "(optional) unit tests for the component"
|
109 | }
|
110 | }
|
111 | }
|
112 | },
|
113 | "input": {
|
114 | "error": {
|
115 | "description": "Component error"
|
116 | },
|
117 | "list": {
|
118 | "description": "Request a list of currently available components. Will be responded with a set of `component` messages."
|
119 | },
|
120 | "getsource": {
|
121 | "description": "Request for the source code of a given component. Will be responded with a `source` message.",
|
122 | "properties": {
|
123 | "name": {
|
124 | "type": "string",
|
125 | "description": "Name of the component to get source code for"
|
126 | }
|
127 | }
|
128 | },
|
129 | "source": {
|
130 | "description": "Source code for a component. In cases where a runtime receives a `source` message, it should do whatever operations are needed for making that component available for graphs, including possible compilation.",
|
131 | "properties": {
|
132 | "name": {
|
133 | "type": "string",
|
134 | "description": "Name of the component"
|
135 | },
|
136 | "language": {
|
137 | "type": "string",
|
138 | "description": "The programming language used for the component code, for example `coffeescript`"
|
139 | },
|
140 | "library": {
|
141 | "type": "string",
|
142 | "description": "(optional) Component library identifier"
|
143 | },
|
144 | "code": {
|
145 | "type": "string",
|
146 | "description": "Component source code"
|
147 | },
|
148 | "tests": {
|
149 | "type": "string",
|
150 | "description": "(optional) unit tests for the component"
|
151 | }
|
152 | }
|
153 | }
|
154 | }
|
155 | }
|