From d0fccbbbbad9b47a39827865f96a1b03e12ac303 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 9 Feb 2022 15:04:10 +0100 Subject: [PATCH] Show API doc for several versions Right now it is not possible to look at the API version for a specific version. docs.podman.io always show the latest version from the main branch. This is not want many users want so they now have the ability to select a different version. Fixes #12796 Signed-off-by: Paul Holzinger --- RELEASE_PROCESS.md | 2 ++ docs/source/Reference.rst | 14 +++++++++++--- docs/source/_static/api.html | 17 ++++++++++++++++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index d6414de73a..e893d9e2ee 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -166,6 +166,8 @@ spelled with complete minutiae. `git log -1 $(git tag | sort -V | tail -1)`. 1. Edit `version/version.go` and bump the `Version` value to the new release version. If there were API changes, also bump `APIVersion` value. + Make sure to also bump the version in the swagger.yaml `pkg/api/server/docs.go` + and to add a new entry in `docs/source/Reference.rst` for major and minor releases. 1. Commit this and sign the commit (`git commit -a -s -S`). The commit message should be `Bump to vX.Y.Z` (using the actual version numbers). 1. Push this single change to your github fork, and make a new PR, diff --git a/docs/source/Reference.rst b/docs/source/Reference.rst index d194c55a3e..dca49a5591 100644 --- a/docs/source/Reference.rst +++ b/docs/source/Reference.rst @@ -3,8 +3,16 @@ Reference ========= -To see full screen version please visit: `API documentation `_ +Show the API documentation for version: -.. raw:: html +* `latest (main branch) <_static/api.html>`_ - +* `version 4.0 <_static/api.html?version=v4.0>`_ + +* `version 3.4 <_static/api.html?version=v3.4>`_ + +* `version 3.3 <_static/api.html?version=v3.3>`_ + +* `version 3.2 <_static/api.html?version=v3.2>`_ + +* `version 3.1 <_static/api.html?version=v3.1>`_ diff --git a/docs/source/_static/api.html b/docs/source/_static/api.html index 6d467d0996..0d2d2a8a10 100644 --- a/docs/source/_static/api.html +++ b/docs/source/_static/api.html @@ -18,7 +18,22 @@ - +