Skip to content

Commit 30fbd62

Browse files
authored
feat: add Stainless SDK config and misc cleanups (#132)
# Grid API SDK Configuration - Add .stainless/stainless.yml and workspace.json for SDK generation - Add AllErrors schema to properly handle error types - Replace Error schema references with GridError - Fix phone number format in UltimateBeneficialOwner to include '+' prefix - Update .redocly.lint-ignore.yaml with additional rule exceptions - Fix internal_accounts schema reference path
1 parent c9ec7a2 commit 30fbd62

11 files changed

Lines changed: 496 additions & 12 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build SDKs for pull request
2+
3+
env:
4+
OAS_PATH: ./openapi.yaml
5+
STAINLESS_ORG: lightspark
6+
STAINLESS_PROJECT: grid
7+
8+
on:
9+
pull_request:
10+
types:
11+
- opened
12+
- synchronize
13+
- reopened
14+
- closed
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
preview:
22+
if: github.event.action != 'closed'
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
pull-requests: write
27+
id-token: write
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v6
31+
with:
32+
fetch-depth: 2
33+
34+
- name: Run preview builds
35+
uses: stainless-api/upload-openapi-spec-action/preview@v1
36+
with:
37+
org: ${{ env.STAINLESS_ORG }}
38+
project: ${{ env.STAINLESS_PROJECT }}
39+
oas_path: ${{ env.OAS_PATH }}
40+
41+
merge:
42+
if: github.event.action == 'closed' && github.event.pull_request.merged == true
43+
runs-on: ubuntu-latest
44+
permissions:
45+
contents: read
46+
pull-requests: write
47+
id-token: write
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v6
51+
with:
52+
fetch-depth: 2
53+
54+
- name: Run merge build
55+
uses: stainless-api/upload-openapi-spec-action/merge@v1
56+
with:
57+
org: ${{ env.STAINLESS_ORG }}
58+
project: ${{ env.STAINLESS_PROJECT }}
59+
oas_path: ${{ env.OAS_PATH }}

.redocly.lint-ignore.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.
22
# See https://redocly.com/docs/cli/ for more information.
33
openapi.yaml:
4+
no-unused-components:
5+
- '#/components/schemas/AllErrors'
6+
no-required-schema-properties-undefined:
7+
- '#/components/schemas/QuoteSource/required/0'
8+
- '#/components/schemas/Quote/properties/destination/required/0'
49
no-invalid-media-type-examples:
510
- >-
611
#/paths/~1customers~1external-accounts/post/requestBody/content/application~1json/schema

0 commit comments

Comments
 (0)