Commit Graph

35 Commits (b62f49ed610c2076fd9351ae421724b65be45f62)

Author SHA1 Message Date
Richard van der Hoff 49cd65dd58 Add a license to the spec
We're licensing hte spec under ASLv2. Add the LICENSE file, and add the
short-form to as much of the source as is practical right now (adding it to
json source is a massive pita).
8 years ago
Richard van der Hoff be09cd859d Fix errors when running build.py with default args
Fixes ugly errors when build.py was run (a) with no --substitutions at all, and
(b) without the expected substitutions
9 years ago
Jimmy Cuadra 5b18db9096 Make list of APIs on the index a table. 9 years ago
Richard van der Hoff 7a244ff977 Merge branch 'master' into rav/body_params_in_tables
Conflicts:
	templating/matrix_templates/units.py
9 years ago
Richard van der Hoff 87f2f9e878 Fix review comments 9 years ago
Richard van der Hoff 1f6c4d5bb2 Speed up gendoc.py by only running build.py once 9 years ago
Richard van der Hoff c6f5ba09d4 Display POST body parameters as tables
Replace a whole bunch of special-casing for POST body parameters with the same
logic as is used for response objects: represent all but the top-level as
tables.
9 years ago
Daniel Wagner-Hall 97fd1fdd62 Embed client and server release numbers
Note that this also removes the changelog - I'm going to re-add the
changelog differently soon.
9 years ago
Richard van der Hoff 34ac544290 Merge branch 'master' into rav/rework_objects
Conflicts:
	templating/matrix_templates/units.py
9 years ago
Richard van der Hoff 838af2a23e Updates to swagger table generation
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.
9 years ago
Richard van der Hoff cc8ef691fb Rewrite the table templates
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.
9 years ago
Daniel Wagner-Hall 2e3a0b4e00 Specify guest accounts 9 years ago
Kegan Dougal 11c586c560 Merge branch 'master' into spec-feature-profiles
Conflicts:
	templating/build.py
9 years ago
Kegan Dougal 9c882ea5e4 Detect unused {{ vars }} and whine loudly. 9 years ago
Kegan Dougal c6375ed3d1 Flesh out feature profiles section
Add table detailing the profiles. Add anchors to link through to each module
following a well-defined format (rather than the name of the module section).
Allow UTF-8 in the spec.
9 years ago
Kegan Dougal f1adad5fb3 Add more logging with file prefixes
This makes the handoff between gendoc and batesian clearer in the logs.
9 years ago
Daniel Wagner-Hall 99106bb6fe Add explanatory comments
Also, remove line which was accidentally removed
9 years ago
Daniel Wagner-Hall f67e27e843 Split on double-newlines not single
Otherwise all sorts of tables get horribly broken
9 years ago
Daniel Wagner-Hall 55f33736b2 Preserve newlines in wrapped text 9 years ago
Kegan Dougal 9d532f30e8 Add {{voip_events}}. Add more info on sections when asked via build.py -s 10 years ago
Kegan Dougal 89083b3a86 Add {{spec_version}}. Update build.py module docs. 10 years ago
Kegan Dougal 5b31c442f5 Completely split up the templating system from the Matrix Spec template code.
The two are now linked together in build.py by specifying the input module.
Updated gendoc.py to specify the right module.
10 years ago
Kegan Dougal ea9c6496bb Account for 'required' text when wrapping desc column. 10 years ago
Kegan Dougal a7f3d39da2 Use the entire event in the example JSON. Sort keys on JSON. 10 years ago
Kegan Dougal a42a22028c Add event table template. Also inspect arrays for objects. 10 years ago
Kegan Dougal 02c44a889e Remove stuff from 20_events.rst and replace with {{room_events}}. Update gendoc to call build.py for template vars. 10 years ago
Kegan Dougal 75e7d09fc8 Remove newlines from json: move line wrapping to the template files. 10 years ago
Kegan Dougal 8f448a1764 Produce valid JSON (escape \n), add indent filter 10 years ago
Kegan Dougal 2e5809a68e Make build.py accept generic files for template var substitutions.
This allows us to incrementally convert sections of the spec to use this
templating system. E.g. './build.py ../specification/20_events.rst' where
that .rst file has {{room_events}} in it somewhere. Add ability to show
a list of valid template vars to use (e.g. room_events) by running
'./build.py --show-template-vars'.
10 years ago
Kegan Dougal c61223fb27 Add title/desc to lots of event schemas, add missing keys (e.g. avatar_url, displayname), add required keys section to spec. 10 years ago
Kegan Dougal c237c9010a Actually produce valid RST from the template 10 years ago
Kegan Dougal 3c0b564977 Whine if there are missing variables that the template needs. 10 years ago
Kegan Dougal 7563f1058b Make the templating system work(!) 10 years ago
Kegan Dougal 4e64d9e340 Start fleshing out build script 10 years ago
Kegan Dougal 0b8b77697b Add templating folder and stub files/templates. 10 years ago