Skip to content

Commit

Permalink
!102 SwaggerModels的$ref类型title属性不显示问题
Browse files Browse the repository at this point in the history
Merge pull request !102 from SnailRider/dev
  • Loading branch information
xiaoymin authored and gitee-org committed Jan 12, 2024
2 parents 030ad00 + 1567568 commit 5068322
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions knife4j-vue/src/core/Knife4jAsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -2508,6 +2508,16 @@ function deepSwaggerModelsTreeTableRefParameter(parentRefp, definitions, deepDef
//description = description + '可用值:' + p.enum.join(',');
description = description + KUtils.enumAvalibleLabel(that.i18nInstance, p.enum);
}

//增加title属性的支持
if (KUtils.checkUndefined(p.title)) {
if (KUtils.checkUndefined(description) && description != "") {
description = p.title + ":" + description;
} else {
description = p.title;
}
}

refp.description = KUtils.replaceMultipLineStr(description);
// KUtils.validateJSR303(refp, p);
// models添加所有属性
Expand Down

0 comments on commit 5068322

Please sign in to comment.