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

@@ -15,8 +15,12 @@ SwaggerUi.Views.SignatureView = Backbone.View.extend({
$(this.el).html(Handlebars.templates.signature(this.model));
this.switchToSnippet();
if (this.model.defaultRendering === 'model') {
this.switchToDescription();
} else {
this.switchToSnippet();
}
this.isParam = this.model.isParam;
if (this.isParam) {