Commit 21ef3f8
authored
Mozilla Web Things format and structure (#81)
* Converted TD to Mozilla schema
* Move websocket route to /ws
* Half-working newer socket implementation
* Enabled url_for for WebSocket views
* Updated websocket link rel
* Removed debug string
* Improved link between extension view endpoints and TD keys
* Add explicit endpoint to test
* Simplified action and property tagging
* Implemented ActionView for automatic background task management
* Fixed represent_response
* Build using view classes rather than decorators
* Update tests
* Reduced mock Action time
* Fixed Action href
* Removed old debug statement
* FieldSchema subclasses Schema
* Added output schema to action
* Simplified example
* Let schema handle datetime formatting
* Improved get_spec
* Simplified APISpec path builder
* Renamed view_to_apispec_operations
* Fixed operation parameters
* Updated apispec tests
* Removed old unused SocketMiddleware
* Fixed summary builder
* Automatically build 201 Action schemas
* Fixed error in exception
* Removed unused Task argument
* Add output and status properties
* Include "input" in Action schemas
* Send input schema into Action schema generator
* Marshal Action responses with the correct schema
* Compile generated View specs as they're created
* Update view builder tests
* Fixed generated action class name
* Remove tasks from properties
* Fixed generated name
* Improved coverage1 parent 58e0364 commit 21ef3f8
File tree
29 files changed
+745
-1029
lines changed- examples
- src/labthings
- core/tasks
- server
- default_views
- sockets
- spec
- view
- tests
- schemas
29 files changed
+745
-1029
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| 18 | + | |
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
| |||
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
23 | 62 | | |
24 | 63 | | |
25 | 64 | | |
| |||
34 | 73 | | |
35 | 74 | | |
36 | 75 | | |
| 76 | + | |
| 77 | + | |
37 | 78 | | |
38 | 79 | | |
39 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
| 19 | + | |
22 | 20 | | |
23 | | - | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
| |||
69 | 64 | | |
70 | 65 | | |
71 | 66 | | |
72 | | - | |
73 | | - | |
| 67 | + | |
74 | 68 | | |
75 | 69 | | |
76 | 70 | | |
| |||
83 | 77 | | |
84 | 78 | | |
85 | 79 | | |
86 | | - | |
87 | | - | |
88 | 80 | | |
89 | 81 | | |
90 | 82 | | |
| |||
95 | 87 | | |
96 | 88 | | |
97 | 89 | | |
98 | | - | |
| 90 | + | |
99 | 91 | | |
100 | 92 | | |
101 | 93 | | |
| |||
123 | 115 | | |
124 | 116 | | |
125 | 117 | | |
126 | | - | |
127 | 118 | | |
128 | | - | |
| 119 | + | |
129 | 120 | | |
130 | 121 | | |
131 | 122 | | |
| |||
140 | 131 | | |
141 | 132 | | |
142 | 133 | | |
143 | | - | |
144 | | - | |
| 134 | + | |
145 | 135 | | |
146 | 136 | | |
147 | 137 | | |
148 | 138 | | |
149 | 139 | | |
150 | | - | |
151 | | - | |
| 140 | + | |
| 141 | + | |
152 | 142 | | |
153 | 143 | | |
154 | 144 | | |
155 | 145 | | |
156 | | - | |
157 | | - | |
| 146 | + | |
| 147 | + | |
158 | 148 | | |
159 | 149 | | |
160 | 150 | | |
| |||
164 | 154 | | |
165 | 155 | | |
166 | 156 | | |
167 | | - | |
168 | 157 | | |
169 | 158 | | |
170 | | - | |
| 159 | + | |
171 | 160 | | |
172 | 161 | | |
173 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
79 | 75 | | |
80 | 76 | | |
81 | 77 | | |
| |||
102 | 98 | | |
103 | 99 | | |
104 | 100 | | |
105 | | - | |
| 101 | + | |
106 | 102 | | |
107 | 103 | | |
108 | 104 | | |
| |||
117 | 113 | | |
118 | 114 | | |
119 | 115 | | |
| 116 | + | |
120 | 117 | | |
121 | | - | |
| 118 | + | |
122 | 119 | | |
123 | 120 | | |
124 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 179 | + | |
| 180 | + | |
209 | 181 | | |
210 | 182 | | |
211 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments