Skip to content

A generated TypeScript client now ships in-repo at clients/typescript, derived from openapi.yaml and enforced in CI. Types are never hand-written: schema.d.ts is produced by openapi-typescript, and openapi-fetch provides a typed createLensClient. CI regenerates the client on every run and fails if the committed output diverges from the spec, then typechecks it. This session repaired the two files that had been corrupted, added the documented usage example and README section - #403

Open
DevScoopee wants to merge 1 commit into
Divinity-Labs:mainfrom
DevScoopee:main

Conversation

@DevScoopee

Copy link
Copy Markdown

The client is generated from openapi.yaml into clients/typescript/src/schema.d.ts and wrapped by a typed createLensClient in client.ts, with index.ts exposing the public surface. CI runs npm run client:gen, then git diff --exit-code -- clients/typescript to fail on drift, then npm run client:typecheck; package.json gained those two scripts plus the openapi-typescript and openapi-fetch dev dependencies, and openapi.yaml had its duplicate operation id renamed (getPriceHistory → getPriceSnapshots). The working-tree README.md and clients/typescript/src/example.ts had been reduced to all-zero bytes, so I restored the README from git and added a TypeScript Client section documenting regeneration and a short typed example, recreated example.ts as a compiling, spec-derived usage example, and added a minor changeset.

Closes #276

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@DevScoopee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

…, derived from openapi.yaml and enforced in CI. Types are never hand-written: schema.d.ts is produced by openapi-typescript, and openapi-fetch provides a typed createLensClient. CI regenerates the client on every run and fails if the committed output diverges from the spec, then typechecks it. This session repaired the two files that had been corrupted, added the documented usage example and README section

The client is generated from openapi.yaml into clients/typescript/src/schema.d.ts and wrapped by a typed createLensClient in client.ts, with index.ts exposing the public surface. CI runs npm run client:gen, then git diff --exit-code -- clients/typescript to fail on drift, then npm run client:typecheck; package.json gained those two scripts plus the openapi-typescript and openapi-fetch dev dependencies, and openapi.yaml had its duplicate operation id renamed (getPriceHistory → getPriceSnapshots). The working-tree README.md and clients/typescript/src/example.ts had been reduced to all-zero bytes, so I restored the README from git and added a TypeScript Client section documenting regeneration and a short typed example, recreated example.ts as a compiling, spec-derived usage example, and added a minor changeset.

Closes Divinity-Labs#276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No generated client, so every integrator writes the same fetch wrapper

1 participant