As a side effect, I got rid of all of the horrible symlinks and just put
in all of the proper relative paths. Because the horrible symlinks were
horrible.
A bunch of related fixes to the code for parsing the state and API yaml files:
1. Some of our objects are {key: {key: value}} - style nested key/value
dictionaries. Handle this by refactoring get_json_schema_object_fields so
that such objects are handled wherever they appear, rather than when they
are just subproperties of a 'proper' object.
2. Fix multi-level inheritance (so an object can have an 'allOf' property which
can successfully refer to an object which itself has an 'allOf' property).
3. $ref fields in event schemas weren't being expanded correctly
4. sort type tables breadth-first rather than depth-first so that the ordering
in complex structures like the /sync response makes a bit more sense.
Allow columns to stretch if they end up with wide content.
Apart from the hassle of having to manually update the calculations, having the
columns wide enough to hold the widest thing they might ever have leads to
tables with lots of whitespace in the results.
Also display "required" text on required JSON body request params. Also
increase the size of the request param column to support longer param names
present in the pushers API.
Edit content-repo.yaml to include examples and headers.
Restructure content module to conform to the module template.
Adjust the HTTP API template to give 1 more char to the response
param to fit "Content-Disposition" correctly.
Edit the templating system to support displaying enums for
swagger APIs (before it was just JSON schema). Also add support
for introspecting headers from swagger. Finally, replace - with
_ when forming the {{ template_var }} else things whine.
For cases where event schema specify `patternProperties` it would be nice
to give that pattern a "human-readable" form rather than a raw regex. This
is now supported by specifying `x-pattern` in the value part of the specified
pattern e.g. `patternProperties:{ "^.*":{ x-pattern: "$THING", ... } }`
Templating had limited record type descriptions limited to value primitives
e.g. `{string: integer}`. It now supports inspecting the values recursively
if the value is `object`.
Updated `m.receipt` to take both these points into account to make it read
better. Tweak receipt module text.