3GPP-5GC-API / index.html
ShawnAI's picture
Create index.html
5f84c3c
raw
history blame
1.28 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="SwaggerUI" />
<title>3GPP SBI OpenAPI</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/swagger-ui.css" />
<style>
#sidebar {
position: fixed;
top: 0;
left: 0;
width: 200px;
height: 100%;
border-right: 1px solid #ccc;
padding: 10px;
overflow: auto;
}
#swagger-ui {
margin-left: 210px;
padding-top: 20px;
}
</style>
</head>
<body>
<div id="sidebar">
<h3>Select API:</h3>
<ul>
<li><a href="#" onclick="loadSwagger('https://petstore3.swagger.io/api/v3/openapi.json')">Petstore</a></li>
<li><a href="#" onclick="loadSwagger('https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/api-with-examples.yaml')">Second API</a></li>
<!-- Add more API links here -->
</ul>
</div>
<div id="swagger-ui"></div>
<script src="https://unpkg.com/[email protected]/swagger-ui-bundle.js" crossorigin></script>
<script>
function loadSwagger(url) {
if (window.ui) {
window.ui.destroy();
}
window.ui = SwaggerUIBundle({
url: url,
dom_id: '#swagger-ui'
});
}
window.onload = () => {
loadSwagger('https://petstore3.swagger.io/api/v3/openapi.json');
};
</script>
</body>
</html>