Files
podman/docs/source/_static/api.html
Martin Fischer fa5d6cc103 docs: initialize redoc via JS API
Preparation for the next commit in which we'll make the script tag async
(in order to use await to fetch the new versions.json file).

Signed-off-by: Martin Fischer <martin@push-f.com>
2025-10-15 05:31:26 +02:00

39 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Reference</title>
<!-- needed for adaptive design -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/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", {
sortPropsAlphabetically: true,
sortOperationsAlphabetically: true,
}, document.getElementById("redoc-container"));
</script>
</body>
</html>