yay: dev complete: swagger javascript sandbox
This commit is contained in:
@@ -94,69 +94,66 @@
|
||||
|
||||
<script id="apiTemplate" type="text/x-jquery-tmpl">
|
||||
<li class='endpoint'>
|
||||
<ul id='${name}_endpoint_${id}_operations' class='operations'>
|
||||
<ul id='${name}_endpoint_operations' class='operations'>
|
||||
</ul>
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<script id="operationTemplate" type="text/x-jquery-tmpl">
|
||||
<li class='${httpMethodLowercase} operation' id='${apiName}_${nickname}_${id}'>
|
||||
<li class='${httpMethodLowercase} operation' id='${apiName}_${nickname}_${httpMethod}'>
|
||||
<div class='heading'>
|
||||
<h3>
|
||||
<span class='http_method'><a href="#!/${apiName}/${nickname}_${id}"
|
||||
onclick="Docs.toggleOperationContent('${apiName}_${nickname}_${id}_content');">${httpMethod}</a></span>
|
||||
<span class='path'><a href="#!/${apiName}/${nickname}_${id}"
|
||||
onclick="Docs.toggleOperationContent('${apiName}_${nickname}_${id}_content');">${path_json}</a></span>
|
||||
<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}_${id}"
|
||||
onclick="Docs.toggleOperationContent('${apiName}_${nickname}_${id}_content');">${summary}</a></li>
|
||||
<li><a href="#!/${apiName}/${nickname}_${httpMethod}"
|
||||
onclick="Docs.toggleOperationContent('${apiName}_${nickname}_${httpMethod}_content');">${summary}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='content' id='${apiName}_${nickname}_${id}_content' style='display:none'>
|
||||
<form id="${apiName}_${nickname}_${id}_form" accept-charset="UTF-8" action="#" class="sandbox" method="post">
|
||||
<div class='content' id='${apiName}_${nickname}_${httpMethod}_content' style='display:none'>
|
||||
<form id="${apiName}_${nickname}_${httpMethod}_form" accept-charset="UTF-8" action="#" class="sandbox" 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}_${id}_value_header">Value</th>
|
||||
<th id="${apiName}_${nickname}_${httpMethod}_value_header">Value</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="${apiName}_${nickname}_${id}_params">
|
||||
<tbody id="${apiName}_${nickname}_${httpMethod}_params">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class='sandbox_header' id='${apiName}_${nickname}_${id}_content_sandbox_response_header'>
|
||||
<input class="submit" id="${apiName}_${nickname}_${id}_content_sandbox_response_button" name="commit"
|
||||
<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}_${id}_content_sandbox_response_hider"
|
||||
onclick="$('#${apiName}_${nickname}_${id}_content_sandbox_response').slideUp();$(this).fadeOut(); return false;"
|
||||
<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}_${id}_content_sandbox_response_throbber"
|
||||
<img alt="Throbber" id="${apiName}_${nickname}_${httpMethod}_content_sandbox_response_throbber"
|
||||
src="images/throbber.gif" style="display:none"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class='response' id='${apiName}_${nickname}_${id}_content_sandbox_response' style='display:none'>
|
||||
<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>
|
||||
<h4>Example Ruby Request</h4>
|
||||
|
||||
<div class='block response_ruby_example'></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -166,7 +163,7 @@
|
||||
<script id="paramTemplateRequired" type="text/x-jquery-tmpl">
|
||||
<tr>
|
||||
<td class='code required'>${name}</td>
|
||||
<td><input id="${name}_${id}" name="${name}" class="required" minlength="1" placeholder="(required)" type="text" value=""/></td>
|
||||
<td><input name="${name}" class="required" minlength="1" placeholder="(required)" type="text" value=""/></td>
|
||||
<td width='500'><strong>${description}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -175,7 +172,7 @@
|
||||
<script id="paramTemplate" type="text/x-jquery-tmpl">
|
||||
<tr>
|
||||
<td class='code'>${name}</td>
|
||||
<td><input id="${name}_${id}" name="${name}" class="" minlength="0" placeholder="" type="text" value=""/></td>
|
||||
<td><input name="${name}" class="" minlength="0" placeholder="" type="text" value=""/></td>
|
||||
<td width='500'>${description}</td>
|
||||
</tr>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user