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 1/3] 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 From b38cd08fbd307a2dbd0be3f84222fce4d18df2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 9 Nov 2022 10:29:29 +0100 Subject: [PATCH 2/3] Add newsfragment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- changelogs/internal/newsfragments/1331.clarification | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/internal/newsfragments/1331.clarification diff --git a/changelogs/internal/newsfragments/1331.clarification b/changelogs/internal/newsfragments/1331.clarification new file mode 100644 index 00000000..51348f7e --- /dev/null +++ b/changelogs/internal/newsfragments/1331.clarification @@ -0,0 +1 @@ +Update instructions to preview Swagger definitions. From 12b4d8ad95c292f5a78211d25f28f39937b833f8 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 15 Nov 2022 16:28:10 +0000 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e71b4f8f..62c2477c 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ 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: -* You can open `./scripts/swagger-preview.html`in your browser, and then open the file by clicking on `Local JSON File`. +* 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.