~ "Error Status Codes" -> "Response Messages"

+ "Response Model" column in OperationView template
+ Response Model in Response Messages
This commit is contained in:
FilippQoma
2014-04-29 19:20:31 +03:00
parent ca47551d93
commit 9cedc0b4d7
3 changed files with 14 additions and 1 deletions

View File

@@ -4,6 +4,17 @@ class StatusCodeView extends Backbone.View
render: ->
template = @template()
$(@el).html(template(@model))
if swaggerUi.api.models.hasOwnProperty @model.responseModel
responseModel =
sampleJSON: JSON.stringify(swaggerUi.api.models[@model.responseModel].createJSONSample(), null, 2)
isParam: false
signature: swaggerUi.api.models[@model.responseModel].getMockSignature()
responseModelView = new SignatureView({model: responseModel, tagName: 'div'})
$('.model-signature', @$el).append responseModelView.render().el
else
$('.model-signature', @$el).html ''
@
template: ->