Files
swagger-ui/build/index.html
2011-08-09 15:09:05 -07:00

161 lines
7.0 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>
<form id='api_selector'>
<div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text" /></div>
<div class='input'><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text" /></div>
<div class='input'><a id="explore" href="#">Explore</a></div>
</form>
<div class='container' id='resources_container'>
<ul id='resources'></ul>
</div>
<div id='content_message'></div>
<script id="resourceTemplate" type="text/x-jquery-tmpl"><li class='resource' id='resource_${name}'>
<div class='heading'>
<h2>
<a href='#!/${name}' onclick="Docs.toggleEndpointListForResource('${name}');">${name}</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 id="apiTemplate" type="text/x-jquery-tmpl"><li class='endpoint'>
<ul class='operations' id='${name}_endpoint_operations'></ul>
</li>
</script>
<script id="operationTemplate" type="text/x-jquery-tmpl"><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 id="paramTemplate" type="text/x-jquery-tmpl"><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 id="paramTemplateSelect" type="text/x-jquery-tmpl"><tr>
<td class='code'>${name}</td>
<td>
<select name='${name}'>
{{each allowableValues}}
{{if $value == defaultValue }}
<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 id="paramTemplateRequired" type="text/x-jquery-tmpl"><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 id="paramTemplateRequiredReadOnly" type="text/x-jquery-tmpl"><tr>
<td class='code required'>${name}</td>
<td>-</td>
<td width='500'>${description}</td>
</tr>
</script>
<script id="paramTemplateReadOnly" type="text/x-jquery-tmpl"><tr>
<td class='code'>${name}</td>
<td>-</td>
<td width='500'>${description}</td>
</tr>
</script>
<p id='colophon'>
Sexy API documentation from
<a href="http://swagger.wordnik.com">Swagger</a>.
</p>
</body>
</html>