Skip to content

Emtemf/api-codegen REV-2026-008: Preserve ValidationFixer metadata and parameter binding #19

Description

@Emtemf

finding_id: REV-2026-008
priority: P1
area: core
kind: bug
paths:

  • api-codegen-core/src/main/java/com/apicgen/validator/ValidationFixer.java
  • api-codegen-core/src/main/java/com/apicgen/model/Api.java
  • api-codegen-core/src/main/java/com/apicgen/model/FieldDefinition.java
    blocked_by:
  • REV-2026-005 (问题反馈 #5)
    automation: needs-design

Summary

Preserve ValidationFixer metadata and parameter binding during auto-fix round trips.

Evidence

Global review finding REV-2026-008 identified that auto-fix can lose API/class/method annotations, framework metadata, FieldDefinition.in, and path/query/header/body binding information.

Impact

Applying a validation fix can silently change generated API semantics, annotations, and request parameter placement across CLI, UI, and Maven flows.

Scope

Make fixer transformations metadata-preserving, retain parameter binding, and add round-trip tests through all three repair entry points.

Out of scope

Document-format preservation and path normalization beyond the dependency tracked by REV-2026-005.

Acceptance criteria

  • 保留 API/class/method annotations 和 framework
  • 保留 FieldDefinition.in 以及 path/query/header/body 绑定
  • auto-fix 前后 metadata round-trip 一致
  • UI、CLI、Maven 三条修复路径均有测试

Verification

Compare model metadata and generated behavior before and after auto-fix using CLI, UI bridge, and Maven fixtures; assert annotations, framework, and binding values are identical.

Rollback

Revert fixer/model changes while retaining metadata round-trip fixtures and keeping this issue blocked for redesign.

Dependencies

Blocked by REV-2026-005 (#5). Do not add automation:ready until the dependency is completed and design review is complete.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions