merged from develop, #824
This commit is contained in:
@@ -87,6 +87,7 @@ class SwaggerUi extends Backbone.Router
|
||||
switch @options.docExpansion
|
||||
when "full" then @expandAll()
|
||||
when "list" then @listAll()
|
||||
@renderGFM()
|
||||
@options.onComplete(@api, @) if @options.onComplete
|
||||
setTimeout(
|
||||
=>
|
||||
@@ -125,4 +126,9 @@ class SwaggerUi extends Backbone.Router
|
||||
@options.onFailure(data) if @options.onFailure?
|
||||
val
|
||||
|
||||
# Renders GFM for elements with 'markdown' class
|
||||
renderGFM: (data = '') ->
|
||||
$('.markdown').each (index) ->
|
||||
$(this).html(marked($(this).html()))
|
||||
|
||||
window.SwaggerUi = SwaggerUi
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Swagger UI</title>
|
||||
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
|
||||
<link href='//fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/typography.css' media='print' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/screen.css' media='print' rel='stylesheet' type='text/css'/>
|
||||
<script type="text/javascript" src="lib/shred.bundle.js"></script>
|
||||
@@ -16,10 +15,10 @@
|
||||
<script src='lib/handlebars-1.0.0.js' type='text/javascript'></script>
|
||||
<script src='lib/underscore-min.js' type='text/javascript'></script>
|
||||
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
||||
<script src='lib/swagger.js' type='text/javascript'></script>
|
||||
<script src='lib/swagger-client.js' type='text/javascript'></script>
|
||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
||||
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
||||
<script src='lib/marked.js' type='text/javascript'></script>
|
||||
|
||||
<!-- enabling this will enable oauth2 implicit scope support -->
|
||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class='info' id='api_info'>
|
||||
{{#if info}}
|
||||
<div class="info_title">{{info.title}}</div>
|
||||
<div class="info_description">{{{info.description}}}</div>
|
||||
<div class="info_description markdown">{{{info.description}}}</div>
|
||||
{{#if info.termsOfServiceUrl}}<div class="info_tos"><a href="{{info.termsOfServiceUrl}}">Terms of service</a></div>{{/if}}
|
||||
{{#if info.contact}}<div class='info_contact'><a href="mailto:{{info.contact.name}}">Contact the developer</a></div>{{/if}}
|
||||
{{#if info.license}}<div class='info_license'><a href='{{info.license.url}}'>{{info.license.name}}</a></div>{{/if}}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
{{/if}}
|
||||
{{#if description}}
|
||||
<h4>Implementation Notes</h4>
|
||||
<p>{{{description}}}</p>
|
||||
<p class="markdown">{{{description}}}</p>
|
||||
{{/if}}
|
||||
{{#oauth}}
|
||||
<div class="auth">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{{/if}}
|
||||
|
||||
</td>
|
||||
<td>{{{description}}}</td>
|
||||
<td class="markdown">{{{description}}}</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td>
|
||||
<span class="model-signature"></span>
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
{{/each}}
|
||||
</select>
|
||||
</td>
|
||||
<td>{{{description}}}</td>
|
||||
<td class="markdown">{{{description}}}</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td><span class="model-signature"></span></td>
|
||||
@@ -10,6 +10,6 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>{{{description}}}</td>
|
||||
<td class="markdown">{{{description}}}</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td><span class="model-signature"></span></td>
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>{{{description}}}</td>
|
||||
<td class="markdown">{{{description}}}</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td><span class="model-signature"></span></td>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{{description}}}</strong>
|
||||
<strong><span class="markdown">{{{description}}}</span></strong>
|
||||
</td>
|
||||
<td>{{{paramType}}}</td>
|
||||
<td><span class="model-signature"></span></td>
|
||||
|
||||
Reference in New Issue
Block a user