You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
matrix-spec/scripts
Richard van der Hoff 8aa0f64665 Update the speculator to understand spec subdirs
Fix the speculator so that it doesn't blow up when it finds subdirs in the gen
directory.

(It doesn't handle the html diff very well in the case that the subdirs don't
match, but it's hard to do much about that)
8 years ago
..
continuserv Put each bit of spec in its own directory 8 years ago
css Enable syntax highlighting for example http requests 9 years ago
speculator Update the speculator to understand spec subdirs 8 years ago
README.md Update README.md 8 years ago
add-matrix-org-stylings.pl Replace hacky shell to do matrix styling with hacky perl 8 years ago
dump-swagger.py Add securityDefintions to generated swagger JSON 8 years ago
gendoc.py Put each bit of spec in its own directory 8 years ago
swagger-http-server.py Script to serve the generated swagger JSON 8 years ago

README.md

Generating the HTML for the specification

Requirements:

  • docutils (for converting RST to HTML)
  • Jinja2 (for templating)

To generate the complete specification along with supporting documentation, run: python gendoc.py

The output of this will be inside the "scripts/gen" folder.

Matrix.org only ("gen" folder has matrix.org tweaked pages): ./matrix-org-gendoc.sh /path/to/matrix.org/includes/nav.html

Generating the Swagger documentation

Swagger[1] is a framework for representing RESTful APIs. We use it to generate interactive documentation for our APIs.

Swagger UI reads a JSON description of the API. To generate this file from the YAML files in the api folder, run: ./dump-swagger.py

By default, dump-swagger will write to scripts/swagger/api-docs.json.

To make use of the generated file, there are a number of options:

[1] http://swagger.io/