~ "Error Status Codes" -> "Response Messages"
+ "Response Model" column in OperationView template + Response Model in Response Messages
This commit is contained in:
@@ -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: ->
|
||||
|
||||
@@ -64,12 +64,13 @@
|
||||
{{/if}}
|
||||
{{#if responseMessages}}
|
||||
<div style='margin:0;padding:0;display:inline'></div>
|
||||
<h4>Error Status Codes</h4>
|
||||
<h4>Response Messages</h4>
|
||||
<table class='fullwidth'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>HTTP Status Code</th>
|
||||
<th>Reason</th>
|
||||
<th>Response Model</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="operation-status">
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
<td width='15%' class='code'>{{code}}</td>
|
||||
<td>{{{message}}}</td>
|
||||
<td width='50%'><span class="model-signature" /></td>
|
||||
Reference in New Issue
Block a user