Description
Define how money-like values are represented in API responses (string vs integer minor units), including rounding rules, and enforce it consistently across endpoints to prevent client-side ambiguity.
Requirements and context
- Must be tested and documented.
- Must include a migration note if changing any existing field format.
Suggested execution
git checkout -b chore/api-money-format
Implement changes
- Add shared formatter and update response models.
- Tests asserting formatting for representative endpoints.
- Update OpenAPI schemas and docs.
Test and commit
Example commit message
docs(api): standardize money field formats across responses
Guidelines
Description
Define how money-like values are represented in API responses (string vs integer minor units), including rounding rules, and enforce it consistently across endpoints to prevent client-side ambiguity.
Requirements and context
Suggested execution
Implement changes
Test and commit
npm testExample commit message
Guidelines