Engineering · Updated

One API contract, several clients

Shared API definitions can make changes visible across client languages. Separate generator tests, declared consumer targets and real application compatibility before calling a change ready.

Founder-led byMark KorotinFounder & CEO, CMDOP
onemark.cc

When a backend serves several applications, changing one response field can turn into a surprising amount of coordination. The browser client, a command-line tool and a separate service may all need to understand the new shape of the same data.

At CMDOP, one approach we use to manage this is Django CFG, a shared engineering framework we have developed across our projects.

Make the contract an input to development

Rather than maintain every client definition by hand, our framework work has included typed, multi-target client generation. In a November 2026 source review of CMDOP Web, the backend configuration declared generated client targets for TypeScript, Rust and Python. This gives us a concrete example of why the framework matters beyond a single application.

The idea is to put the API description upstream of the generated client types. A change to the contract becomes a change that developers can inspect in the resulting client definitions, rather than a separate set of edits to remember for each language.

Generation is not compatibility testing

Consider an illustrative API response with a required name field. If it becomes optional, a regenerated client can make that difference visible in its types. But the application may still assume that a name is always present, or an older client may still depend on the previous response.

We distinguish the generator's own tests, the consumer's source configuration and the behavior of an actual running application. Our retained framework records describe implementation and testing of typed generation. The consumer source review establishes that the targets are declared. Neither establishes that every generated client has been tested against a running service.

A practical rule for AI-assisted changes

When changing a shared API, ask the developer or AI assistant to identify its consumers, revise the canonical contract, regenerate the affected client definitions and review the resulting differences. Check the affected consumers and test the actual response, including an older client if compatibility is a requirement.

Keep the generator result and the application acceptance result separate. Generated code can help reveal drift, but it cannot decide whether a change is safe to release.