Skip to content

[BUG] API Dashboard 刷新后仍展示过期的 Request Body #1446

Description

@slankka

Bug Description

API Dashboard 会持久化用户编辑过的请求 Body,并在重新扫描接口后优先加载该缓存。当请求 DTO 新增字段时,Dashboard 仍显示旧 Body,新增字段不会出现;重启 IDEA、Maven Reload 和刷新 Dashboard 均无法解决。
例如 AddToolRequestDTO 新增 scope: ToolScopeEnum 后,源码模型已正确识别该字段,但 Dashboard 仍显示旧的参数。习惯上,一般会检查APi Dashboard来看是否生效,因此这从认知上会影响对EasyYapi推送效果的判断。

只有执行 Reset 清除请求缓存后才会显示 scope。
该问题会造成 Dashboard 展示及 Send 请求内容与最新源码不一致,同时 Dashboard 展示内容也可能与 Export/推送的数据不一致。建议刷新接口定义时,将新模型字段合并到已缓存的 Body,并保留用户已有的编辑值。

What were you doing when the bug occurred?

Export to Markdown

Framework(s) used in the project

  • Spring MVC (@RestController / @RequestMapping)
  • Spring Cloud Feign / OpenFeign clients
  • JAX-RS (@Path / @GET / @POST)
  • Spring Boot Actuator endpoints
  • gRPC / protobuf
  • Not sure

Steps to Reproduce

修改 AddToolRequestDTO,打开 API Dashboard,然后再添加一个字段 private ToolScopeEnum scope;

再打开 API Dashboard,点击刷新无用,不显示 scope。

Expected Behavior

{
  "toolType": "",
  "toolId": "",
  "scope": ""
}

Actual Behavior

{
  "toolType": "",
  "toolId": ""
}

Minimal reproduction (source code)

@Data
@Accessors(chain = true)
public class AddToolRequestDTO {
    private ToolTypeEnum toolType;
    private String toolId;
}


打开API Dashboard


  //Add this to DTO
    private ToolScopeEnum scope;

Custom rules & configuration

  • Project rules — <project>/.easyapi/*.rules (or *.properties)
  • Legacy config — .easy.api.config* in the project root or an ancestor directory
  • Global rules — ~/.easyapi/*.rules
  • Remote rules — configured in Settings → EasyYapi → Remote
  • None
  • Not sure

Logs

Plugin Version

3.2.3.252.0

IDE Version

IntelliJ IDEA 2025.3.6.1 Build #IU-253.33813.55

Operating System

macOS

JDK Version (optional)

21

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions