[9/15] Document error responses in OpenAPI and refresh the TypeScript SDK snapshots - #162
Open
UnknownJoe796 wants to merge 3 commits into
Open
[9/15] Document error responses in OpenAPI and refresh the TypeScript SDK snapshots#162UnknownJoe796 wants to merge 3 commits into
UnknownJoe796 wants to merge 3 commits into
Conversation
Contributor
Author
|
Looks good. |
UnknownJoe796
force-pushed
the
v53/docs-files-websockets
branch
from
July 29, 2026 22:54
4afc36f to
5bd3d6f
Compare
UnknownJoe796
force-pushed
the
v53/openapi-sdk-docs
branch
from
July 29, 2026 22:54
c31622d to
6286e37
Compare
Typed endpoints declare errorCases (LSError with status/detail/message), but only the success response was emitted. Emit each declared error case as a documented response grouped by HTTP status, using the LSError schema and an example, mirroring the success-response emission. Adds a test confirming error responses and path parameters appear in the spec (path parameters were already emitted at path-item level; the test locks that in). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 9a9c0ef) (cherry picked from commit a2a3563)
Several auto-CRUD endpoints threw BadRequestException(detail="unique") on unique-constraint violations and NotFoundException on upsert/replace without declaring them, producing W6 "undeclared error" warnings at boot. Add shared notFoundError (404) and uniqueViolationError (400, "unique") LSError constants to the errorCases of every endpoint that throws them, so the errors are documented and the warnings stop. Read-only endpoints that never throw keep empty error lists. A test asserts each throwing endpoint declares the error it can raise. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit acc5281) (cherry picked from commit 69959ea)
The committed golden TS snapshots had drifted from the current generator. Regenerating disambiguates nested type names (Mode -> UpdateRestrictions Mode, Part -> UpdateRestrictionsPart), matching the generator's intended output. Changes are confined to the type definitions and their imports. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 22272fc) (cherry picked from commit 6286e37)
UnknownJoe796
force-pushed
the
v53/docs-files-websockets
branch
from
July 30, 2026 02:19
5bd3d6f to
d1b7d87
Compare
UnknownJoe796
force-pushed
the
v53/openapi-sdk-docs
branch
from
July 30, 2026 02:19
6286e37 to
8b29a23
Compare
UnknownJoe796
changed the base branch from
v53/docs-files-websockets
to
version-5.3
July 30, 2026 02:24
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.
LSErrorcases now appear in the generated OpenAPI spec, not justthe success response.
ModelRestEndpointsdeclares the errors it throws.The snapshot files are generated output; regenerate rather than hand-edit. They
are regenerated again by the table-registration PR later in the stack, when the
models change.