Merge pull request #1806 from swagger-api/issue-1476
added success response per #1476
This commit is contained in:
23697
dist/swagger-ui.js
vendored
23697
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
13
dist/swagger-ui.min.js
vendored
13
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -168,6 +168,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
value = successResponse[key];
|
value = successResponse[key];
|
||||||
this.model.successCode = key;
|
this.model.successCode = key;
|
||||||
if (typeof value === 'object' && typeof value.createJSONSample === 'function') {
|
if (typeof value === 'object' && typeof value.createJSONSample === 'function') {
|
||||||
|
this.model.successDescription = value.description;
|
||||||
signatureModel = {
|
signatureModel = {
|
||||||
sampleJSON: JSON.stringify(value.createJSONSample(), void 0, 2),
|
sampleJSON: JSON.stringify(value.createJSONSample(), void 0, 2),
|
||||||
isParam: false,
|
isParam: false,
|
||||||
|
|||||||
@@ -42,9 +42,11 @@
|
|||||||
{{/oauth}}
|
{{/oauth}}
|
||||||
{{#if type}}
|
{{#if type}}
|
||||||
<h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> {{successCode}})</h4>
|
<h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> {{successCode}})</h4>
|
||||||
|
{{#if successDescription}}<div class="markdown">{{{successDescription}}}</div>{{/if}}
|
||||||
<p><span class="model-signature" /></p>
|
<p><span class="model-signature" /></p>
|
||||||
<br/>
|
<br/>
|
||||||
<div class="response-content-type" />
|
<div class="response-content-type" />
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<form accept-charset='UTF-8' class='sandbox'>
|
<form accept-charset='UTF-8' class='sandbox'>
|
||||||
<div style='margin:0;padding:0;display:inline'></div>
|
<div style='margin:0;padding:0;display:inline'></div>
|
||||||
@@ -78,7 +80,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="operation-status">
|
<tbody class="operation-status">
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
Reference in New Issue
Block a user