BaryoDev / BaryoDev/barakoCMS

Nothing notices when the generated client stops matching the API

Open
#187 0 comments 0 reactions 1 assignee Claimed by @arnelirobles View on GitHub
enhancement
Dominant language
C#
Stars
6
Forks
7
Avg merge
4h 42m
Merged PRs (30d)
307

Description

**Blocked by #183.**

## Why

A generated client is only as current as the last time somebody ran the generator. Left to a person, that stops happening, and the client drifts from the API exactly the way the hand-written one did: `@baryodev/barako-client` is at 0.3.0 against roughly 98 operations.

## What it does

Regenerate from a live instance and **fail when the checked-in output differs**. Not regenerate-and-commit: a silent auto-commit means a breaking client change lands without anyone reading it.

Runs on API changes and on a schedule. The schedule matters because a client can go stale without any commit to this repo: a module changing its own endpoints does it.

## The awkward part, stated up front

Generation needs a **running instance with a database**, because the OpenAPI document is served by the app, not built from source. So the job is: start Postgres, start the Suite with `Swagger__Enabled=true`, fetch the document, generate, diff.

That is heavier than a normal CI job and it is the reason this must not be a developer's manual step.

## Also worth failing on

- **any operation tagged `Api`**, which is the guard from #181. If it lives anywhere, it lives here too, because this is the job that would otherwise happily generate a one-class client
- **the tag set changing unexpectedly**, since tags become slices and a namespace rename silently renames a consumer's method group

Design: `docs/2026-08-18-client-layer-design.md`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.