From 9b4773498a3bcf79eb593031159b037aea8bef50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 9 Nov 2022 10:25:56 +0100 Subject: [PATCH] Update instructions to preview Swagger definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use RapiDoc, the same library used in production. It is also compatible with OpenAPI 3.1. Signed-off-by: Kévin Commaille --- README.md | 8 +++----- scripts/swagger-preview.html | 13 +++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 scripts/swagger-preview.html diff --git a/README.md b/README.md index e8e7a793..e71b4f8f 100644 --- a/README.md +++ b/README.md @@ -90,11 +90,9 @@ For building the swagger definitions, create a python3 virtualenv and activate i and finally `python ./scripts/dump-swagger.py` to generate it to `./scripts/swagger/api-docs.json`. To make use of the generated file, there are a number of options: -* It can be uploaded from your filesystem to an online editor/viewer such as [on the swagger website](http://editor.swagger.io/). -* You can run a local HTTP server by running `./scripts/swagger-http-server.py`, and then view the documentation via an - online viewer; for example, at . -* You can host the swagger UI yourself. See for advice on how to - do so. +* You can open `./scripts/swagger-preview.html`in your browser, and then open the file by clicking on `Local JSON File`. +* You can run a local HTTP server by running `./scripts/swagger-http-server.py`, and then view the documentation by + opening `./scripts/swagger-preview.html` in your browser. ## Issue tracking diff --git a/scripts/swagger-preview.html b/scripts/swagger-preview.html new file mode 100644 index 00000000..de9ed729 --- /dev/null +++ b/scripts/swagger-preview.html @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file