|
@@ -99,6 +99,10 @@ class SwaggerDoc {
|
|
let res = '';
|
|
let res = '';
|
|
const indent = ' *' + this.repeatStr('\t', level + 1);
|
|
const indent = ' *' + this.repeatStr('\t', level + 1);
|
|
res += indent + `type: ${schema.type}\n`;
|
|
res += indent + `type: ${schema.type}\n`;
|
|
|
|
+ if (schema.description)
|
|
|
|
+ res += indent + `description: ${schema.description}\n`;
|
|
|
|
+ if (schema.example)
|
|
|
|
+ res += indent + `example: ${schema.example}\n`;
|
|
if (schema.items && schema.items.length > 0) {
|
|
if (schema.items && schema.items.length > 0) {
|
|
res += indent + 'items:\n';
|
|
res += indent + 'items:\n';
|
|
for (const item of schema.items) {
|
|
for (const item of schema.items) {
|