Commit graph

1410 commits

Author SHA1 Message Date
Mark Haines 2efadea583 Merge branch 'master' into markjh/document_v1_rooms_api 2015-09-21 16:35:31 +01:00
Kegan Dougal 8590cc84b5 Process and extract targets in gendoc.py 2015-09-21 15:33:28 +01:00
Kegsay 83ee385543 Merge pull request #55 from matrix-org/markjh/codehighlighting
Turn on code highlighting for HTTP api responses
2015-09-21 15:23:13 +01:00
Mark Haines a64125772f Merge pull request #58 from matrix-org/markjh/jenkins
Add the jenkins command to git so that we can update it
2015-09-21 15:22:38 +01:00
Mark Haines 2c31731262 Add the jenkins command to source control so that we can update
it without having to fiddle with the jenkins UI.

It also allow us to move files without breaking the CI since we
won't be hard coding the locations of scripts in the jenkins UI.
2015-09-21 15:19:09 +01:00
Mark Haines 738b24d028 Merge pull request #57 from matrix-org/markjh/example_checker
Python script for checking that the examples match the event schema.
2015-09-21 15:07:57 +01:00
Mark Haines 8974b2b67b Skip files that start with ".", e.g. vim swp files. 2015-09-21 15:05:10 +01:00
Mark Haines 6ba9b29b3b Report all the errors in schemas/check_examples, not just the first error. 2015-09-21 15:04:03 +01:00
Kegan Dougal 568982ee2e Represent nested deps in targets.yaml along with title styles
This will allow us to programatically position .rst snippets *anywhere*
which will for once and for all remove the horrid title level mismatch bugs.

We require this in order to allow people to re-shuffle the spec without
having to adjust the spec itself (e.g. 2 targets with different levels of
nesting).
2015-09-21 14:49:54 +01:00
Kegan Dougal 703f913a47 Add a 'targets.yaml' files in /specification
We're well beyond the point now where a simple `cat` of .rst files to "build"
the spec is practical. We may want to slice and dice the spec in different
ways to address various cross-cutting concerns. To this end, there is now a
'targets' file which contains the "build targets" for the spec, which contains
the sorting order for the .rst files. For now, we just have a single
target: 'main'.
2015-09-21 14:31:57 +01:00
Kegan Dougal f520ac9d82 Create a modules folder to group together similar parts of the spec 2015-09-21 14:25:52 +01:00
Kegan Dougal c77ef1a2cc Add stub files feature_profiles and modules 2015-09-21 14:17:31 +01:00
Kegan Dougal f2c952ec58 Reshuffle spec into sections roughly right as per PR #52 2015-09-21 14:13:18 +01:00
Mark Haines 52640eb205 Add a python script for checking that the examples match the event
schema.

Does the same checks as check.sh, but is a *lot* faster making it
suitable for using as a pre-commit hook.

I don't suggest replacing check.sh since it's good to check that the
schema works with multiple implementations of jsonschema.
2015-09-21 13:02:37 +01:00
Mark Haines 6a2c4d27fc Update the docs for room v1 api 2015-09-18 17:58:44 +01:00
Mark Haines f33c0846c3 Merge remote-tracking branch 'origin/master' into markjh/document_v1_rooms_api 2015-09-18 17:38:03 +01:00
Mark Haines 6b5b8432b3 Turn on code highlighting for HTTP api responses and add a
code highlighting stylesheet for the specification.
2015-09-18 17:26:10 +01:00
Mark Haines d2e39095fe Merge pull request #54 from matrix-org/markjh/swagger_examples
Add script to check the example responses match the schema.
2015-09-18 16:37:07 +01:00
Mark Haines f827765ba1 Make to code to skip checking swagger responses which don't have an
application/json example clearer.
2015-09-18 16:35:27 +01:00
Mark Haines 9896f98e2b Search for yaml swagger files if check_examples.py is run without
arguments.
2015-09-18 16:21:48 +01:00
Mark Haines 7c2ccb1aeb Merge remote-tracking branch 'origin/master' into markjh/swagger_examples 2015-09-18 16:11:26 +01:00
Mark Haines 299a4356d4 Add script to check that the example responses in the swagger matches
the examples.
2015-09-18 16:10:21 +01:00
Kegsay 5fbd534713 Merge pull request #51 from matrix-org/daniel/gendoc
Print errors to stderr
2015-09-18 15:50:56 +01:00
Kegsay f1da162a00 Merge pull request #53 from matrix-org/markjh/event-schema
Allow relative references to schema to work in python and node.
2015-09-18 15:50:13 +01:00
Mark Haines 7ac5c3766c Merge remote-tracking branch 'origin/master' into markjh/event-schema
Conflicts:
	templating/matrix_templates/units.py
2015-09-18 15:49:36 +01:00
Kegsay a2cfb89086 Merge pull request #52 from matrix-org/spec-file-structure
Spec file structure
2015-09-18 15:44:19 +01:00
Kegan Dougal cf8abdafd4 Fix PR comments 2015-09-18 15:42:49 +01:00
Kegan Dougal ba4998a62b Apparently tabs are A Thing 2015-09-18 15:15:55 +01:00
Kegan Dougal 427e4c8b1b Log port being listened on 2015-09-18 15:15:55 +01:00
Mark Haines 1540b1fe3c Merge branch 'markjh/swagger' into markjh/event-schema
Conflicts:
	templating/matrix_templates/units.py
2015-09-18 14:46:20 +01:00
Mark Haines f99a38ce72 Update the hard-coded paths in templating units.py.
Replace the hard code paths with global variables.
2015-09-18 14:43:57 +01:00
Mark Haines 63f08bace6 Fix the examples in the swagger API documentation to be valid JSON 2015-09-18 14:40:48 +01:00
Kegan Dougal 1f6b12b3e8 Modify and enforce the file format/structure used
Convert the file format to be of the form ##_##_something.rst where the
first ## is the top-level section number and the second ## is the
second-level section number, e.g. 07_01_push_cs_api.rst means
Section 7.1 - This is now enforced in gendoc.py along with the title line
style that should be used (= for top-level, - for 2nd level) which will
give helpful suggestions if you trip up. This feels much more intuitive
now looking in /specification
2015-09-18 11:43:53 +01:00
Mark Haines 7f81501762 Allow relative references to schema to work in python and node.
Rename "schema/v1/core" to "schema/v1/core-event-schema".
Add self-referential symlinks to schema/v1/core-event-schema

The python json schema libraries expect that relative references are
relative to the file they are in. The node json schema libraries
expect that relateive references are relative to the first file loaded.

To support both kinds we reference the core event schema using
"core-event-schema/event.json". We then symlink the core-event-schema
directory to both the location of the file refering to "event.json" so
that it will work in python and to the location of the top level file
so that it will work in node.
2015-09-18 11:39:44 +01:00
Kegan Dougal 06e46c1899 Fix on a better numbering format 2015-09-18 11:20:34 +01:00
Kegan Dougal 91d674b3c7 Merge branch 'spec-edits-cleanup' into spec-file-structure 2015-09-18 11:10:17 +01:00
Kegsay 28f3e61d04 Merge pull request #50 from matrix-org/spec-edits-cleanup
Spec: typo/layout fixes
2015-09-18 11:10:01 +01:00
Kegan Dougal 9ed39665c8 PR feedback 2015-09-18 11:09:04 +01:00
Kegan Dougal ef473b4161 Start enforcing title styles
This depends on the number of the file.
2015-09-18 11:05:48 +01:00
Daniel Wagner-Hall 08defafd98 Print errors to stderr
This means that continuserv will actually display them
2015-09-18 10:26:13 +01:00
Daniel Wagner-Hall 0b183f06f8 Merge pull request #49 from matrix-org/continuserv-logging
Continuserv: Log port being listened on
2015-09-18 10:18:09 +01:00
Kegan Dougal ad26b7f8cb Fix a subtle rendering bug when catting spec sections
Throw in gendoc.py if a spec section doesn't end with \n\n

There needs to be TWO new lines at the end of each spec section else the
title of the next section merges into the last paragraph of the earlier
section. This happens without rst2html producing a warning, and results
in the section heading of a file disappearing(!)
2015-09-18 10:03:58 +01:00
Kegan Dougal 8e7b33ac99 Fix more typos/spelling errors 2015-09-18 09:40:53 +01:00
Kegan Dougal 3f9d183c2a More typo/layout fixes
Split out identity servers to a separate file
2015-09-18 09:25:40 +01:00
Kegan Dougal 620d3dcb26 Test commit 2015-09-17 17:51:44 +01:00
Kegan Dougal faa95e172f More formatting fixes; typos; etc 2015-09-17 17:49:57 +01:00
Mark Haines 46d29e9eea fix the room api swagger to be valid swagger 2015-09-17 16:48:07 +01:00
Kegan Dougal af32ec194a Move VoIP events to 22_voip_events
20_events is a huge as it is, this makes it easier to find what section
you actually want when editing.
2015-09-17 16:38:58 +01:00
Kegan Dougal 5b59c67510 Minor formatting fixes. Fix state event templating. 2015-09-17 16:34:20 +01:00
Mark Haines 654ed9b99e Remove keys from the m.room.* schema files so that they may be used in the node swagger validator 2015-09-17 16:00:06 +01:00