Skip to content

Commit f889475

Browse files
author
xuqiu
committed
对swagger内容读取后格式化
1 parent 65ad0ef commit f889475

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/redsoft/idea/plugin/yapiv2/support/swagger/YApiSwaggerSupport.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void handleMethod(PsiMethod psiMethod, @NonNls YApiParam apiDTO) {
2727
String title = PsiAnnotationUtils
2828
.getPsiParameterAnnotationValue(psiMethod, SwaggerConstants.API_OPERATION);
2929
if (Strings.isNotBlank(title)) {
30-
apiDTO.setTitle(title);
30+
apiDTO.setTitle(title.replace("\"", ""));
3131
}
3232

3333
}
@@ -37,7 +37,7 @@ public void handleParam(@NonNls ValueWrapper wrapper) {
3737
String desc = PsiAnnotationUtils
3838
.getPsiParameterAnnotationValue(wrapper.getSource(), SwaggerConstants.API_PARAM);
3939
if (Strings.isNotBlank(desc)) {
40-
wrapper.setDesc(desc);
40+
wrapper.setDesc(desc.replace("\"", ""));
4141
}
4242
}
4343

@@ -47,7 +47,7 @@ public void handleField(@NonNls ValueWrapper wrapper) {
4747
.getPsiParameterAnnotationValue(wrapper.getSource(),
4848
SwaggerConstants.API_MODEL_PROPERTY);
4949
if (Strings.isNotBlank(desc)) {
50-
wrapper.setDesc(desc);
50+
wrapper.setDesc(desc.replace("\"", ""));
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)