Skip to content

Emtemf/api-codegen REV-2026-009: Fix OpenAPI requestBody and CXF parameter binding generation #20

Description

@Emtemf

finding_id: REV-2026-009
priority: P1
area: generator
kind: bug
paths:


Summary

Fix OpenAPI requestBody conversion and Spring/CXF parameter-binding generation.

Evidence

Global review finding REV-2026-009 identified incorrect request-body conversion and incomplete CXF binding generation, including missing or incorrect media-type and validation imports.

Impact

Generated Spring and CXF sources can expose the wrong method signature, bind request data incorrectly, or fail compilation, causing runtime API incompatibility and broken builds.

Scope

Convert one JSON request body to one request DTO, prevent multiple Spring @RequestBody parameters, generate correct CXF binding annotations, preserve media types and validation imports, and add compilable source fixtures.

Out of scope

Output path containment and fixer metadata preservation, which are tracked by the blocking issues above.

Acceptance criteria

  • 一个 JSON requestBody 生成一个 Request DTO 参数
  • Spring 不生成多个 @RequestBody
  • CXF 正确生成 BeanParam/PathParam/QueryParam/HeaderParam/CookieParam
  • MediaType 和 validation imports 完整
  • 生成 Spring/CXF 源码可编译

Verification

Generate Spring and CXF sources from OpenAPI fixtures with request bodies and every supported binding; compile the generated sources and inspect annotations/imports.

Rollback

Revert converter and generator changes while retaining compilation fixtures and leaving automation blocked pending dependency completion.

Dependencies

Blocked by REV-2026-004 (#15) and REV-2026-008 (#19). Do not add automation:ready until both dependencies are 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