mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-16 23:22:20 +08:00
添加Swagger2生成Api文档测试类,以及adoc转html
This commit is contained in:
74
quick-reach.html
Normal file
74
quick-reach.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<style>
|
||||
a,
|
||||
a:visited {
|
||||
color: blue;
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var links = [
|
||||
{
|
||||
url: 'http://localhost/',
|
||||
title: 'Home'
|
||||
},
|
||||
"<hr>",
|
||||
{
|
||||
url: 'http://localhost/api/swagger-ui.html',
|
||||
title: 'Swagger'
|
||||
},
|
||||
{
|
||||
url: 'http://localhost/api/',
|
||||
title: 'API'
|
||||
},
|
||||
"<p>API测试</p>",
|
||||
{
|
||||
url: 'http://localhost/api/book/get?id=1',
|
||||
title: ''
|
||||
},
|
||||
{
|
||||
url: 'http://localhost/api/status/getProcessCpu',
|
||||
title: ''
|
||||
},
|
||||
"<hr>",
|
||||
{
|
||||
url: 'http://localhost/nginx_status',
|
||||
title: 'Nginx Status'
|
||||
},
|
||||
"<hr>",
|
||||
{
|
||||
url: 'http://fanyi.youdao.com/',
|
||||
title: '有道翻译'
|
||||
},
|
||||
{
|
||||
url: 'http://fanyi.baidu.com/',
|
||||
title: '百度翻译'
|
||||
},
|
||||
]
|
||||
|
||||
var html = '';
|
||||
links.forEach(function (link) {
|
||||
if (typeof link === 'object') {
|
||||
html += '<p>' + link.title + '<a href="' + link.url + '" target="_blank">' + link.url + '</a></p>';
|
||||
} else if (typeof link === 'string') {
|
||||
html += link;
|
||||
}
|
||||
});
|
||||
document.getElementById('container').innerHTML = html;
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user