Merge pull request #95 from pose/json-response-pretty-print
Adding JSON sample UI to response
This commit is contained in:
@@ -14,6 +14,18 @@ class OperationView extends Backbone.View
|
||||
|
||||
$(@el).html(Handlebars.templates.operation(@model))
|
||||
|
||||
if @model.responseClassSignature and @model.responseClassSignature != 'string'
|
||||
signatureModel =
|
||||
sampleJSON: @model.responseSampleJSON
|
||||
isParam: false
|
||||
signature: @model.responseClassSignature
|
||||
|
||||
responseSignatureView = new SignatureView({model: signatureModel, tagName: 'div'})
|
||||
$('.model-signature', $(@el)).append responseSignatureView.render().el
|
||||
else
|
||||
$('.model-signature', $(@el)).html(@model.responseClass)
|
||||
|
||||
|
||||
# Render each parameter
|
||||
@addParameter param for param in @model.parameters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user