Skip to content

docs: regenerate v2 API docs for the new SQL write endpoint#127

Draft
tbantle22 wants to merge 1 commit into
devfrom
api-v2-sql-write-docs
Draft

docs: regenerate v2 API docs for the new SQL write endpoint#127
tbantle22 wants to merge 1 commit into
devfrom
api-v2-sql-write-docs

Conversation

@tbantle22

Copy link
Copy Markdown
Collaborator

Summary

  • Pulls v2.yaml from ld's taylor/api-v2-sql-write branch: POST /api/v2/databases/{owner}/{database}/sql is now dual-purpose — a SqlReadRequest body behaves as before, a SqlWriteRequest body ({from_branch, to_branch, query}) kicks off an async write and returns 202 + OperationRef.
  • Fixes a real bug in generate-api-v2.mjs: it only handled a single flat request-body schema, so a oneOf request body silently produced no request-body table and no example payload. Now renders one table + one example per oneOf variant, labeled by schema title.
  • Fixes a stale hand-written link in README.md's endpoint index (old title/operationId for this endpoint).
  • Regenerates database.md and models.md (two new schemas: SqlReadRequest, SqlWriteRequest).

Test plan

  • npm run generate-api-v2 --workspace site/dolt runs clean
  • Diffed output — confirmed the other 20 endpoints are byte-identical (no regressions from the generator change)
  • npm run build:dolt and npm run compile both pass
  • Verified rendered HTML has the correct anchor (#runSqlPost) and both SqlReadRequest/SqlWriteRequest tables and examples
  • Grepped for other hand-written references to the old anchor/title — none left

🤖 Generated with Claude Code

Pulls v2.yaml from ld's taylor/api-v2-sql-write branch, which turns
POST /api/v2/databases/{owner}/{database}/sql into a dual-purpose
endpoint: a SqlReadRequest body behaves as before, a SqlWriteRequest
body ({from_branch, to_branch, query}) kicks off an async write.

The generator didn't support oneOf request-body schemas — it silently
dropped the request-body table and example payload for any endpoint
shaped that way. Fixed generate-api-v2.mjs to render one table/example
per oneOf variant, labeled by schema title, and regenerated
database.md and models.md. Also fixed a stale hand-written link in
README.md's index (old operationId/title for this endpoint).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tbantle22 tbantle22 marked this pull request as draft July 7, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant