mirror of
https://github.com/containers/podman.git
synced 2026-07-08 22:35:01 -04:00
build the swagger.yml on readthedocs
One problem with the swagger upload is we need an extra bucket and then we need our own custom version schema and selector on the website. If we can just embed the swagger.yml as part of the official build we can get rid of all of that and have a much simpler way as the regular readthedocs version selector will work. We also no longer need to maintain an extra bucket upload and no longer need to update the version list which was forgotten all the time. Fixes: #28827 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -9,6 +9,11 @@ build:
|
||||
os: ubuntu-26.04
|
||||
tools:
|
||||
python: "3.14"
|
||||
golang: "1.25"
|
||||
jobs:
|
||||
pre_build:
|
||||
- make swagger
|
||||
- mv pkg/api/swagger.yaml docs/source/_static/swagger.yaml
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
|
||||
@@ -156,8 +156,6 @@ spelled with complete minutiae.
|
||||
1. Edit `version/rawversion/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`
|
||||
For major and minor versions also add the new branch name to
|
||||
`docs/source/Reference.rst` to show the new swagger version on docs.podman.io.
|
||||
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,
|
||||
|
||||
@@ -3,48 +3,4 @@
|
||||
Reference
|
||||
=========
|
||||
|
||||
Show the API documentation for version:
|
||||
|
||||
* `latest (main branch) <_static/api.html>`_
|
||||
|
||||
* `version 5.6 <_static/api.html?version=v5.6>`_
|
||||
|
||||
* `version 5.5 <_static/api.html?version=v5.5>`_
|
||||
|
||||
* `version 5.4 <_static/api.html?version=v5.4>`_
|
||||
|
||||
* `version 5.3 <_static/api.html?version=v5.3>`_
|
||||
|
||||
* `version 5.2 <_static/api.html?version=v5.2>`_
|
||||
|
||||
* `version 5.1 <_static/api.html?version=v5.1>`_
|
||||
|
||||
* `version 5.0 <_static/api.html?version=v5.0>`_
|
||||
|
||||
* `version 4.9 <_static/api.html?version=v4.9>`_
|
||||
|
||||
* `version 4.8 <_static/api.html?version=v4.8>`_
|
||||
|
||||
* `version 4.7 <_static/api.html?version=v4.7>`_
|
||||
|
||||
* `version 4.6 <_static/api.html?version=v4.6>`_
|
||||
|
||||
* `version 4.5 <_static/api.html?version=v4.5>`_
|
||||
|
||||
* `version 4.4 <_static/api.html?version=v4.4>`_
|
||||
|
||||
* `version 4.3 <_static/api.html?version=v4.3>`_
|
||||
|
||||
* `version 4.2 <_static/api.html?version=v4.2>`_
|
||||
|
||||
* `version 4.1 <_static/api.html?version=v4.1>`_
|
||||
|
||||
* `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>`_
|
||||
Show the API documentation for the `current version <_static/api.html>`_
|
||||
|
||||
@@ -21,15 +21,7 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/redoc@v2/bundles/redoc.standalone.js"> </script>
|
||||
<div id="redoc-container"></div>
|
||||
<script>
|
||||
// get version from query (default to latest)
|
||||
var queryString = window.location.search;
|
||||
var query = new URLSearchParams(queryString);
|
||||
var version = "latest";
|
||||
if (query.has("version")) {
|
||||
version = query.get("version");
|
||||
}
|
||||
|
||||
Redoc.init("https://storage.googleapis.com/libpod-master-releases/swagger-" + version + ".yaml", {
|
||||
Redoc.init("swagger.yaml", {
|
||||
sortPropsAlphabetically: true,
|
||||
sortOperationsAlphabetically: true,
|
||||
}, document.getElementById("redoc-container"));
|
||||
|
||||
Reference in New Issue
Block a user