updated to latest swagger-js

This commit is contained in:
Tony Tam
2013-07-08 18:38:11 -07:00
parent 22e5f5ccc1
commit 8f7e8f9ee0
10 changed files with 159 additions and 129 deletions

View File

@@ -35,14 +35,13 @@ class SwaggerUi extends Backbone.Router
# Event handler for when url/key is received from user
updateSwaggerUi: (data) ->
@options.discoveryUrl = data.discoveryUrl
@options.apiKey = data.apiKey
@load()
# Create an api and render
load: ->
# Initialize the API object
@mainView?.clear()
@headerView.update(@options.discoveryUrl, @options.apiKey)
@headerView.update(@options.discoveryUrl)
@api = new SwaggerApi(@options)
# This is bound to success handler for SwaggerApi