We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
springboot3构建的项目,通过.easy.api.config文件自定义param.doc属性的自定义备注
param.doc=groovy:``` if(!it.type().isExtend("cn.xxx.project.common.model.enums.ValueEnum")){ return } try { def enumResolver = runtime.getBean("com.itangcent.intellij.jvm.standard.StandardPsiResolver") def docStr = "----------" + """\n""" // 填写字典编码 获取字段的Class上的doc的 @dictName def fieldClassDocDictName = it.type().doc("dictName") def fieldClassDoc = it.type().doc() def docDictName = fieldClassDocDictName != null ? fieldClassDocDictName : fieldClassDoc if(docDictName != null && docDictName != "" ){ docStr = docStr + "字典名:" + docDictName + """\n""" } // 填写字典编码 获取字段的Class上的doc的 @dictCode def fieldClassDocDictCode = it.type().doc("dictCode") if(fieldClassDocDictCode != null){ docStr = docStr + "字典编码:" + fieldClassDocDictCode + """\n""" } docStr = docStr + "枚举属性:" + """\n""" def fieldClassEnumFields = it.type().fields() fieldClassEnumFields.collect { item -> //logger.info("item name "+ item.name()) def itemResource = item.getResource() //logger.info("itemResource.class.name "+itemResource.class.name) if(itemResource.class.name.contains("Enum")){ //logger.info("item getResource "+ itemResource) //logger.info("itemgetResource :"+ enumResolver.resolveEnumFields(0, item.getResource())) def enumItemValues = enumResolver.resolveEnumFields(0, item.getResource()) docStr = docStr + "【"+enumItemValues["params"]["code"] + "=" + enumItemValues["params"]["text"] + "】" + """\n""" } } return docStr } finally { localStorage.remove("__reentrant") }
导出的结果如图:
TIKTOK :TIKTOK DIANPING :DIANPING KWAI :KWAI
The text was updated successfully, but these errors were encountered:
没有这样的规则,现在可以试试强行修改请求内容。
http.call.before=groovy:``` def body = request.body() if(!request.url().contains("api/interface/save") || body==null){ return } def json = tool.toJson(body) //logger.info("body: $json") def cleanedJson = regex.delAll(/,[\\"]*enumDesc[\\"]*:[\\"]*.*?"\\*/,json) //logger.info("cleanedJson: $cleanedJson") request.body(cleanedJson) ```
Sorry, something went wrong.
No branches or pull requests
springboot3构建的项目,通过.easy.api.config文件自定义param.doc属性的自定义备注
导出的结果如图:
如何才能忽略下方自动凭接的内容呢?
TIKTOK :TIKTOK
DIANPING :DIANPING
KWAI :KWAI
The text was updated successfully, but these errors were encountered: