-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add Stainless SDK config and misc cleanups #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split
Are you sure you want to change the base?
Conversation
- Add .stainless/stainless.yml and workspace.json - Add AllErrors schema and remove retry quotes endpoint - Update .redocly.lint-ignore.yaml - Fix UltimateBeneficialOwner phone format - Fix internal_accounts ref path
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile OverviewGreptile SummaryThis PR adds Stainless SDK configuration to enable automated SDK generation for TypeScript and Kotlin clients, along with OpenAPI schema refinements to support proper error handling and fix existing schema issues. Key Changes
The changes properly integrate with Stainless's SDK generation workflow, which will transform the Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| .stainless/stainless.yml | New Stainless SDK config for TypeScript and Kotlin SDK generation with proper error handling setup |
| .stainless/workspace.json | Stainless workspace config pointing to mintlify OpenAPI spec and TypeScript output path |
| openapi/components/schemas/customers/UltimateBeneficialOwner.yaml | Fixed phone number example to include '+' prefix matching E.164 format pattern |
| openapi/openapi.yaml | Added AllErrors union schema for Stainless SDK error transformation |
| openapi/paths/internal-accounts/internal_accounts.yaml | Fixed InternalAccount schema path from non-existent users/ to correct customers/ directory |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant Stainless as Stainless SDK Generator
participant OAS as OpenAPI Spec (mintlify/openapi.yaml)
participant Config as stainless.yml
participant SDK as Generated SDK (TypeScript/Kotlin)
Dev->>Config: Configure SDK targets & resources
Dev->>OAS: Define AllErrors union schema
Dev->>OAS: Update Error → GridError references
Dev->>OAS: Fix schema paths & examples
Note over Stainless,Config: SDK Generation Process
Stainless->>Config: Read SDK configuration
Config-->>Stainless: Resources, models, error handling config
Stainless->>OAS: Parse OpenAPI specification
OAS-->>Stainless: Schemas, paths, components
Stainless->>Stainless: Transform AllErrors by enum property (code)
Note over Stainless: Split error schemas into distinct types<br/>using discriminator pattern
Stainless->>SDK: Generate TypeScript SDK
Note over SDK: Package: grid<br/>Output: ../sdks/grid-typescript
Stainless->>SDK: Generate Kotlin SDK
Note over SDK: Package: com.grid.api<br/>Publish: false (maven)
SDK-->>Dev: Type-safe SDKs with proper error handling

Grid API SDK Configuration