Skip to content

tool-maven-plugin插件解析runnables兼容Fitable、Genericable中的id属性 #286

@mrdaios

Description

@mrdaios

问题摘要 / Issue Summary

tool-maven-plugin编译后runnables中的FIT节点genericableId为空

版本信息 / Version Information

其他 (请在下方说明) / Other (please specify below)

浏览器 / Browser

Chrome

操作系统 / Operating System

macOS (Intel)

发生了什么?/ What happened?

tool-maven-plugin编译后runnables中的FIT节点genericableId、fitableId出现为空的情况

期望的行为 / Expected Behavior

@Genericable("xxx.http.call")和@Genericable(id="xxx.http.call") 生成的tools.json格式一样

重现步骤 / Steps to Reproduce

使用@Genericable(id="xxx.http.call"),查看生成的tools.json

相关日志 / Relevant Logs

额外信息 / Additional Context

private static Map<String, Object> parserRunnables(MethodDescription defMethodDescription,
MethodDescription toolMethodDescription) {
AnnotationDescription.Loadable<Genericable> genericableAnnotation =
defMethodDescription.getDeclaredAnnotations().ofType(Genericable.class);
notNull(genericableAnnotation, "The definition method must contain genericable.");
AnnotationDescription.Loadable<Fitable> fitableAnnotation =
toolMethodDescription.getDeclaredAnnotations().ofType(Fitable.class);
notNull(fitableAnnotation, "The tool method must contain fitable.");
Map<String, String> fit = new LinkedHashMap<>();
fit.put(GENERICABLE_ID, genericableAnnotation.load().value());
fit.put(FITABLE_ID, fitableAnnotation.load().value());
return cast(Collections.singletonMap(FIT, fit));

需要兼容Genericable的id属性

确认事项 / Confirmations

  • 我已经搜索了现有的issues,确认这不是重复问题
    I have searched existing issues and confirmed this is not a duplicate

  • 我已经阅读了项目文档和 FAQ
    I have read the project documentation and FAQ

  • 我提供的信息准确完整
    The information I provided is accurate and complete

  • 我愿意协助测试问题修复 (可选)
    I'm willing to help test the bug fix (optional)

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions