alphagov/stagecraft — pull request #156 by roc (2014-06-18 15:49:49+00:00)
Title: Add JSON Schema for monitoring data-type [#72764046]

- Adds monitoring data-type to the fixtures
- Adds new schema 'stagecraft/apps/datasets/schemas/monitoring.json' with `uptime` and `downtime` as the only required fields (integer)
- Extends 'stagecraft/libs/schemas/schemas.py' to build a series of $ref references
- these are passed to the 'allOf' combinator
- uses a `DEFINED_SCHEMAS` list, this feels a bit dorky, but we probably aren't going to define *that* many

General feeling trying to get the tests working throughout (probably suggesting that I could've gone about this in a very different way) is well described by the following:

![](http://37.media.tumblr.com/fd3c564bfd8772651e6a52b0ab0ee8f3/tumblr_n5vzwentKq1qewacoo1_500.jpg)
![](http://37.media.tumblr.com/de6a76ab24ec2d12f6adf3bb405969b4/tumblr_n5vzwentKq1qewacoo2_500.jpg)
![](http://38.media.tumblr.com/1afd75b498f0c3064c2946e994463e10/tumblr_n5vzwentKq1qewacoo3_r1_500.jpg)
![](http://37.media.tumblr.com/f107e463482cafb5766d37599f234aa6/tumblr_n5vzwentKq1qewacoo4_r1_500.jpg)
![](http://31.media.tumblr.com/d912385129e259f6655279753b0e44c1/tumblr_n5vzwentKq1qewacoo5_r1_500.jpg)
![](http://37.media.tumblr.com/aa32f61cfca94baa3b01c0687adf01f8/tumblr_n5vzwentKq1qewacoo7_r1_500.jpg)
![](http://38.media.tumblr.com/0ae57da259fc5da6c13e0b24811cda43/tumblr_n5vzwentKq1qewacoo9_r1_500.jpg)
![](http://37.media.tumblr.com/b336f84320b1638299556a6bba2c604f/tumblr_n5vzwentKq1qewacoo10_r1_500.jpg)
![](http://31.media.tumblr.com/8ef088982f902201fbd27a154e7f8624/tumblr_n5vzwentKq1qewacoo8_r1_500.jpg)

![](http://37.media.tumblr.com/b1045ebaa87d516d21e25632902bc5e6/tumblr_n5vzwentKq1qewacoo5_r2_400.gif)