mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
Initial commit
This commit is contained in:
30
app/views/swagger_rails/swagger_ui/show.html.haml
Normal file
30
app/views/swagger_rails/swagger_ui/show.html.haml
Normal file
@@ -0,0 +1,30 @@
|
||||
#header
|
||||
.swagger-ui-wrap
|
||||
%a#logo{ href: 'http://swagger.io'} swagger
|
||||
%form#api_selector
|
||||
.input
|
||||
%input#input_baseUrl{ name: 'baseUrl' }
|
||||
.input
|
||||
%input#input_apiKey{ name: 'apiKey' }
|
||||
.input
|
||||
%a#input_apiKey{ name: 'apiKey' }
|
||||
|
||||
#message-bar.swagger-ui-wrap
|
||||
|
||||
#swagger-ui-container.swagger-ui-wrap{ data: { discovery_url: @discovery_url } }
|
||||
|
||||
:coffeescript
|
||||
window.swaggerUi = new SwaggerUi(
|
||||
url: $('#swagger-ui-container').data('discoveryUrl')
|
||||
dom_id: 'swagger-ui-container'
|
||||
onComplete: (swaggerApi, swaggerUi) ->
|
||||
log('Loaded SwaggerUi')
|
||||
$('pre code').each (i, e) ->
|
||||
hljs.highlighBlock(e)
|
||||
onFailure: (data) ->
|
||||
log('Unable to load Swagger UI')
|
||||
docExpansion: 'none'
|
||||
sorter: 'alpha'
|
||||
)
|
||||
|
||||
window.swaggerUi.load()
|
||||
Reference in New Issue
Block a user