implement option to control whether models are displayed as valid JSON schema or the docs rendering (with descriptions) by default

This commit is contained in:
Sean Kennedy
2015-11-20 15:11:15 -05:00
parent 1dc7894365
commit 1ccab589f8
7 changed files with 28 additions and 8 deletions

View File

@@ -14,6 +14,7 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({
sampleJSON: JSON.stringify(this.router.api.models[this.model.responseModel].createJSONSample(), null, 2),
isParam: false,
signature: this.router.api.models[this.model.responseModel].getMockSignature(),
defaultRendering: this.model.defaultRendering
};
var responseModelView = new SwaggerUi.Views.SignatureView({model: responseModel, tagName: 'div'});