Skip to content

Generated client libraries - #2

Closed
daberni wants to merge 3 commits into
mainfrom
api-1.0-generated-client-libraries
Closed

daberni wants to merge 3 commits into
mainfrom
api-1.0-generated-client-libraries

Conversation

@daberni

@daberni daberni commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Stacked on #1 — review that one first.

The client SDKs generated from spec/openapi.yaml, so an integrator does not have to generate them to start: Java, Kotlin, TypeScript (fetch), Python, C# and Swift.

How they are produced

Generation is driven from the specification by OpenAPI Generator, with an overlay of its own (sdk/overlay.yaml) for what the generators need but the contract should not state. The generated sources are committed rather than built on demand, so a reader can see exactly what a client looks like, and a regeneration shows up as a reviewable diff instead of a silent change.

Publishing is not wired up yet

Deliberately. The artifact names are not settled, so nothing here publishes on its own:

  • sdk.yml builds and verifies the SDKs on pull requests and on main.
  • publish-snapshot.yml and release.yml are workflow_dispatch only — they never fire from a push or a merge.

The registry addresses are repository variables rather than literals in the workflows, so nothing in this repository names an internal host. Those variables and the Snapshot / Release environments still have to be created before either workflow can run.

Open before the first publish

  • The artifact coordinates for each language.
  • Whether the JVM clients go to Maven Central; while they only publish to the internal registry, external integrators cannot consume the Java and Kotlin SDKs.

🤖 Generated with Claude Code

@daberni
daberni force-pushed the api-1.0-specification-and-documentation branch 2 times, most recently from d91bf7c to 285cd29 Compare August 17, 2026 14:00

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc2372f8d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

StringBuilder sb = new StringBuilder();
sb.Append("class User {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Firstname: ").Append(Firstname).Append("\n");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Respect the log allow-list in every generated SDK

When a User is logged in the C# SDK, this ToString() emits names, email, employee number, login, metadata, and other fields that are not approved by x-log; the generated Kotlin data-class toString() and Python to_str() have the same problem. This defeats the repository's explicit allow-list and can put personal data into application logs, so the non-Java generators need equivalent filtered string-generation templates.

AGENTS.md reference: AGENTS.md:L37-L39

Useful? React with 👍 / 👎.

Comment thread sdk/dotnet/build.gradle Resolved
Comment thread .github/workflows/sdk.yml
Comment on lines +33 to +35
- name: Verify generated sources are committed
run: |
git diff --exit-code || (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include untracked generated files in the drift check

Plain git diff --exit-code ignores untracked files, so when a specification change generates a new API or model file without modifying an existing tracked file, this verification step succeeds even though that generated source was never committed. Check the porcelain status or otherwise include untracked output so CI enforces the documented no-drift invariant.

AGENTS.md reference: AGENTS.md:L56-L58

Useful? React with 👍 / 👎.

@daberni
daberni force-pushed the api-1.0-generated-client-libraries branch 2 times, most recently from 972402f to 2b32338 Compare August 17, 2026 15:29
@daberni
daberni changed the base branch from api-1.0-specification-and-documentation to main August 17, 2026 15:47
daberni and others added 3 commits September 4, 2026 21:34
Three numbers move at different rates: the path version marks compatibility,
the specification version names the published contract, and each SDK has a
version of its own. VERSIONING.md states this for readers; docs/ records how
the two repositories arrange it — the service leads on the contract including
its version, this repository on publication — and what is still to build.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A client library for Java, Kotlin, Python, TypeScript, Swift and C#, generated from the specification and committed, so each one stays in step with the contract and carries the version it was built from.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Seven versions in one file are seven chances to mistype one. The script bumps
the whole set for a specification update and named clients for a fix of their
own, resolves every name before it writes so a typo cannot half apply a bump,
and leaves the comments and order of the file alone.

A major bump stays a hand edit: it says a client breaks its callers, which is
not a thing to reach for by passing a different word to a script.
@daberni
daberni force-pushed the api-1.0-generated-client-libraries branch from 80aef86 to 6ccc76e Compare September 4, 2026 20:32
@daberni daberni self-assigned this Sep 7, 2026
@daberni daberni closed this Sep 11, 2026
@daberni
daberni deleted the api-1.0-generated-client-libraries branch September 11, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant