Commit graph

24 commits

Author SHA1 Message Date
Richard van der Hoff
61ac438871
Remove the old templating system (#3445)
* Inline resolve_references in dump-swagger

Since this is the only bit of the old templating system we still use, let's
inline it.

OrederedLoader and OrderedDict are now redundant, because all dicts in Python
preserve insertion order.

* Remove the old templating system

We've now replaced the old templates with hugo, so we can get rid of this mess.
2021-10-15 11:40:03 +01:00
Richard van der Hoff
265ebef584
Fix dump-swagger.py for PyYAML 6.0. (#3443)
PyYAML 6.0 was released yesterday, and it finally drops support for `yaml.load`
without a `loader` argument, which has been deprecated since 2017.

We don't use any fancy yaml objects, so `safe_load` should be fine.
2021-10-14 13:25:03 -06:00
Travis Ralston
95d850c418
Update client-server API endpoints to move from r0 to v3 (plus whitespace fixes) (#3421)
* Blind find & replace all on client major version -> v3

* Fix up bad replacements

* Fix anchors for r0->v3

* Changelog
2021-10-12 11:07:01 -06:00
Alexandre Franke
26c0c88882
🐛 Fix OpenAPI definition generation (#3418)
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>

Co-authored-by: Alexandre Franke <alexandre.franke@matrix.org>
2021-10-01 10:54:16 -06:00
Alexandre Franke
423d22ed23
Add API Server config for RapiDoc (#3415)
*  Add API Server config for RapiDoc

Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>

* Update scripts/dump-swagger.py

Co-authored-by: Alexandre Franke <alexandre.franke@matrix.org>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2021-09-27 19:14:05 -06:00
Will
a0316f6794 Update path to Swagger files 2021-08-27 19:16:42 +01:00
Kitsune Ral
b789f3e10b dump-swagger.py: fix a typo in the help string 2020-05-28 13:56:29 +02:00
Matthew Hodgson
1fc6465168 remove archaic port 8448 from matrix.org URL for swagger-ui 2018-10-07 23:25:32 +01:00
Travis Ralston
2dae0c9c49 use python3 in dump-swagger.py 2018-07-19 08:54:04 -06:00
Travis Ralston
ebc7db12fb Remove extraneous list casting 2018-07-10 16:52:17 -06:00
Travis Ralston
f54d5a4039 Convert build scripts to python 3 2018-07-06 15:21:07 -06:00
Richard van der Hoff
a38d4fc68e Move templating into scripts dir
There's no real need for this to be at the top level.
2017-11-08 08:37:56 +00:00
Richard van der Hoff
986c9d99a0 Improve arg parsing in dump-swagger 2017-10-25 08:05:50 +01:00
Richard van der Hoff
0dfff6b190 Simplify dump_swagger
We don't need most of the templating stuff. All we have to do is merge together
the swagger files, and resolve references.
2017-09-27 08:04:24 +01:00
Richard van der Hoff
13d3293378 Fix version-extraction regexp
Fixes https://github.com/matrix-org/matrix-doc/issues/982
2017-09-18 13:48:35 +01:00
Richard van der Hoff
d41438605d Use matrix.org for swagger UI
In the swagger UI, default to matrix.org rather than localhost, to make the UI
more useful.
2016-10-14 17:56:26 +01:00
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
f46a2a7f2b Include the basePath in the path in swagger output
This fixes both SPEC-393, and ORG-52.
2016-05-06 12:35:27 +01:00
Richard van der Hoff
23c4ffbc1b Add securityDefintions to generated swagger JSON
Also factor out to a common file
2016-05-03 13:57:16 +01:00
Richard van der Hoff
c39d797cce Dump-swagger: take output file name rather than output dir
Make the argument to dump-swagger.py be the name of the output file rather than
the output dir, and give it a sensible default.

Also, use the absolute path to the output file, so that the output path is
relative to the user's cwd rather than the templating dir.
2016-05-03 12:03:21 +01:00
Daniel Wagner-Hall
aaeaa1dd98 Detect major version in presence of patch release 2015-12-09 15:56:58 +00:00
Daniel Wagner-Hall
a9b4f6fef0 Add missing _ to paths 2015-12-08 15:39:32 +00:00
Daniel Wagner-Hall
99b8a066c8 Make dump-swagger work from all directories 2015-12-07 14:40:42 +00:00
Daniel Wagner-Hall
1f5b6271f2 Generate swagger-ui output for client-server API
Depends on:
https://github.com/matrix-org/matrix-doc/pull/212
https://github.com/matrix-org/matrix-doc/pull/208
https://github.com/matrix-org/matrix-doc/pull/207
for the actual rendered output to not throw javascript errors at runtime.
2015-12-07 12:45:13 +00:00