docs(errors): add error type docs and wire type URIs into Problem responses - #124
Draft
glebremniov wants to merge 1 commit into
Draft
docs(errors): add error type docs and wire type URIs into Problem responses#124glebremniov wants to merge 1 commit into
glebremniov wants to merge 1 commit into
Conversation
…ponses Create docs/errors/ with a markdown page for each RFC 9457 problem type (validation-error, bad-request, unauthorized, not-found, internal-error). Each page lists causes, the exact response shape, and remediation steps. Wire those URLs into the spec: update Problem.type description with a full lookup table, and add concrete examples on every response component (BadRequest gets two — one for field validation, one for semantic errors) so generated clients and Swagger UI surface realistic, actionable payloads. https://claude.ai/code/session_01JMRt4bgmjxSE7UT2MypBo6
|
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
docs/errors/with one markdown page per RFC 9457 problem type:validation-error,bad-request,unauthorized,not-found,internal-error. Each page documents causes, the exact JSON response shape, and how to fix/recover.Problem.typedescription with a full lookup table mapping each URI to its HTTP status and meaning.examplesto every response component inspecs/openapi.yamlso Swagger UI and generated clients surface realistic, actionable payloads.BadRequestgets two examples — one for per-field validation (witherrors[]) and one for semantic/cross-field errors (noerrors[]).Error types documented
validation-error.mderrors[]populatedbad-request.mdunauthorized.mdnot-found.mdinternal-error.mdTest plan
pnpm run lint— no errorspnpm run validate— no validation issuesdocs/errors/*.mdpage renders correctly on GitHubGenerated by Claude Code