fix for #121
This commit is contained in:
@@ -30,10 +30,10 @@ class OperationView extends Backbone.View
|
||||
|
||||
# support old syntax
|
||||
if @model.supportedContentTypes
|
||||
contentTypeModel.consumes = @model.supportedContentTypes
|
||||
contentTypeModel.produces = @model.supportedContentTypes
|
||||
|
||||
if @model.consumes
|
||||
contentTypeModel.consumes = @model.consumes
|
||||
if @model.produces
|
||||
contentTypeModel.produces = @model.produces
|
||||
|
||||
contentTypeView = new ContentTypeView({model: contentTypeModel})
|
||||
$('.content-type', $(@el)).append contentTypeView.render().el
|
||||
|
||||
@@ -24,10 +24,10 @@ class ParameterView extends Backbone.View
|
||||
|
||||
# support old syntax
|
||||
if @model.supportedContentTypes
|
||||
contentTypeModel.consumes = @model.supportedContentTypes
|
||||
contentTypeModel.produces = @model.supportedContentTypes
|
||||
|
||||
if @model.consumes
|
||||
contentTypeModel.consumes = @model.consumes
|
||||
if @model.produces
|
||||
contentTypeModel.produces = @model.produces
|
||||
|
||||
contentTypeView = new ContentTypeView({model: contentTypeModel})
|
||||
$('.content-type', $(@el)).append contentTypeView.render().el
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
window.swaggerUi = new SwaggerUi({
|
||||
discoveryUrl:"http://petstore.swagger.wordnik.com/api/api-docs.json",
|
||||
discoveryUrl:"http://localhost:8002/api/api-docs.json",
|
||||
apiKey:"special-key",
|
||||
dom_id:"swagger-ui-container",
|
||||
supportHeaderParams: false,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<label for="contentType"></label>
|
||||
<select name="contentType">
|
||||
{{#if consumes}}
|
||||
{{#each consumes}}
|
||||
{{#if produces}}
|
||||
{{#each produces}}
|
||||
<option value="{{{this}}}">{{{this}}}</option>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
{{/if}}
|
||||
<form accept-charset='UTF-8' class='sandbox'>
|
||||
<div style='margin:0;padding:0;display:inline'></div>
|
||||
{{#if parameters}}
|
||||
<h4>Parameters</h4>
|
||||
<table class='fullwidth'>
|
||||
<thead>
|
||||
@@ -43,6 +44,7 @@
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
{{#if errorResponses}}
|
||||
<div style='margin:0;padding:0;display:inline'></div>
|
||||
<h4>Status Codes</h4>
|
||||
|
||||
Reference in New Issue
Block a user