added array check for #899
This commit is contained in:
@@ -16,6 +16,9 @@ class SwaggerUi extends Backbone.Router
|
|||||||
@dom_id = options.dom_id
|
@dom_id = options.dom_id
|
||||||
delete options.dom_id
|
delete options.dom_id
|
||||||
|
|
||||||
|
if not options.supportedSubmitMethods?
|
||||||
|
options.supportedSubmitMethods = ['get','put','post','delete','head','options','patch']
|
||||||
|
|
||||||
# Create an empty div which contains the dom_id
|
# Create an empty div which contains the dom_id
|
||||||
$('body').append('<div id="' + @dom_id + '"></div>') if not $('#' + @dom_id)?
|
$('body').append('<div id="' + @dom_id + '"></div>') if not $('#' + @dom_id)?
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class OperationView extends Backbone.View
|
|||||||
$(e.currentTarget.parentNode).find('#api_information_panel').hide()
|
$(e.currentTarget.parentNode).find('#api_information_panel').hide()
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
isMethodSubmissionSupported = true #jQuery.inArray(@model.method, @model.supportedSubmitMethods) >= 0
|
isMethodSubmissionSupported = jQuery.inArray(@model.method, @model.supportedSubmitMethods()) >= 0
|
||||||
@model.isReadOnly = true unless isMethodSubmissionSupported
|
@model.isReadOnly = true unless isMethodSubmissionSupported
|
||||||
|
|
||||||
# 1.2 syntax for description was `notes`
|
# 1.2 syntax for description was `notes`
|
||||||
|
|||||||
Reference in New Issue
Block a user