-
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
feat: add Stainless SDK config and misc cleanups #132
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile OverviewGreptile SummaryThis PR adds Stainless SDK generation configuration and performs several OpenAPI schema cleanups to prepare for automated SDK generation. Key Changes:
Schema Improvements: Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| .github/workflows/stainless-action.yml | Added GitHub Actions workflow for Stainless SDK generation on PR events |
| .stainless/stainless.yml | Added comprehensive Stainless SDK configuration for TypeScript and Kotlin targets |
| openapi/openapi.yaml | Added AllErrors schema with refs to specific error schemas |
| openapi/components/schemas/customers/UltimateBeneficialOwner.yaml | Fixed phone number example to include '+' prefix matching E.164 format |
| openapi/paths/internal-accounts/internal_accounts.yaml | Fixed schema reference from non-existent users/InternalAccount to customers/InternalAccount |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant GH as GitHub PR
participant Workflow as Stainless Action
participant Stainless as Stainless API
participant SDK as Generated SDK
Dev->>GH: Opens/Updates PR
GH->>Workflow: Trigger (opened/synchronize/reopened)
Workflow->>Workflow: Checkout repository
Workflow->>Stainless: Upload OpenAPI spec (preview)
Stainless->>Stainless: Validate OpenAPI spec
Stainless->>Stainless: Generate TypeScript SDK
Stainless->>Stainless: Generate Kotlin SDK
Stainless->>GH: Post preview comment on PR
Dev->>GH: Merges PR
GH->>Workflow: Trigger (closed + merged)
Workflow->>Workflow: Checkout repository
Workflow->>Stainless: Upload OpenAPI spec (merge)
Stainless->>SDK: Build and publish SDKs
Stainless->>GH: Post merge status
6432728 to
e5749d2
Compare
21d334e to
f90918a
Compare
e5749d2 to
a27f6e6
Compare
f90918a to
c6b215b
Compare
a27f6e6 to
a1379cd
Compare
c6b215b to
6464d8a
Compare
a1379cd to
d0f0475
Compare
2d0527c to
16c31c5
Compare
94a379a to
c72b46f
Compare
16c31c5 to
20ea4a3
Compare
c72b46f to
99a29c9
Compare
20ea4a3 to
d1566ae
Compare
99a29c9 to
d8d7c4d
Compare
7324f44 to
3aa1250
Compare
1c31c37 to
fbf418e
Compare
3aa1250 to
f054ac0
Compare
fbf418e to
48e70c8
Compare
f054ac0 to
2ac3b42
Compare
2ac3b42 to
a8f4844
Compare
00ab46b to
fce8683
Compare
a8f4844 to
6b08d9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9 files reviewed, 3 comments
Additional Comments (1)
This PR renames Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi.yaml
Line: 4444:4469
Comment:
**Inconsistent error schema name**
This PR renames `#/components/schemas/Error` to `#/components/schemas/GridError` in the bundled specs (`openapi.yaml` / `mintlify/openapi.yaml`), but the modular spec still references error schemas under `openapi/components/schemas/errors/Error*.yaml` and also uses `common/GridError.yaml` for a 410 response (`openapi/paths/customers/customers_{customerId}.yaml:172`). Since `GridError` and `Error400`/`Error401` etc are separate shapes, it’s easy for clients to end up with inconsistent error typing depending on endpoint/status. Please confirm the intended canonical error model and update the remaining path/components refs so all non-2xx responses consistently use the same error schema family.
How can I resolve this? If you propose a fix, please make it concise. |
6b08d9b to
9eebf24
Compare
fce8683 to
c9ec7a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9 files reviewed, 2 comments
Additional Comments (1)
The Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 167:173
Comment:
**410 response schema mismatch**
The `410` response now references `../../components/schemas/common/GridError.yaml`, but the `401/404/500` responses in this same file still reference `../../components/schemas/errors/Error*.yaml`. If `410` is meant to follow the standard error envelope used elsewhere, it should reference the appropriate `errors/Error410.yaml` schema; otherwise clients will have to special-case `410` to a different error shape than other error responses for this endpoint.
How can I resolve this? If you propose a fix, please make it concise. |
1c7be75 to
a688a5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9 files reviewed, 1 comment
a688a5a to
741b5e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 2 comments
Additional Comments (2)
Prompt To Fix With AIThis is a comment left during a code review.
Path: mintlify/openapi.yaml
Line: 4358:4360
Comment:
**Missing `type` for property**
`umaAddress` is defined with `description`/`example` but no `type` in the schema, which makes the property schema invalid/ambiguous for OpenAPI tooling and SDK generation. Add `type: string` (matching the example and intended semantics).
How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi.yaml
Line: 4369:4371
Comment:
**Missing `type` for property**
`umaAddress` is defined with `description`/`example` but no `type`. OpenAPI requires each property schema to be a valid schema object; without `type` this becomes ambiguous and can break validators/SDK generation. Add `type: string` for `umaAddress` (as done in the split schema).
How can I resolve this? If you propose a fix, please make it concise. |
741b5e2 to
65fb175
Compare
✱ Stainless preview buildsThis PR will update the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
11 files reviewed, 2 comments
- 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
65fb175 to
c97f7ed
Compare

Grid API SDK Configuration