Skip to content

Backend: Add consistent numeric formatting rules in API responses (money fields) #222

@greatest0fallt1me

Description

@greatest0fallt1me

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

npm test

Example commit message

docs(api): standardize money field formats across responses

Guidelines

  • Timeframe: 96 hours.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiHTTP API and routingbackendBackend service/API workdocumentationDocs and OpenAPIqualityCode quality improvementstestingTests and coverage

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions