Skip to main content

WP-00 API spec

Health, version, and the shared error envelope are in afia-api. See exchange/common.md.

Usage​

HealthController.health() returns liveness for the mobile client. AppVersionController.appVersion() returns force-update numbers. Feature packages read path constants from EndpointUri. They do not invent strings.

Domain​

No domain type. This package owns HTTP constants and the reserved envelope type.

  • EndpointUri at health.afia.app.common.EndpointUri (live)
  • ApiEnvelope at health.afia.app.common.ApiEnvelope (reserved until the first write endpoint)

Persistence​

None until first write. When WP-00 is asked to land persistence, set Postgres and Liquibase in application.properties. Set ddl-auto=none. No entity in this package.

HTTP DTOs​

Health and version today return a raw Map<String, String>. That stays until the first write lands. Then wrap writes in ApiEnvelope. JSON shape is exchange/envelope.md.

Mappers​

None. Health and version have no domain object.

Services​

None. Controllers read configuration or clocks only.

Controllers​

  • HealthController on EndpointUri.HEALTH. GET health().
  • AppVersionController on EndpointUri.APP_VERSION. GET appVersion().

Reserve constants on EndpointUri for every row in manifest/api-prefixes.tsv.

Does not do​

Identity, patient, clinician, diagnostics, or admin packages. Flutter types. Invented Stitch screens.