Commit graph

35 commits

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).
2016-07-12 17:28:30 +01:00
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
2016-05-04 18:33:52 +01:00
Jimmy Cuadra
5b18db9096 Make list of APIs on the index a table. 2016-05-04 01:42:01 -07:00
Richard van der Hoff
7a244ff977 Merge branch 'master' into rav/body_params_in_tables
Conflicts:
	templating/matrix_templates/units.py
2016-01-11 14:36:28 +00:00
Richard van der Hoff
87f2f9e878 Fix review comments 2016-01-11 14:19:53 +00:00
Richard van der Hoff
1f6c4d5bb2 Speed up gendoc.py by only running build.py once 2016-01-08 00:40:03 +00:00
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.
2016-01-07 22:19:30 +00:00
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.
2015-12-01 17:08:02 +00:00
Richard van der Hoff
34ac544290 Merge branch 'master' into rav/rework_objects
Conflicts:
	templating/matrix_templates/units.py
2015-11-17 11:43:12 +00:00
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.
2015-11-15 23:44:46 +00:00
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.
2015-11-15 16:58:35 +00:00
Daniel Wagner-Hall
2e3a0b4e00 Specify guest accounts 2015-11-02 15:26:06 +00:00
Kegan Dougal
11c586c560 Merge branch 'master' into spec-feature-profiles
Conflicts:
	templating/build.py
2015-09-25 16:34:47 +01:00
Kegan Dougal
9c882ea5e4 Detect unused {{ vars }} and whine loudly. 2015-09-25 16:24:31 +01:00
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.
2015-09-25 15:09:15 +01:00
Kegan Dougal
f1adad5fb3 Add more logging with file prefixes
This makes the handoff between gendoc and batesian clearer in the logs.
2015-09-23 15:10:55 +01:00
Daniel Wagner-Hall
99106bb6fe Add explanatory comments
Also, remove line which was accidentally removed
2015-09-10 13:54:00 +01:00
Daniel Wagner-Hall
f67e27e843 Split on double-newlines not single
Otherwise all sorts of tables get horribly broken
2015-09-10 13:20:04 +01:00
Daniel Wagner-Hall
55f33736b2 Preserve newlines in wrapped text 2015-09-10 12:04:12 +01:00
Kegan Dougal
9d532f30e8 Add {{voip_events}}. Add more info on sections when asked via build.py -s 2015-05-26 17:32:51 +01:00
Kegan Dougal
89083b3a86 Add {{spec_version}}. Update build.py module docs. 2015-05-26 17:09:30 +01:00
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.
2015-05-26 16:20:15 +01:00
Kegan Dougal
ea9c6496bb Account for 'required' text when wrapping desc column. 2015-05-21 11:27:54 +01:00
Kegan Dougal
a7f3d39da2 Use the entire event in the example JSON. Sort keys on JSON. 2015-05-21 11:12:43 +01:00
Kegan Dougal
a42a22028c Add event table template. Also inspect arrays for objects. 2015-05-21 10:39:54 +01:00
Kegan Dougal
02c44a889e Remove stuff from 20_events.rst and replace with {{room_events}}. Update gendoc to call build.py for template vars. 2015-05-20 15:40:06 +01:00
Kegan Dougal
75e7d09fc8 Remove newlines from json: move line wrapping to the template files. 2015-05-20 12:41:25 +01:00
Kegan Dougal
8f448a1764 Produce valid JSON (escape \n), add indent filter 2015-05-20 11:49:10 +01:00
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'.
2015-05-20 11:19:32 +01:00
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. 2015-05-19 16:49:20 +01:00
Kegan Dougal
c237c9010a Actually produce valid RST from the template 2015-05-19 15:54:24 +01:00
Kegan Dougal
3c0b564977 Whine if there are missing variables that the template needs. 2015-05-19 15:24:55 +01:00
Kegan Dougal
7563f1058b Make the templating system work(!) 2015-05-19 15:03:31 +01:00
Kegan Dougal
4e64d9e340 Start fleshing out build script 2015-05-19 13:16:16 +01:00
Kegan Dougal
0b8b77697b Add templating folder and stub files/templates. 2015-05-19 11:22:33 +01:00