docs: regenerate v2 API docs for the new SQL write endpoint#127
Draft
tbantle22 wants to merge 1 commit into
Draft
docs: regenerate v2 API docs for the new SQL write endpoint#127tbantle22 wants to merge 1 commit into
tbantle22 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v2.yamlfromld'staylor/api-v2-sql-writebranch:POST /api/v2/databases/{owner}/{database}/sqlis now dual-purpose — aSqlReadRequestbody behaves as before, aSqlWriteRequestbody ({from_branch, to_branch, query}) kicks off an async write and returns202+OperationRef.generate-api-v2.mjs: it only handled a single flat request-body schema, so aoneOfrequest body silently produced no request-body table and no example payload. Now renders one table + one example peroneOfvariant, labeled by schema title.README.md's endpoint index (old title/operationIdfor this endpoint).database.mdandmodels.md(two new schemas:SqlReadRequest,SqlWriteRequest).Test plan
npm run generate-api-v2 --workspace site/doltruns cleannpm run build:doltandnpm run compileboth pass#runSqlPost) and bothSqlReadRequest/SqlWriteRequesttables and examples🤖 Generated with Claude Code