Alexandre Franke
de9cf76a57
Dump additional apis ( #3684 )
...
* ✨ Allow JSON generation for all API
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* 👷 Export AS API JSON
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* ✨ Handle missing security definitions
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* 👷 Export Push Gateway API JSON
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* 🎨 Improve identation
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* 🐛 Fix successive reference handling
Fixes #3689
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* 👷 Export Server-Server API JSON
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* 📝 Remove obsolete comment
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* 🐛 Make properties objects, as they MUST be
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
* Revert "👷 Export Server-Server API JSON"
This reverts commit 061f91c2cbcb6dff35c74177226da106826b4214.
Co-authored-by: Alexandre Franke <alexandre.franke@matrix.org>
3 years ago
Alexandre Franke
b6b98410c1
🐛 openapi: prepend basePath to all paths ( #3642 )
3 years ago
Lukas Lihotzki
4415e36a74
dump-swagger.py: include untagged operations ( #3326 )
3 years ago
Alexandre Franke
b55cc15772
✨ Fix links in OpenAPI description nodes ( #3598 )
...
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
3 years ago
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.
3 years ago
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.
3 years ago
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
3 years ago
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>
3 years ago
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>
3 years ago
Will
a0316f6794
Update path to Swagger files
3 years ago
Kitsune Ral
b789f3e10b
dump-swagger.py: fix a typo in the help string
5 years ago
Matthew Hodgson
1fc6465168
remove archaic port 8448 from matrix.org URL for swagger-ui
6 years ago
Travis Ralston
2dae0c9c49
use python3 in dump-swagger.py
6 years ago
Travis Ralston
ebc7db12fb
Remove extraneous list casting
6 years ago
Travis Ralston
f54d5a4039
Convert build scripts to python 3
6 years ago
Richard van der Hoff
a38d4fc68e
Move templating into scripts dir
...
There's no real need for this to be at the top level.
7 years ago
Richard van der Hoff
986c9d99a0
Improve arg parsing in dump-swagger
7 years ago
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.
7 years ago
Richard van der Hoff
13d3293378
Fix version-extraction regexp
...
Fixes https://github.com/matrix-org/matrix-doc/issues/982
7 years ago
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.
8 years ago
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
f46a2a7f2b
Include the basePath in the path in swagger output
...
This fixes both SPEC-393, and ORG-52.
9 years ago
Richard van der Hoff
23c4ffbc1b
Add securityDefintions to generated swagger JSON
...
Also factor out to a common file
9 years ago
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.
9 years ago
Daniel Wagner-Hall
aaeaa1dd98
Detect major version in presence of patch release
9 years ago
Daniel Wagner-Hall
a9b4f6fef0
Add missing _ to paths
9 years ago
Daniel Wagner-Hall
99b8a066c8
Make dump-swagger work from all directories
9 years ago
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.
9 years ago