What problem does it solve?
REST API responses often suffer from subtle design defects: Java generic overload ambiguity sends data into the wrong field, business errors get thrown as framework exceptions and surface as HTTP 500, and generated Excel/CSV/PDF artifacts silently succeed while missing fields that downstream consumers (WeChat import, reconciliation systems, third-party APIs) will reject. This Skill provides checklists and patterns to catch these defects before they reach production.
Core Features & Use Cases
- Response Structure Safety: Prevents generic method overload ambiguity, clarifies message vs data field semantics, and standardizes null/empty handling across endpoints.
- Status Code & Exception Discipline: Separates HTTP transport codes from business codes, and enforces using BusinessException instead of IllegalArgumentException so business errors return 200 + code 4xx instead of 500.
- Downstream Artifact Validation: Enforces pre-generation completeness checks for Excel/CSV/PDF exports and batch pushes, listing missing business IDs and failing fast instead of silently emitting empty values.
- Use Case: When building a WeChat mini-program shipping template export, the Skill guides you to validate mchId, transactionId, and shipping company fields upfront, throwing business errors with specific order numbers rather than generating a file WeChat will reject.
Quick Start
Ask the AI to review your REST API endpoint or export function against the api-design-safety rules before committing the code.