Skip to content

Commit

Permalink
对swagger内容读取后格式化
Browse files Browse the repository at this point in the history
  • Loading branch information
xuqiu committed Aug 26, 2021
1 parent 65ad0ef commit f889475
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void handleMethod(PsiMethod psiMethod, @NonNls YApiParam apiDTO) {
String title = PsiAnnotationUtils
.getPsiParameterAnnotationValue(psiMethod, SwaggerConstants.API_OPERATION);
if (Strings.isNotBlank(title)) {
apiDTO.setTitle(title);
apiDTO.setTitle(title.replace("\"", ""));
}

}
Expand All @@ -37,7 +37,7 @@ public void handleParam(@NonNls ValueWrapper wrapper) {
String desc = PsiAnnotationUtils
.getPsiParameterAnnotationValue(wrapper.getSource(), SwaggerConstants.API_PARAM);
if (Strings.isNotBlank(desc)) {
wrapper.setDesc(desc);
wrapper.setDesc(desc.replace("\"", ""));
}
}

Expand All @@ -47,7 +47,7 @@ public void handleField(@NonNls ValueWrapper wrapper) {
.getPsiParameterAnnotationValue(wrapper.getSource(),
SwaggerConstants.API_MODEL_PROPERTY);
if (Strings.isNotBlank(desc)) {
wrapper.setDesc(desc);
wrapper.setDesc(desc.replace("\"", ""));
}
}
}

0 comments on commit f889475

Please sign in to comment.