Module lifecycle

Module lifecycle 

Source
Expand description

API lifecycle management (DW-110).

Three concerns that span the lifetime of an API surface the gateway fronts, all hand-rolled over existing substrates (no new dependencies):

  • portal – the developer portal: a read-only static HTML page auto-generated from the configured OpenAPI spec sources. It aggregates the existing OpenAPI specs (file paths or upstream /openapi.json endpoints) into a single listing of the APIs, their versions, and links to the specs. The portal is served at a configured reserved path (before route resolution, like /healthz).
  • profiles – environment profiles: dev/staging/prod config overlays. A ProfileOverlay carries a base config plus per-profile config patches; profiles::apply_profile merges the selected profile’s patch onto the base. The profile is selected via the DWARA_PROFILE env var.
  • journey – the API journey recorder: records the request flow through the gateway (route match, authn, authz, transforms, upstream pick, response) as a JSON document, stored via the existing analytics raw table. A Journey is a vec of JourneyStep (phase, duration, result, detail) keyed by request id.

§Feature gate

The api_lifecycle cargo feature must be enabled. Without it, the module is not compiled and the top-level lifecycle config block is accepted but inert (validation warns, mirroring the a2a/graphql pattern).

§Dependency direction

lifecycle depends on config (the config schema), observability (metrics), and analytics (the raw table the journey recorder stores into). It never imports dataplane – the dataplane calls into the journey recorder and the portal renderer, never the reverse (the same direction the ai domain holds).

Re-exports§

pub use journey::journey_dimension;
pub use journey::Journey;
pub use journey::JourneyConfig;
pub use journey::JourneyRecorder;
pub use journey::JourneyStep;
pub use journey::JourneyStepResult;
pub use portal::DevPortal;
pub use portal::DevPortalConfig;
pub use portal::DevPortalSpec;
pub use portal::DevPortalSpecSource;
pub use portal::LoadedSpec;
pub use profiles::apply_profile;
pub use profiles::AppliedProfile;
pub use profiles::EnvProfile;
pub use profiles::ProfileOverlay;

Modules§

journey
API journey recorder (DW-110): records the request flow through the gateway as a JSON document for debugging.
portal
Developer portal (DW-110): a read-only static HTML page auto-generated from the configured OpenAPI spec sources.
profiles
Environment profiles (DW-110): dev/staging/prod config overlays.