Skip to content

Commit

Permalink
!101 只有title属性没有description属性时的参数说明去除结尾冒号
Browse files Browse the repository at this point in the history
Merge pull request !101 from WheyC/dev
  • Loading branch information
xiaoymin authored and gitee-org committed Jan 7, 2024
2 parents a4c323e + 0944ccc commit 288b4ba
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions knife4j-vue/src/core/Knife4jAsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,11 @@ SwaggerBootstrapUi.prototype.analysisDefinitionAsyncOAS3 = function (menu, swud,
}
//增加title的属性支持
if (KUtils.checkUndefined(propobj.title)) {
spropObj.description = propobj.title + ":" + spropObj.description;
if(KUtils.checkUndefined(spropObj.description) && spropObj.description!=""){
spropObj.description = propobj.title + ":" + spropObj.description;
}else {
spropObj.description = propobj.title;
}
}
spropObj.value = propValue;
// 判断是否有format,如果是integer,判断是64位还是32位
Expand Down Expand Up @@ -2200,7 +2204,11 @@ SwaggerBootstrapUi.prototype.analysisDefinitionRefTableModel = function (instanc
refp.description = KUtils.replaceMultipLineStr(description);
//增加title的属性支持
if (KUtils.checkUndefined(p.title)) {
refp.description = p.title + ":" + refp.description;
if(KUtils.checkUndefined(refp.description) && refp.description!=""){
refp.description = p.title + ":" + refp.description;
}else {
refp.description = p.title;
}
}
that.validateJSR303(refp, p);
// models添加所有属性
Expand Down Expand Up @@ -6059,7 +6067,11 @@ SwaggerBootstrapUi.prototype.assembleParameterOAS3 = function (m, swpinfo, requi
}
//增加title的属性支持
if (KUtils.checkUndefined(m.title)) {
minfo.description = m.title + ":" + minfo.description;
if(KUtils.checkUndefined(minfo.description) && minfo.description!=""){
minfo.description = m.title + ":" + minfo.description;
}else {
minfo.description = m.title;
}
}
if (minfo.in == 'body') {
if (isUndefined(minfo.txtValue) || isNull(minfo.txtValue)) {
Expand Down

0 comments on commit 288b4ba

Please sign in to comment.