Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
66108ba
feat(api): api update
stainless-app[bot] Jan 26, 2026
60a3e0c
feat(api): api update
stainless-app[bot] Oct 27, 2025
edfc07c
codegen metadata
stainless-app[bot] Oct 28, 2025
6385a1f
feat(api): api update
stainless-app[bot] Nov 3, 2025
e0f0106
codegen metadata
stainless-app[bot] Nov 4, 2025
03c7271
feat(api): update automated code reviewer selection
stainless-app[bot] Jan 26, 2026
f5c5bbc
feat(api): api update
stainless-app[bot] Nov 4, 2025
e4f5130
feat(api): api update
stainless-app[bot] Nov 9, 2025
0844ac5
fix(java): Resolve name collisions
stainless-app[bot] Nov 21, 2025
1ed52cf
feat(api): manual updates
stainless-app[bot] Nov 21, 2025
6708aac
feat(api): api update
stainless-app[bot] Nov 25, 2025
d81328e
codegen metadata
stainless-app[bot] Dec 1, 2025
da796cf
chore(internal): codegen related update
stainless-app[bot] Dec 5, 2025
fe9cc50
chore: elide duplicate aliases
stainless-app[bot] Dec 5, 2025
78d27b1
fix(mcp): correct code tool API endpoint
stainless-app[bot] Dec 5, 2025
a23c9b2
fix: rename param to avoid collision
stainless-app[bot] Dec 5, 2025
6753366
codegen metadata
stainless-app[bot] Dec 17, 2025
8064da5
codegen metadata
stainless-app[bot] Dec 17, 2025
21809e9
codegen metadata
stainless-app[bot] Dec 18, 2025
2e87c84
chore(internal): codegen related update
stainless-app[bot] Dec 18, 2025
294b3c4
codegen metadata
stainless-app[bot] Dec 19, 2025
97407f5
chore(internal): codegen related update
stainless-app[bot] Jan 5, 2026
0e69b17
feat(api): api update
stainless-app[bot] Jan 5, 2026
8d0c7b6
docs: prominently feature MCP server setup in root SDK readmes
stainless-app[bot] Jan 5, 2026
d869d30
feat(api): api update
stainless-app[bot] Jan 6, 2026
842d28f
chore(internal): update `actions/checkout` version
stainless-app[bot] Jan 16, 2026
5aba5fa
fix(docs): add missing pointer prefix to api.md return types
stainless-app[bot] Jan 16, 2026
4f6a61c
feat(api): add per endpoint security
stainless-app[bot] Jan 23, 2026
513bd70
chore(internal): codegen related update
stainless-app[bot] Jan 26, 2026
2a9c325
fix(tests): skip broken date validation test
stainless-app[bot] Jan 26, 2026
ad830d2
fix(docs): fix mcp installation instructions for remote servers
stainless-app[bot] Jan 28, 2026
1e5ccd8
fix(client): send correct authentication methods
stainless-app[bot] Apr 14, 2026
55defed
chore: update mock server docs
stainless-app[bot] Feb 19, 2026
e6db22d
fix: allow canceling a request while it is waiting to retry
stainless-app[bot] Feb 19, 2026
1969766
chore(internal): move custom custom `json` tags to `api`
stainless-app[bot] Feb 24, 2026
d5b60bf
fix(api): remove invalid transform config
stainless-app[bot] Mar 10, 2026
9dc8e01
feat(api): api update
stainless-app[bot] Mar 10, 2026
28a26e6
chore(internal): codegen related update
stainless-app[bot] Mar 10, 2026
4365581
chore(ci): skip uploading artifacts on stainless-internal branches
stainless-app[bot] Mar 10, 2026
30717c9
chore(internal): minor cleanup
stainless-app[bot] Mar 10, 2026
50598bc
chore(internal): use explicit returns
stainless-app[bot] Mar 10, 2026
d3df8e0
chore(internal): use explicit returns in more places
stainless-app[bot] Mar 10, 2026
49d5d5f
chore(internal): tweak CI branches
stainless-app[bot] Mar 16, 2026
d283472
codegen metadata
stainless-app[bot] Mar 17, 2026
484a07b
refactor(tests): switch from prism to steady
stainless-app[bot] Mar 19, 2026
6612aa2
chore(tests): bump steady to v0.19.4
stainless-app[bot] Mar 20, 2026
7f24bb0
chore(tests): bump steady to v0.19.5
stainless-app[bot] Mar 20, 2026
ff360d9
chore(internal): update gitignore
stainless-app[bot] Mar 23, 2026
ccb5268
chore(tests): bump steady to v0.19.6
stainless-app[bot] Mar 23, 2026
8f1aae5
fix(types): generate shared enum types that are not referenced by oth…
stainless-app[bot] Mar 24, 2026
9da39dd
chore(ci): skip lint on metadata-only changes
stainless-app[bot] Mar 24, 2026
e14f2c7
chore(tests): bump steady to v0.19.7
stainless-app[bot] Mar 24, 2026
a4b8a55
codegen metadata
stainless-app[bot] Mar 24, 2026
498a799
feat(api): api update
stainless-app[bot] Mar 25, 2026
e8c398d
fix: prevent duplicate ? in query params
stainless-app[bot] Mar 26, 2026
1edfaa7
chore: remove unnecessary error check for url parsing
stainless-app[bot] Mar 26, 2026
59dc2b9
feat(internal): support comma format in multipart form encoding
stainless-app[bot] Mar 26, 2026
512eb10
codegen metadata
stainless-app[bot] Mar 27, 2026
5734b45
chore(ci): support opting out of skipping builds on metadata-only com…
stainless-app[bot] Mar 27, 2026
ac6482c
chore(tests): bump steady to v0.20.1
stainless-app[bot] Mar 31, 2026
b74a347
chore(tests): bump steady to v0.20.2
stainless-app[bot] Mar 31, 2026
bf87e6f
feat(api): api update
stainless-app[bot] Apr 10, 2026
e4acec8
codegen metadata
stainless-app[bot] Apr 10, 2026
b0aa765
feat(api): api update
stainless-app[bot] Apr 16, 2026
d53b177
chore(tests): bump steady to v0.22.1
stainless-app[bot] Apr 17, 2026
4567209
chore(internal): more robust bootstrap script
stainless-app[bot] Apr 22, 2026
cf3dcb3
feat(go): add default http client with timeout
stainless-app[bot] Apr 24, 2026
1e3953b
feat: support setting headers via env
stainless-app[bot] Apr 27, 2026
9c620cd
codegen metadata
stainless-app[bot] Apr 29, 2026
2509a67
codegen metadata
stainless-app[bot] Apr 30, 2026
e97e7d8
chore: avoid embedding reflect.Type for dead code elimination
stainless-app[bot] Apr 30, 2026
e5c1a0d
feat(api): change auth to npm to oidc
stainless-app[bot] Apr 30, 2026
4263048
feat(api): api update
stainless-app[bot] May 1, 2026
b14a3e2
chore: redact api-key headers in debug logs
stainless-app[bot] May 7, 2026
7fa82db
fix(go): avoid panic when http.DefaultTransport is wrapped
stainless-app[bot] May 7, 2026
1120e8c
ci: pin GitHub Actions to commit SHAs
stainless-app[bot] May 12, 2026
9e53333
feat(api): api update
stainless-app[bot] May 12, 2026
a7620d2
feat(api): manual updates
stainless-app[bot] May 12, 2026
eed6e83
codegen metadata
stainless-app[bot] May 12, 2026
be108cc
feat(api): add register benefits method
stainless-app[bot] May 12, 2026
5eb0ac9
fix(aliases): resolve broken types for alias methods with pagination
stainless-app[bot] May 13, 2026
3c72170
release: 1.35.0
stainless-app[bot] May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 43 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,62 @@
name: CI
on:
push:
branches-ignore:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
build:
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/finch-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: |-
github.repository == 'stainless-sdks/finch-go' &&
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/finch-go' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: |-
github.repository == 'stainless-sdks/finch-go' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/finch-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup go
uses: actions/setup-go@v5
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod

Expand All @@ -35,10 +68,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/finch-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup go
uses: actions/setup-go@v5
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: ./go.mod

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.prism.log
.stdy.log
codegen.log
Brewfile.lock.json
.idea/
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.34.1"
".": "1.35.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 45
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-9c32d7e477bd1c441abd65db0dfe6220948aa00face05fc8b57395e368ee2099.yml
openapi_spec_hash: 3da940ffc5da8000a4f359c958ed341f
config_hash: 6d3585c0032e08d723d077d660fc8448
configured_endpoints: 47
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-5092370ef89959c46138a85f9d6d3c919682a5492a0f9f85ac4421de702f35a8.yml
openapi_spec_hash: a4ca94b3405fc83934c949068943e16c
config_hash: a1c4b7d897cbf8ed42c5f474b3161d79
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,94 @@
# Changelog

## 1.35.0 (2026-05-13)

Full Changelog: [v1.34.1...v1.35.0](https://github.com/Finch-API/finch-api-go/compare/v1.34.1...v1.35.0)

### Features

* **api:** add per endpoint security ([4f6a61c](https://github.com/Finch-API/finch-api-go/commit/4f6a61cb9e3290136a7c3d8564ebb4ce0b493c55))
* **api:** add register benefits method ([be108cc](https://github.com/Finch-API/finch-api-go/commit/be108cc33180f7e0b54b104de0cdf2e59a9dcb31))
* **api:** api update ([9e53333](https://github.com/Finch-API/finch-api-go/commit/9e53333d990dda00cfb819b3ac069a2254f68ea5))
* **api:** api update ([4263048](https://github.com/Finch-API/finch-api-go/commit/4263048f6d00c65b4b52b942fe3dd8b80a46f371))
* **api:** api update ([b0aa765](https://github.com/Finch-API/finch-api-go/commit/b0aa76565c99ff56b69a5acd326f96782f25602b))
* **api:** api update ([bf87e6f](https://github.com/Finch-API/finch-api-go/commit/bf87e6fb3eecb38486fcc1f43f192437d8302ef2))
* **api:** api update ([498a799](https://github.com/Finch-API/finch-api-go/commit/498a799c62561b2b03e7140a6b5545e1d8744232))
* **api:** api update ([9dc8e01](https://github.com/Finch-API/finch-api-go/commit/9dc8e015f0f6f97ba58817fba474bbaf27f3581e))
* **api:** api update ([d869d30](https://github.com/Finch-API/finch-api-go/commit/d869d30065f591dea7781b6dc3124306e26e88fe))
* **api:** api update ([0e69b17](https://github.com/Finch-API/finch-api-go/commit/0e69b1715d0da0aaba88240f51dc8950bb893015))
* **api:** api update ([6708aac](https://github.com/Finch-API/finch-api-go/commit/6708aacc01982e5141ac1ca52412987994f3aecd))
* **api:** api update ([e4f5130](https://github.com/Finch-API/finch-api-go/commit/e4f5130e25eb506c09204f69d6085e9b243cfd76))
* **api:** api update ([f5c5bbc](https://github.com/Finch-API/finch-api-go/commit/f5c5bbcf3cf0d07df31e2330159de37d36e946f2))
* **api:** api update ([6385a1f](https://github.com/Finch-API/finch-api-go/commit/6385a1ff8de901c11dd7452adc89f44542144247))
* **api:** api update ([60a3e0c](https://github.com/Finch-API/finch-api-go/commit/60a3e0c4abdcac96bb7ca1a5ce64f99367fb5a12))
* **api:** api update ([66108ba](https://github.com/Finch-API/finch-api-go/commit/66108ba1d8a47acf7663432e1d9b5744800575e6))
* **api:** change auth to npm to oidc ([e5c1a0d](https://github.com/Finch-API/finch-api-go/commit/e5c1a0d20beaccb40e034af4ac54c282cc1ef103))
* **api:** manual updates ([a7620d2](https://github.com/Finch-API/finch-api-go/commit/a7620d229ae967e7c06e853eeccf8a56881195d3))
* **api:** manual updates ([1ed52cf](https://github.com/Finch-API/finch-api-go/commit/1ed52cffc078b436f3899b736e5deb7e8cb5f703))
* **api:** update automated code reviewer selection ([03c7271](https://github.com/Finch-API/finch-api-go/commit/03c7271b89082892da533f8e9fb102ce18de39da))
* **go:** add default http client with timeout ([cf3dcb3](https://github.com/Finch-API/finch-api-go/commit/cf3dcb3d1ddf6c1136e53dd57a93f7facd23a58f))
* **internal:** support comma format in multipart form encoding ([59dc2b9](https://github.com/Finch-API/finch-api-go/commit/59dc2b9dce285eb80a691ca90e9ac97229034ff6))
* support setting headers via env ([1e3953b](https://github.com/Finch-API/finch-api-go/commit/1e3953bccd8b1cbc8f77d404779a392aba709ed9))


### Bug Fixes

* **aliases:** resolve broken types for alias methods with pagination ([5eb0ac9](https://github.com/Finch-API/finch-api-go/commit/5eb0ac9e24a960fdd768f749babe93b523a4ca1f))
* allow canceling a request while it is waiting to retry ([e6db22d](https://github.com/Finch-API/finch-api-go/commit/e6db22de47e89efee09be198a42e7c02200e364b))
* **api:** remove invalid transform config ([d5b60bf](https://github.com/Finch-API/finch-api-go/commit/d5b60bfaa7cbf1aa7c55fbe24f58ebe0474754fe))
* **client:** send correct authentication methods ([1e5ccd8](https://github.com/Finch-API/finch-api-go/commit/1e5ccd8416ee5a97e58656d59c2cf9c3980cf446))
* **docs:** add missing pointer prefix to api.md return types ([5aba5fa](https://github.com/Finch-API/finch-api-go/commit/5aba5fa426a29a3084302bc382a7d15af2eb8bea))
* **docs:** fix mcp installation instructions for remote servers ([ad830d2](https://github.com/Finch-API/finch-api-go/commit/ad830d20499fffdd11c6b197f921177b4abd65f3))
* **go:** avoid panic when http.DefaultTransport is wrapped ([7fa82db](https://github.com/Finch-API/finch-api-go/commit/7fa82dbdfe66f9394927ab9b86c612df1c171e17))
* **java:** Resolve name collisions ([0844ac5](https://github.com/Finch-API/finch-api-go/commit/0844ac58ae69b2d0c1274bac8cf7c1ee0eb8e349))
* **mcp:** correct code tool API endpoint ([78d27b1](https://github.com/Finch-API/finch-api-go/commit/78d27b1c7b5a74781897a42d948994a923957e28))
* prevent duplicate ? in query params ([e8c398d](https://github.com/Finch-API/finch-api-go/commit/e8c398dcf6b5418f188cf388fdbb16d39b71e97e))
* rename param to avoid collision ([a23c9b2](https://github.com/Finch-API/finch-api-go/commit/a23c9b2b69248225624750994cc66775535fe3f9))
* **tests:** skip broken date validation test ([2a9c325](https://github.com/Finch-API/finch-api-go/commit/2a9c325c2352c3b2cd113b412c621cf611cecd3a))
* **types:** generate shared enum types that are not referenced by other schemas ([8f1aae5](https://github.com/Finch-API/finch-api-go/commit/8f1aae5f99d7632660d3eeb0f25d86e0416212b1))


### Chores

* avoid embedding reflect.Type for dead code elimination ([e97e7d8](https://github.com/Finch-API/finch-api-go/commit/e97e7d864ba1f7532a1a6d3cf78cf17b11c383a6))
* **ci:** skip lint on metadata-only changes ([9da39dd](https://github.com/Finch-API/finch-api-go/commit/9da39ddbd53e1a4ab93d8dfb1977294882210ad0))
* **ci:** skip uploading artifacts on stainless-internal branches ([4365581](https://github.com/Finch-API/finch-api-go/commit/43655817dc1d53427fe0eb41ee6bef24f6ea8340))
* **ci:** support opting out of skipping builds on metadata-only commits ([5734b45](https://github.com/Finch-API/finch-api-go/commit/5734b45a802b756182f81689f6eac0fa19f72ea0))
* elide duplicate aliases ([fe9cc50](https://github.com/Finch-API/finch-api-go/commit/fe9cc50323a51a6caafe44cebf2628f3dd788c4a))
* **internal:** codegen related update ([28a26e6](https://github.com/Finch-API/finch-api-go/commit/28a26e60952b98adc9b0236e808671c562f892ac))
* **internal:** codegen related update ([513bd70](https://github.com/Finch-API/finch-api-go/commit/513bd70b2b8fa7d55c23e6ee3d80f025a47e96e9))
* **internal:** codegen related update ([97407f5](https://github.com/Finch-API/finch-api-go/commit/97407f552709b01565f5f627a182ac3bebbb2ed4))
* **internal:** codegen related update ([2e87c84](https://github.com/Finch-API/finch-api-go/commit/2e87c84e8db41801091a7d05df535abe45831140))
* **internal:** codegen related update ([da796cf](https://github.com/Finch-API/finch-api-go/commit/da796cf9a6f4f8bb56d92c6a13707a1eb3c8e762))
* **internal:** minor cleanup ([30717c9](https://github.com/Finch-API/finch-api-go/commit/30717c9086ae53b1cfeb4212f3197f1f2a22ee25))
* **internal:** more robust bootstrap script ([4567209](https://github.com/Finch-API/finch-api-go/commit/45672092de0a9c9277bc500e3f9a184ac3349926))
* **internal:** move custom custom `json` tags to `api` ([1969766](https://github.com/Finch-API/finch-api-go/commit/1969766dcd2efdebf079bd7500b39805036c7bb1))
* **internal:** tweak CI branches ([49d5d5f](https://github.com/Finch-API/finch-api-go/commit/49d5d5f7c566775bc52728b6e63f3ae5af8a5b99))
* **internal:** update `actions/checkout` version ([842d28f](https://github.com/Finch-API/finch-api-go/commit/842d28fa959584aef8f23bb9e7984295faf61980))
* **internal:** update gitignore ([ff360d9](https://github.com/Finch-API/finch-api-go/commit/ff360d9cc7a273133dc43807eb5eb0b7b380fc8c))
* **internal:** use explicit returns ([50598bc](https://github.com/Finch-API/finch-api-go/commit/50598bc2920ffe7720f4610df198b161e7f3d07d))
* **internal:** use explicit returns in more places ([d3df8e0](https://github.com/Finch-API/finch-api-go/commit/d3df8e00450d15b7ce72981a833409246f5c69fb))
* redact api-key headers in debug logs ([b14a3e2](https://github.com/Finch-API/finch-api-go/commit/b14a3e2098028267d2d0c0c40ac42f3a9497a709))
* remove unnecessary error check for url parsing ([1edfaa7](https://github.com/Finch-API/finch-api-go/commit/1edfaa775dfacad3af6bec607e7f8cbee34beb14))
* **tests:** bump steady to v0.19.4 ([6612aa2](https://github.com/Finch-API/finch-api-go/commit/6612aa2d1245057a8e457df53056e084aaad3f22))
* **tests:** bump steady to v0.19.5 ([7f24bb0](https://github.com/Finch-API/finch-api-go/commit/7f24bb0ff1a37cbedf05981b10d860f2f3034a15))
* **tests:** bump steady to v0.19.6 ([ccb5268](https://github.com/Finch-API/finch-api-go/commit/ccb5268248f77e85c2873cb3c5df85cf91d69098))
* **tests:** bump steady to v0.19.7 ([e14f2c7](https://github.com/Finch-API/finch-api-go/commit/e14f2c77eba0497a647d4716541e60a28707d000))
* **tests:** bump steady to v0.20.1 ([ac6482c](https://github.com/Finch-API/finch-api-go/commit/ac6482cfa68f67125bb869a3175bbbd96f2b980a))
* **tests:** bump steady to v0.20.2 ([b74a347](https://github.com/Finch-API/finch-api-go/commit/b74a347b3c26a85eb5e1e1735484af1f66f37ade))
* **tests:** bump steady to v0.22.1 ([d53b177](https://github.com/Finch-API/finch-api-go/commit/d53b1771929eaba7226b50fe268445f1043b57f0))
* update mock server docs ([55defed](https://github.com/Finch-API/finch-api-go/commit/55defede58d60e846a93fdc7623e2dea863a1e9e))


### Documentation

* prominently feature MCP server setup in root SDK readmes ([8d0c7b6](https://github.com/Finch-API/finch-api-go/commit/8d0c7b66a2c2dc08f0d93b299416c76e7fc4dd90))


### Refactors

* **tests:** switch from prism to steady ([484a07b](https://github.com/Finch-API/finch-api-go/commit/484a07bb959e9640ec3205ced8eed62f58c4a25f))

## 1.34.1 (2025-10-31)

Full Changelog: [v1.34.0...v1.34.1](https://github.com/Finch-API/finch-api-go/compare/v1.34.0...v1.34.1)
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ $ go mod edit -replace github.com/Finch-API/finch-api-go=/path/to/finch-api-go

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests.

```sh
# you will need npm installed
$ npx prism mock path/to/your/openapi.yml
$ ./scripts/mock
```

```sh
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Finch
Copyright 2026 Finch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
84 changes: 82 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ from applications written in Go.

It is generated with [Stainless](https://www.stainless.com/).

## MCP Server

Use the Finch MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40tryfinch%2Ffinch-api-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0cnlmaW5jaC9maW5jaC1hcGktbWNwIl0sImVudiI6eyJGSU5DSF9BQ0NFU1NfVE9LRU4iOiJNeSBBY2Nlc3MgVG9rZW4iLCJGSU5DSF9DTElFTlRfSUQiOiI0YWIxNWU1MS0xMWFkLTQ5ZjQtYWNhZS1mMzQzYjc3OTQzNzUiLCJGSU5DSF9DTElFTlRfU0VDUkVUIjoiTXkgQ2xpZW50IFNlY3JldCIsIkZJTkNIX1dFQkhPT0tfU0VDUkVUIjoiTXkgV2ViaG9vayBTZWNyZXQifX0)
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40tryfinch%2Ffinch-api-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40tryfinch%2Ffinch-api-mcp%22%5D%2C%22env%22%3A%7B%22FINCH_ACCESS_TOKEN%22%3A%22My%20Access%20Token%22%2C%22FINCH_CLIENT_ID%22%3A%224ab15e51-11ad-49f4-acae-f343b7794375%22%2C%22FINCH_CLIENT_SECRET%22%3A%22My%20Client%20Secret%22%2C%22FINCH_WEBHOOK_SECRET%22%3A%22My%20Webhook%20Secret%22%7D%7D)

> Note: You may need to set environment variables in your MCP client.

## Installation

<!-- x-release-please-start-version -->
Expand All @@ -24,7 +33,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/Finch-API/finch-api-go@v1.34.1'
go get -u 'github.com/Finch-API/finch-api-go@v1.35.0'
```

<!-- x-release-please-end -->
Expand Down Expand Up @@ -199,7 +208,7 @@ When the API returns a non-success status code, we return an error with type
To handle errors, we recommend that you use the `errors.As` pattern:

```go
_, err := client.HRIS.Company.Get(context.TODO())
_, err := client.HRIS.Company.Get(context.TODO(), finchgo.HRISCompanyGetParams{})
if err != nil {
var apierr *finchgo.Error
if errors.As(err, &apierr) {
Expand Down Expand Up @@ -267,6 +276,77 @@ client.HRIS.Directory.List(
)
```

### Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when
you need to examine response headers, status codes, or other details.

```go
// Create a variable to store the HTTP response
var response *http.Response
page, err := client.HRIS.Directory.List(
context.TODO(),
finchgo.HRISDirectoryListParams{},
option.WithResponseInto(&response),
)
if err != nil {
// handle error
}
fmt.Printf("%+v\n", page)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
```

### Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented
endpoints, params, or response properties, the library can still be used.

#### Undocumented endpoints

To make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.
`RequestOptions` on the client, such as retries, will be respected when making these requests.

```go
var (
// params can be an io.Reader, a []byte, an encoding/json serializable object,
// or a "…Params" struct defined in this library.
params map[string]interface{}

// result can be an []byte, *http.Response, a encoding/json deserializable object,
// or a model defined in this library.
result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
}
```

#### Undocumented request params

To make requests using undocumented parameters, you may use either the `option.WithQuerySet()`
or the `option.WithJSONSet()` methods.

```go
params := FooNewParams{
ID: finchgo.F("id_xxxx"),
Data: finchgo.F(FooNewParamsData{
FirstName: finchgo.F("John"),
}),
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
```

#### Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string
with `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with
`result.JSON.Foo.Raw()`.

Any fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.

### Middleware

We provide `option.WithMiddleware` which applies the given
Expand Down
Loading
Loading