File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
modules/swagger-codegen/src/main/resources Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 171
171
<div class="param-enum-header">Enum:</div>
172
172
{{#_enum}}<div class="param-enum">{{this}}</div>{{/_enum}}
173
173
{{/isEnum}}
174
+ {{#example}}
175
+ <div class="param-desc"><span class="param-type">example: {{example}}</span></div>
176
+ {{/example}}
174
177
{{/vars}}
175
178
</div> <!-- field-items -->
176
179
</div>
Original file line number Diff line number Diff line change @@ -225,6 +225,12 @@ var JSONSchemaView = (function () {
225
225
return this.element;
226
226
}
227
227
228
+ if (this.schema && this.schema.example) {
229
+ var exampleDiv = document.createElement(' div' );
230
+ exampleDiv.innerHTML = ' <div style="display: block" class="example">\n <span style="color: #808080" class="name">example: ' + this.schema.example + ' </span>\n </div>' ;
231
+ this.element.appendChild(exampleDiv.querySelector(' .example' ));
232
+ }
233
+
228
234
if (! this.isCollapsed) {
229
235
this.appendChildren(this.element);
230
236
}
You can’t perform that action at this time.
0 commit comments