Skip to content

Commit d649710

Browse files
Add OpenAPI docs for Sourcebot public API (#996)
* Add OpenAPI docs for Sourcebot public API Generate and publish OpenAPI docs for the public search, repo, and file-browsing endpoints, add Mintlify integration, and serve the generated spec at /api/openapi.json. Note: /api/stream_search remains modeled as text/event-stream in OpenAPI. OpenAPI 3.0 does not provide a first-class way to describe SSE frames as a typed stream of JSON events. * Address OpenAPI PR review feedback Remove the localhost servers entry, clarify the SSE stream description, point docs readers at /api/openapi.json, add the changelog entry, and update the lockfile metadata. * update release flow to commit docs changes on version change * feedback * feedback --------- Co-authored-by: Brendan Kellam <brendan@sourcebot.dev>
1 parent 21f9997 commit d649710

File tree

19 files changed

+1605
-51
lines changed

19 files changed

+1605
-51
lines changed

.github/workflows/release-prod.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,25 @@ jobs:
126126
echo "Updated version.ts with version v$VERSION"
127127
cat packages/shared/src/version.ts
128128
129+
- name: Setup Node.js
130+
uses: actions/setup-node@v4
131+
with:
132+
node-version: '20.x'
133+
134+
- name: Install dependencies
135+
run: yarn install --frozen-lockfile
136+
137+
- name: Generate OpenAPI docs
138+
run: yarn openapi:generate
139+
129140
- name: Configure git
130141
run: |
131142
git config user.name "github-actions[bot]"
132143
git config user.email "github-actions[bot]@users.noreply.github.com"
133144
134145
- name: Commit changes
135146
run: |
136-
git add CHANGELOG.md packages/shared/src/version.ts
147+
git add CHANGELOG.md packages/shared/src/version.ts docs/api-reference/sourcebot-public.openapi.json
137148
git commit -m "[skip ci] Release v$VERSION"
138149
139150
- name: Push to temporary branch

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
### Changed
1616
- Require explicit invocation of ask_codebase tool in MCP [#995](https://github.com/sourcebot-dev/sourcebot/pull/995)
1717
- Gate MCP API behind authentication when Ask GitHub is enabled. [#994](https://github.com/sourcebot-dev/sourcebot/pull/994)
18+
- Added generated OpenAPI documentation for the public search, repo, and file browsing API surface. [#101](https://github.com/sourcebot-dev/sourcebot/issues/101)
1819

1920
## [4.15.4] - 2026-03-11
2021

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ RUN chown -R sourcebot:sourcebot /app
220220
# Copy zoekt proto files (needed for gRPC client at runtime)
221221
COPY --chown=sourcebot:sourcebot vendor/zoekt/grpc/protos /app/vendor/zoekt/grpc/protos
222222

223+
# Copy OpenAPI docs
224+
COPY --chown=sourcebot:sourcebot docs/api-reference/sourcebot-public.openapi.json /app/docs/api-reference/sourcebot-public.openapi.json
225+
223226
# Copy all of the things
224227
COPY --chown=sourcebot:sourcebot --from=web-builder /app/packages/web/public ./packages/web/public
225228
COPY --chown=sourcebot:sourcebot --from=web-builder /app/packages/web/.next/standalone ./

0 commit comments

Comments
 (0)