Repository navigation
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
Open
DevScoopee wants to merge 1 commit into
DevScoopee wants to merge 1 commit into
Conversation
|
@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! 🚀 |
…, 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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