123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
- <title>API接口文档</title>
- <link rel="shortcut icon" href="/styles/images/api.ico"/>
- <script type="text/javascript" src="/styles/jquery/jquery-1.9.1.min.js"></script>
- <link rel="stylesheet" href="/styles/bootstrap/css/bootstrap.min.css"/>
- <script type="text/javascript" src="/styles/jquery/clipboard/clipboard.min.js"></script>
- <script type="text/javascript" src="/styles/layer3.0.3/layer.js"></script>
- <link rel="stylesheet" href="/styles/jsonview/jquery.jsonview.min.css"/>
- <script type="text/javascript" src="/styles/jsonview/jquery.jsonview.min.js"></script>
- <link rel="stylesheet" href="/styles/layer3.0.3/skin/default/layer.css"/>
- <link rel="stylesheet" href="/styles/highlight/styles/docco.css"/>
- <link rel="stylesheet" href="/styles/highlight/styles/style.css"/>
- <link rel="stylesheet" href="/styles/highlight/styles/default.css"/>
- <script src="/styles/highlight/highlight.pack.js"></script>
- <script src="/styles/jquery/marked.js"></script>
- <link rel="stylesheet" href="/styles/cdao/swaggerbootstrapui.css"/>
- <script src="/styles/jquery/template-web.js"></script>
- </head>
- <body style="overflow: hidden;">
- <div class="bycdao-left" style="height: 100%;overflow-y: auto;overflow-x: hidden;">
- <ul class="nav nav-list" id="menu">
- <li>
- <a href="javascript:void(0)">
- <i class="icon-text-width"></i>
- <span class="menu-text"> 简介 </span>
- </a>
- </li>
- <li class="active">
- <a href="#" class="dropdown-toggle">
- <i class="icon-file-alt"></i>
- <span class="menu-text">
- 其他页面
- <span class="badge badge-primary ">3</span>
- </span>
- <b class="arrow icon-angle-down"></b>
- </a>
- <ul class="submenu">
- <li>
- <a href="javascript:void(0)">
- <i class="icon-double-angle-right"></i>
- 帮助
- </a>
- </li>
- <li>
- <a href="javascript:void(0)">
- <i class="icon-double-angle-right"></i>
- 404错误页面
- </a>
- </li>
- <li>
- <a href="javascript:void(0)">
- <i class="icon-double-angle-right"></i>
- 500错误页面
- </a>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <!--离线文档说明-->
- <script type="text/html" id="offLinecontentScript">
- <div style="width:99%;margin:0px auto;">
- <div class="alert alert-info" role="alert">
- 提供markdwon格式类型的离线文档,开发者可拷贝该内容通过其他markdown转换工具进行转换为html或pdf.
- </div>
- <div class="input-inline" style="margin-bottom:10px;">
- <button class="btn btn-primary" type="button" id="btnCopy">拷贝文档</button>
- </div>
- <div class='input-inline'>
- <textarea class='form-control' style='width: 100%;height: 100%;' id="txtOffLineDoc">
- # 简介
- **标题**:{{title}}
- **简介**:{{description}}
- **HOST**:{{host}}
- **联系人**:{{contact}}
- **接口路径**:{{location}}
- <% for( i = 0; i < tags.length; i++) { var tag=tags[i] ; %># <%= tag.name %><% for( j = 0; j < paths.length; j++) {var path=paths[j]; if(path.tags.indexOf(tag.name)>-1){ %>
- ## <%= path.summary %>
- **接口说明**:<%= path.description %>
- **接口地址**:`<%= path.url %>`
- **请求方式**:`<%= path.methodType %>`
- **consumes**:`<%= path.consumes %>`
- **produces**:`<%= path.produces %>`
- **请求参数**:
- <% if(path.parameters!=null && path.parameters.length>0){ %>
- | 参数名称 | 说明 | in | 是否必须 | 类型 | schema |
- | ------------ | -------------------------------- |-----------|--------|----|--- |
- <% for( a = 0; a < path.parameters.length; a++) {var param=path.parameters[a]; %>|<%=param.name%>| <%=param.description%> | <%=param.in%> | <%=param.require%> |<%=param.type%> | <%=param.schemaValue%> |
- <%}%>
- <%}else{%>暂无<%}%><% if(path.refparameters!=null && path.refparameters.length>0){ %>
- **schema属性说明**
- <% for( a = 0; a < path.refparameters.length; a++) { var ref=path.refparameters[a];%>
- **<%=ref.name%>**
- | 参数名称 | 说明 | in | 是否必须 | 类型 | schema |
- | ------------ | -------------------------------- |-----------|--------|----|--- |
- <% for( b = 0; b < ref.params.length; b++) { var rp=ref.params[b];%>|<%=rp.name%>| <%=rp.description%> | <%=rp.in%> | <%=rp.require%> |<%=rp.type%> | <%=rp.schemaValue%> |
- <%}}}%>
- **响应数据**:
- ```json
- <%= path.responseValue %>
- ```
- **响应参数说明**:
- <% if(path.responseParameters!=null && path.responseParameters.length>0){ %>
- | 参数名称 | 说明 | 类型 | schema |
- | ------------ | -------------------|-------|----------- |
- <% for( a = 0; a < path.responseParameters.length; a++) { var param=path.responseParameters[a];%>|<%=param.name%>| <%=param.description%> |<%=param.type%> | <%=param.schemaValue%> |
- <%}}else{%>
- 暂无
- <%}%>
- <% if(path.responseRefParameters!=null && path.responseRefParameters.length>0){ %>
- **schema属性说明**
- <% for( a = 0; a < path.responseRefParameters.length; a++) { var ref=path.responseRefParameters[a];%>
- **<%=ref.name%>**
- | 参数名称 | 说明 | 类型 | schema |
- | ------------ | ------------------|--------|----------- |
- <% for( b = 0; b < ref.params.length; b++) { var rp=ref.params[b];%>|<%=rp.name%> | <%=rp.description%> |<%=rp.type%> | <%=rp.schemaValue%> |
- <%}%>
- <%}}%>
- **响应状态码说明**:
- <% if(path.responseCodes!=null && path.responseCodes.length>0){ %>
- | 状态码 | 说明 | schema |
- | ------------ | -------------------------------- |---------------------- |
- <% for( a = 0; a < path.responseCodes.length; a++) { var param=path.responseCodes[a];%>| <%=param.code%> | <%=param.description%> |<%=param.schema%>|
- <%}%>
- <%}else{%>
- 暂无
- <%}%>
- <%}%>
- <%}%>
- <%}%>
- </textarea>
- </div>
- </div>
- </script>
- <!--文档说明-->
- <script type="text/html" id="contentScript">
- <div style="padding: 10px 0;border-bottom: 1px dashed #ccc;height: 50px;vertical-align: middle;line-height: 30px;">
- <div style=" float: left;width: 90%;font-size: 20px;">{{summary}}</div>
- <!--<div style="float: right;width: 10%;text-align: right;vertical-align: top;">
- <a id="copyDocHref" style="cursor: pointer;text-decoration: none;" href="javascript:void(0);">复制文档</a>
- </div>-->
- </div>
- <div class="swbu-main" itemprop="articleBody">
- <div id="contentDoc"></div>
- <!--<textarea rows="10" cols="10" id="docText">-->
- <textarea rows="10" cols="10" id="docText" style="display: none;">
- **接口说明**:{{description}}
- **接口地址**:`{{url}}`
- **请求方式**:`{{methodType}}`
- **consumes**:`{{consumes}}`
- **produces**:`{{produces}}`
- **请求参数**:
- {{ if parameters && parameters.length>0 }}
- | 参数名称 | 说明 | in | 是否必须 | 类型 | schema |
- | ------------ | -------------------------------- |-----------|--------|----|--- |
- {{each parameters}}| {{$value.name}} | {{$value.description}} | {{$value.in}} | {{$value.require}} | {{$value.type}} | {{$value.schemaValue}} |
- {{/each}}
- {{else}}
- 暂无
- {{/if}}
- {{ if refparameters && refparameters.length>0 }}
- **schema属性说明**
- {{each refparameters}}
- **{{$value.name}}**
- | 参数名称 | 说明 | in | 是否必须 | 类型 | schema |
- | ------------ | -------------------------------- |-----------|--------|----|--- |
- {{each $value.params}}| {{$value.name}} | {{$value.description}} | {{$value.in}} | {{$value.require}} |{{$value.type}} | {{$value.schemaValue}} |
- {{/each}}
- {{/each}}
- {{/if}}
- **响应数据**:
- ```json
- {{responseValue}}
- ```
- **响应参数说明**:
- {{ if responseParameters && responseParameters.length>0 }}
- | 参数名称 | 说明 | 类型 | schema |
- | ------------ | -------------------|-------|----------- |
- {{each responseParameters}}| {{$value.name}} |{{$value.description}} | {{$value.type}} | {{$value.schemaValue}} |
- {{/each}}
- {{else}}
- 暂无
- {{/if}}
- {{ if responseRefParameters && responseRefParameters.length>0 }}
- **schema属性说明**
- {{each responseRefParameters}}
- **{{$value.name}}**
- | 参数名称 | 说明 | 类型 | schema |
- | ------------ | ------------------|--------|----------- |
- {{each $value.params}}| {{$value.name}} | {{$value.description}} | {{$value.type}} | {{$value.schemaValue}} |
- {{/each}}
- {{/each}}
- {{/if}}
- **响应状态码说明**:
- {{ if responseCodes}}
- | 状态码 | 说明 | schema |
- | ------------ | -------------------------------- |---------------------- |
- {{each responseCodes}}| {{$value.code}} | {{$value.description}} |{{$value.schema}} |
- {{/each}}
- {{else}}
- 暂无
- {{/if}}
- </textarea>
- </div>
- </script>
- <!--Debug调试tab-->
- <script type="text/html" id="DebugScript">
- <div style="width: 100%;margin: 0px auto;margin-top: 10px;">
- <div class="input-group m-bot15">
- <span class="input-group-btn">
- <button class="btn btn-default btn-info" type="button">{{methodType}}</button>
- </span>
- <input type="text" id="txtreqUrl" data-originalurl="<%=url.substring(1)%>" class="form-control"
- value="<%=url.substring(1)%>">
- <span class="input-group-btn">
- <button id="btnRequest" class="btn btn-default btn-primary" type="button"> 发 送 </button>
- </span>
- </div>
- <div style="margin-top: 15px;">
- <div class="swbu-main">
- <%if((parameters!=null && parameters.length>0)||(globalParameters!=null && globalParameters.length>0)){
- var fileform=false;%>
- <% for( a = 0; a < parameters.length ; a++ ) {var param=parameters[a]; %>
- <% if(param.type=="MultipartFile"){ fileform=true;}%>
- <%}%>
- <%if(fileform){%>
- <form id="uploadForm" target="uploadIframe" action="<%=url.substring(1)%>" type=""
- enctype="multipart/form-data" method="{{methodType}}">
- <table class="">
- <thead>
- <tr>
- <th></th>
- <th>参数名称</th>
- <th>参数值</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody id="paramBody">
- <!--遍历 是否有全局参数--->
- <%if(globalParameters!=null && globalParameters.length>0){ %>
- <% for( a = 0; a < globalParameters.length ; a++ ) {var param=globalParameters[a]; %>
- <%if(param.in!="header"){%>
- <tr data-name="<%=param.name%>" data-in="<%=param.in%>" data-required="<%=param.require%>">
- <td width="5%">
- <div class="checkbox"><label><input type="checkbox" value="" checked=""></label></div>
- </td>
- <td width="35%">
- <input class="form-control p-key" value="<%=param.name%>">
- </td>
- <td>
- <%if(param.in=="body"){ %>
- <%if(param.type=="MultipartFile"){%>
- <input name="<%=param.name%>" type="file" class="form-control p-value"
- data-name="<%=param.name%>" placeholder="<%=param.description%>"/>
- <%}else {%>
- <textarea class="form-control p-value" style="font-size: 16px;" rows="10"
- data-in="<%=param.in%>" data-apiUrl="<%=url.substring(1)%>"
- name="<%=param.name%>" data-name="<%=param.name%>"
- placeholder="<%=param.description%>"><%=param.txtValue%></textarea>
- <%}%>
- <%}else{%>
- <input class="form-control p-value" name="<%=param.name%>" data-in="<%=param.in%>"
- data-apiurl="<%=url.substring(1)%>"
- data-name="<%=param.name%>" placeholder="<%=param.description%>"
- value="<%=param.txtValue%>"/>
- <%}%>
- </td>
- <td width="5%">
- <button class="btn btn-danger btn-circle btn-small btn-param-delete" type="button">
- <strong>×</strong></button>
- </td>
- </tr>
- <%}%>
- <%}%>
- <%}%>
- <% for( a = 0; a < parameters.length ; a++ ) {var param=parameters[a]; %>
- <%if(param.in!="header"){%>
- <tr data-name="<%=param.name%>" data-in="<%=param.in%>" data-required="<%=param.require%>"
- data-type="<%=param.type%>">
- <td width="5%">
- <div class="checkbox"><label><input type="checkbox" value="" checked=""></label></div>
- </td>
- <td width="35%">
- <input class="form-control p-key" value="<%=param.name%>">
- </td>
- <td>
- <%if(param.in=="body"){ %>
- <%if(param.type=="MultipartFile"){%>
- <input name="<%=param.name%>" type="file" class="form-control p-value"
- data-name="<%=param.name%>" placeholder="<%=param.description%>"/>
- <%}else {%>
- <textarea class="form-control p-value" style="font-size: 16px;" rows="10"
- data-in="<%=param.in%>" data-apiUrl="<%=url.substring(1)%>"
- name="<%=param.name%>" data-name="<%=param.name%>"
- placeholder="<%=param.description%>"><%=param.txtValue%></textarea>
- <%}%>
- <%}else{%>
- <input class="form-control p-value p-<%=param.in%>" name="<%=param.name%>"
- data-in="<%=param.in%>" data-apiurl="<%=url.substring(1)%>"
- data-name="<%=param.name%>" placeholder="<%=param.description%>"
- value="<%=param.txtValue%>"/>
- <%}%>
- </td>
- <td width="5%">
- <button class="btn btn-danger btn-circle btn-small btn-param-delete" type="button">
- <strong>×</strong></button>
- </td>
- </tr>
- <%}%>
- <%}%>
- </tbody>
- </table>
- </form>
- <div id="resptab" class="tabs-container">
- <iframe name="uploadIframe" id="uploadIframe"
- style="border: none;height: 1%;display: none;"></iframe>
- </div>
- <%}else{%>
- <table class="">
- <thead>
- <tr>
- <th></th>
- <th>参数名称</th>
- <th>参数值</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody id="paramBody">
- <!--遍历 是否有全局参数--->
- <%if(globalParameters!=null && globalParameters.length>0){ %>
- <% for( a = 0; a < globalParameters.length ; a++ ) {var param=globalParameters[a]; %>
- <tr data-name="<%=param.name%>" data-in="<%=param.in%>" data-required="<%=param.require%>">
- <td width="5%">
- <div class="checkbox"><label><input type="checkbox" value="" checked=""></label></div>
- </td>
- <td width="35%">
- <input class="form-control p-key" value="<%=param.name%>">
- </td>
- <td>
- <%if(param.in=="body"){ %>
- <%if(param.type=="MultipartFile"){%>
- <input name="<%=param.name%>" type="file" class="form-control p-value"
- data-name="<%=param.name%>" placeholder="<%=param.description%>"/>
- <%}else {%>
- <textarea class="form-control p-value" style="font-size: 16px;" rows="10"
- data-in="<%=param.in%>" data-apiUrl="<%=url.substring(1)%>"
- name="<%=param.name%>" data-name="<%=param.name%>"
- placeholder="<%=param.description%>"><%=param.txtValue%></textarea>
- <%}%>
- <%}else{%>
- <input class="form-control p-value" name="<%=param.name%>" data-in="<%=param.in%>"
- data-apiurl="<%=url.substring(1)%>"
- data-name="<%=param.name%>" placeholder="<%=param.description%>"
- value="<%=param.txtValue%>"/>
- <%}%>
- </td>
- <td width="5%">
- <button class="btn btn-danger btn-circle btn-small btn-param-delete" type="button">
- <strong>×</strong></button>
- </td>
- </tr>
- <%}%>
- <%}%>
- <% for( a = 0; a < parameters.length ; a++ ) {var param=parameters[a]; %>
- <tr data-name="<%=param.name%>" data-in="<%=param.in%>" data-required="<%=param.require%>">
- <td width="5%">
- <div class="checkbox"><label><input type="checkbox" value="" checked=""></label></div>
- </td>
- <td width="35%">
- <input class="form-control p-key" value="<%=param.name%>">
- </td>
- <td>
- <%if(param.in=="body"){ %>
- <%if(param.type=="MultipartFile"){%>
- <input name="<%=param.name%>" type="file" class="form-control p-value"
- data-name="<%=param.name%>" placeholder="<%=param.description%>"/>
- <%}else {%>
- <textarea class="form-control p-value" style="font-size: 16px;" rows="10"
- data-in="<%=param.in%>" data-apiUrl="<%=url.substring(1)%>"
- name="<%=param.name%>" data-name="<%=param.name%>"
- placeholder="<%=param.description%>"><%=param.txtValue%></textarea>
- <%}%>
- <%}else{%>
- <input class="form-control p-value p-<%=param.in%>" name="<%=param.name%>"
- data-in="<%=param.in%>" data-apiurl="<%=url.substring(1)%>"
- data-name="<%=param.name%>" placeholder="<%=param.description%>"
- value="<%=param.txtValue%>"/>
- <%}%>
- </td>
- <td width="5%">
- <button class="btn btn-danger btn-circle btn-small btn-param-delete" type="button">
- <strong>×</strong></button>
- </td>
- </tr>
- <%}%>
- </tbody>
- </table>
- <%}%>
- <%}%>
- </div>
- </div>
- <div id="responsebody">
- </div>
- </div>
- </script>
- <!--全局参数-->
- <script type="text/html" id="GlobalParamScript">
- <div style="width:99%;margin:0px auto;">
- <div class="alert alert-info" role="alert">
- 提供全局参数Debug功能,目前默认提供header(请求头)、query(form)两种方式的入参.<br/><br/>
- 在此添加全局参数后,默认Debug调试tab页会带上该参数,该全局参数只在该分组下有效,不同的分组需要分别设置
- </div>
- <div class="input-inline" style="margin-bottom:10px;">
- <button class="btn btn-primary" type="button" id="btnAddParam">添加参数</button>
- </div>
- <div style="margin-top: 15px;">
- <div class="swbu-main">
- <table class="" id="globalTable">
- <thead>
- <tr>
- <th>参数名称</th>
- <th>参数值</th>
- <th>参数类型</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody id="globalTabBody">
- <%if(globalParameters!=null && globalParameters.length>0){ %>
- <% for( a = 0; a < globalParameters.length ; a++ ) {var param=globalParameters[a]; %>
- <tr>
- <td><input class="form-control p-key" value="<%=param.name%>" data-old='<%=param.name%>'></td>
- <td><input class="form-control p-key" value="<%=param.value%>"></td>
- <td><select class='form-control'>
- <option value='header'
- <%if(param.in=="header"){%> selected <%}%> >header</option>
- <option value='query'
- <%if(param.in=="query"){%> selected <%}%>>query</option></select></td>
- <td>
- <button class="btn btn-circle btn-info btn-small btn-save" type="button">保存</button> <button
- class="btn btn-circle btn-danger btn-small btn-cancel" type="button">删除
- </button>
- </td>
- </tr>
- <%}}%>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </script>
- <!--SwaggerBootstrapUi简介-->
- <script type="text/html" id="SwaggerBootstrapUiIntroScript">
- <div style="width:99%;margin:0px auto;">
- <div style="margin-top: 15px;">
- <div class="swbu-main" itemprop="sbuarticleBody">
- <div id="sbuDescriptionDoc" style="width: 90%;margin: 0px auto;">
- <table>
- <tr>
- <td colspan="2" style="text-align: center;">{{title}}</td>
- </tr>
- <tr>
- <td>简介</td>
- <td>{{description}}</td>
- </tr>
- <tr>
- <td>作者</td>
- <td>{{contact}}</td>
- </tr>
- <tr>
- <td>版本</td>
- <td>{{version}}</td>
- </tr>
- <tr>
- <td>host</td>
- <td>{{host}}</td>
- </tr>
- <tr>
- <td>服务url</td>
- <td>{{termsOfService}}</td>
- </tr>
- </table>
- </div>
- <!--<textarea rows="10" cols="10" id="docText">-->
- </div>
- </div>
- </script>
- <div class="bycdao-main" id="content" style="height: 100%;overflow-y: auto;">
- <div id="myTab" class="tabs-container" style="width:99%;margin:0px auto;">
- <ul class="nav nav-tabs">
- <li class="active">
- <a data-toggle="tab" href="#tab1" aria-expanded="false"> 接口说明</a>
- </li>
- <li class=""><a data-toggle="tab" href="#tab2" aria-expanded="true"> 在线调试</a></li>
- </ul>
- <div class="tab-content">
- <div id="tab1" class="tab-pane active">
- <div class="panel-body" id="tabBody">
- </div>
- </div>
- <div id="tab2" class="tab-pane">
- <div class="panel-body"><strong>正在开发中,敬请期待......</strong>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="/styles/ace/bootstrap.min.js"></script>
- <script type="text/javascript" src="/styles/ace/ace.min.js"></script>
- <script type="text/javascript" src="/styles/cdao/swaggerbootstrapui.js"></script>
- </body>
- </html>
|