Update index.html #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Swagger UI</title> | ||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.52.5/swagger-ui.css"> | ||
</head> | ||
<body> | ||
<div id="swagger-ui"></div> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.52.5/swagger-ui-bundle.js"></script> | ||
<script> | ||
const ui = SwaggerUIBundle({ | ||
url: "YOUR_SWAGGER_JSON_URL", // 替换为您的 Swagger JSON 或 YAML 文件的 URL | ||
dom_id: '#swagger-ui', | ||
presets: [ | ||
SwaggerUIBundle.presets.apis, | ||
SwaggerUIStandalonePreset | ||
], | ||
layout: "StandaloneLayout" | ||
}); | ||
</script> | ||
</body> | ||
</html> |