From 423d22ed233b002c61bb0e680cf7e7236b6b8081 Mon Sep 17 00:00:00 2001 From: Alexandre Franke Date: Tue, 28 Sep 2021 03:14:05 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20API=20Server=20config=20for?= =?UTF-8?q?=20RapiDoc=20(#3415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ Add API Server config for RapiDoc Signed-off-by: Alexandre Franke * Update scripts/dump-swagger.py Co-authored-by: Alexandre Franke Co-authored-by: Travis Ralston --- scripts/dump-swagger.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/dump-swagger.py b/scripts/dump-swagger.py index 4b4922ff..c8e9d8d6 100755 --- a/scripts/dump-swagger.py +++ b/scripts/dump-swagger.py @@ -68,6 +68,18 @@ output = { "consumes": ["application/json"], "produces": ["application/json"], "host": "matrix.org", + # The servers value will be picked up by RapiDoc to provide a way + # to switch API servers. Useful when one wants to test compliance + # of their server with the API. + "servers": { + "url": "https://{homeserver_address}/", + "variables": { + "homeserver_address": { + "default": "matrix-client.matrix.org", + "description": "The base URL for your homeserver", + } + } + }, "schemes": ["https"], "info": { "title": "Matrix Client-Server API",