Add option "showOperationIds"
This commit is contained in:
@@ -74,7 +74,8 @@
|
||||
docExpansion: "none",
|
||||
jsonEditor: false,
|
||||
defaultModelRendering: 'schema',
|
||||
showRequestHeaders: false
|
||||
showRequestHeaders: false,
|
||||
showOperationIds: false
|
||||
});
|
||||
|
||||
window.swaggerUi.load();
|
||||
|
||||
@@ -27,6 +27,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
if (opts.swaggerOptions.showRequestHeaders) {
|
||||
this.model.showRequestHeaders = true;
|
||||
}
|
||||
|
||||
if (opts.swaggerOptions.showOperationIds) {
|
||||
this.model.showOperationIds = true;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
@@ -708,6 +708,11 @@
|
||||
padding: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
.nickname {
|
||||
color: #aaaaaa;
|
||||
padding: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
</span>
|
||||
</h3>
|
||||
<ul class='options'>
|
||||
{{#if showOperationIds}}
|
||||
<li>
|
||||
<a href='#!/{{sanitize encodedParentId}}/{{sanitize nickname}}' class="toggleOperation"><span class="nickname">{{{escape nickname}}}()</span></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
<li>
|
||||
<a href='#!/{{sanitize encodedParentId}}/{{sanitize nickname}}' class="toggleOperation"><span class="markdown">{{{escape summary}}}</span></a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user