170 lines
7.6 KiB
HTML
170 lines
7.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
<head>
|
|
<meta charset='utf-8' />
|
|
<!-- Always force latest IE rendering engine (even in intranet) and Chrome Frame -->
|
|
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible' />
|
|
<title>Swagger API Explorer</title>
|
|
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css' />
|
|
<link href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/smoothness/jquery-ui.css' media='screen' rel='stylesheet' type='text/css' />
|
|
<link href='stylesheets/screen.css' media='screen' rel='stylesheet' type='text/css' />
|
|
<script src='javascripts/app.js' type='text/javascript'></script>
|
|
<script src='javascripts/swagger-service.js' type='text/javascript'></script>
|
|
<script src='javascripts/swagger-ui.js' type='text/javascript'></script>
|
|
</head>
|
|
<body>
|
|
<div id='header'>
|
|
<a href="http://swagger.wordnik.com" id="logo">swagger</a>
|
|
<form id='api_selector'>
|
|
<div class='input'><input type="text" placeholder="http://example.com/api" name="baseUrl" id="input_baseUrl" /></div>
|
|
<div class='input'><input type="text" placeholder="api_key" name="apiKey" id="input_apiKey" /></div>
|
|
<div class='input'><a href="#" id="explore">Explore</a></div>
|
|
</form>
|
|
</div>
|
|
<div class='container' id='resources_container'>
|
|
<ul id='resources'></ul>
|
|
</div>
|
|
<script type="text/x-jquery-tmpl" id="resourceTemplate"><li class='resource' id='resource_${name}'>
|
|
<div class='heading'>
|
|
<h2>
|
|
<a href='#!/${name}' onclick="Docs.toggleEndpointListForResource('${name}');">${path}</a>
|
|
</h2>
|
|
<ul class='options'>
|
|
<li>
|
|
<a href='#!/${name}' id='endpointListTogger_${name}' onclick="Docs.toggleEndpointListForResource('${name}');">Show/Hide</a>
|
|
</li>
|
|
<li>
|
|
<a href='#' onclick="Docs.collapseOperationsForResource('${name}'); return false;">
|
|
List Operations
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href='#' onclick="Docs.expandOperationsForResource('${name}'); return false;">
|
|
Expand Operations
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href='${baseUrl}${path_json}'>Raw</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<ul class='endpoints' id='${name}_endpoint_list' style='display:none'></ul>
|
|
</li>
|
|
</script>
|
|
<script type="text/x-jquery-tmpl" id="apiTemplate"><li class='endpoint'>
|
|
<ul class='operations' id='${name}_endpoint_operations'></ul>
|
|
</li>
|
|
</script>
|
|
<script type="text/x-jquery-tmpl" id="operationTemplate"><li class='${httpMethodLowercase} operation' id='${apiName}_${nickname}_${httpMethod}'>
|
|
<div class='heading'>
|
|
<h3>
|
|
<span class='http_method'>
|
|
<a href='#!/${apiName}/${nickname}_${httpMethod}' onclick="Docs.toggleOperationContent('${apiName}_${nickname}_${httpMethod}_content');">${httpMethod}</a>
|
|
</span>
|
|
<span class='path'>
|
|
<a href='#!/${apiName}/${nickname}_${httpMethod}' onclick="Docs.toggleOperationContent('${apiName}_${nickname}_${httpMethod}_content');">${path_json}</a>
|
|
</span>
|
|
</h3>
|
|
<ul class='options'>
|
|
<li>
|
|
<a href='#!/${apiName}/${nickname}_${httpMethod}' onclick="Docs.toggleOperationContent('${apiName}_${nickname}_${httpMethod}_content');">${summary}</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class='content' id='${apiName}_${nickname}_${httpMethod}_content' style='display:none'>
|
|
{{if notes}}
|
|
<h4>Implementation Notes</h4>
|
|
<p>${notes}</p>
|
|
{{/if}}
|
|
<form accept-charset='UTF-8' action='#' class='sandbox' id='${apiName}_${nickname}_${httpMethod}_form' method='post'>
|
|
<div style='margin:0;padding:0;display:inline'></div>
|
|
<h4>Parameters</h4>
|
|
<table class='fullwidth'>
|
|
<thead>
|
|
<tr>
|
|
<th>Parameter</th>
|
|
<th id='${apiName}_${nickname}_${httpMethod}_value_header'>Value</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id='${apiName}_${nickname}_${httpMethod}_params'></tbody>
|
|
</table>
|
|
<div class='sandbox_header' id='${apiName}_${nickname}_${httpMethod}_content_sandbox_response_header'>
|
|
<input class='submit' id='${apiName}_${nickname}_${httpMethod}_content_sandbox_response_button' name='commit' type='button' value='Try it out!' />
|
|
<a href='#' id='${apiName}_${nickname}_${httpMethod}_content_sandbox_response_hider' onclick="$('#${apiName}_${nickname}_${httpMethod}_content_sandbox_response').slideUp();$(this).fadeOut(); return false;" style='display:none'>Hide Response</a>
|
|
<img alt='Throbber' id='${apiName}_${nickname}_${httpMethod}_content_sandbox_response_throbber' src='http://swagger.wordnik.com/images/throbber.gif' style='display:none' />
|
|
</div>
|
|
</form>
|
|
<div class='response' id='${apiName}_${nickname}_${httpMethod}_content_sandbox_response' style='display:none'>
|
|
<h4>Request URL</h4>
|
|
<div class='block request_url'></div>
|
|
<h4>Response Body</h4>
|
|
<div class='block response_body'></div>
|
|
<h4>Response Code</h4>
|
|
<div class='block response_code'></div>
|
|
<h4>Response Headers</h4>
|
|
<div class='block response_headers'></div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</script>
|
|
<script type="text/x-jquery-tmpl" id="paramTemplate"><tr>
|
|
<td class='code'>${name}</td>
|
|
<td>
|
|
<input minlength='0' name='${name}' placeholder='' type='text' value='' />
|
|
</td>
|
|
<td width='500'>${description}</td>
|
|
</tr>
|
|
</script>
|
|
<script type="text/x-jquery-tmpl" id="paramTemplateSelect"><tr>
|
|
<td class='code'>${name}</td>
|
|
<td>
|
|
<select name='${name}'>
|
|
{{if required == false }}
|
|
<option selected='selected' value=''></option>
|
|
{{/if}}
|
|
{{each allowableValues.values}}
|
|
{{if $value == defaultValue && required == true }}
|
|
<option selected='selected' value='${$value}'>${$value}</option>
|
|
{{else}}
|
|
<option value='${$value}'>${$value}</option>
|
|
{{/if}}
|
|
{{/each}}
|
|
</select>
|
|
</td>
|
|
<td width='500'>${description}</td>
|
|
</tr>
|
|
</script>
|
|
<script type="text/x-jquery-tmpl" id="paramTemplateRequired"><tr>
|
|
<td class='code required'>${name}</td>
|
|
<td>
|
|
<input class='required' minlength='1' name='${name}' placeholder='(required)' type='text' value='' />
|
|
</td>
|
|
<td width='500'>
|
|
<strong>${description}</strong>
|
|
</td>
|
|
</tr>
|
|
</script>
|
|
<script type="text/x-jquery-tmpl" id="paramTemplateRequiredReadOnly"><tr>
|
|
<td class='code required'>${name}</td>
|
|
<td>-</td>
|
|
<td width='500'>${description}</td>
|
|
</tr>
|
|
</script>
|
|
<script type="text/x-jquery-tmpl" id="paramTemplateReadOnly"><tr>
|
|
<td class='code'>${name}</td>
|
|
<td>-</td>
|
|
<td width='500'>${description}</td>
|
|
</tr>
|
|
</script>
|
|
<div id='content_message'>
|
|
Enter the base URL of the API that you wish to explore, or try
|
|
<a onclick="$('#input_baseUrl').val('http://petstore.swagger.wordnik.com/api/resources.json'); apiSelectionController.showApi(); return false;" href="#">petstore.swagger.wordnik.com/api/resources.json</a>
|
|
</div>
|
|
<p id='colophon' style='display:none'>
|
|
Sexy API documentation from
|
|
<a href="http://swagger.wordnik.com">Swagger</a>.
|
|
</p>
|
|
</body>
|
|
</html>
|