generate rest API with redoc

via custom template
This commit is contained in:
Min RK
2024-02-07 12:30:57 +01:00
parent 2c93299764
commit 0082f5b3da
5 changed files with 67 additions and 28 deletions

View File

@@ -1,33 +1,14 @@
<!---
This doc is part of the API references section of the References documentation.
--->
---
page_template: redoc.html
# see: https://redocly.com/docs/redoc/config/ for options
redoc_options:
hideHostname: true
hideLoading: true
---
(jupyterhub-rest-API)=
# JupyterHub REST API
Below is an interactive view of JupyterHub's OpenAPI specification.
<!-- client-rendered openapi UI copied from FastAPI -->
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui.css">
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@4.1/swagger-ui-bundle.js"></script>
<!-- `SwaggerUIBundle` is now available on the page -->
<!-- render the ui here -->
<div id="openapi-ui"></div>
<script>
const ui = SwaggerUIBundle({
url: '../_static/rest-api.yml',
dom_id: '#openapi-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
],
layout: "BaseLayout",
deepLinking: true,
showExtensions: true,
showCommonExtensions: true,
});
</script>
NOTE: The contents of this markdown file are not used,
this page is entirely generated from `_templates/redoc.html` and `_static/rest-api.yml`