Commit 03be156
authored
bugfix: Support oneOf in array types. (#56)
* bugfix: Support oneOf in array types.
Also make top-level array types expose the same interface as
ProtocolBase (from_json, serialize).
Fixes #49
* bugfix: call validate() when instantiating TypeProxy objects
There are validations that occur based on the presence of properties
(i.e. you cannot assign an object with invalid properties), and there
are different validations that are applied on demand or when serializing
by calling validate() (these are things like 'required' and range
checks). When deciding which type to use from a TypeProxy, we need to
make sure we call validate() because we want to make sure that we
correctly determine which type is valid.1 parent f6e2f9e commit 03be156
File tree
3 files changed
+95
-5
lines changed- python_jsonschema_objects
- test
3 files changed
+95
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
| 258 | + | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
169 | 183 | | |
170 | 184 | | |
171 | 185 | | |
| |||
238 | 252 | | |
239 | 253 | | |
240 | 254 | | |
| 255 | + | |
241 | 256 | | |
242 | 257 | | |
243 | 258 | | |
244 | 259 | | |
| 260 | + | |
245 | 261 | | |
246 | 262 | | |
247 | 263 | | |
| |||
251 | 267 | | |
252 | 268 | | |
253 | 269 | | |
254 | | - | |
255 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
256 | 273 | | |
257 | 274 | | |
258 | 275 | | |
| |||
314 | 331 | | |
315 | 332 | | |
316 | 333 | | |
317 | | - | |
| 334 | + | |
| 335 | + | |
318 | 336 | | |
319 | 337 | | |
320 | 338 | | |
321 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
322 | 360 | | |
323 | 361 | | |
324 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments