Skip to content

docs(specification): add error response declarations to Shopping service definitions#600

Open
prasad-stripe wants to merge 1 commit into
mainfrom
prasad-stripe/doc-fixes
Open

docs(specification): add error response declarations to Shopping service definitions#600
prasad-stripe wants to merge 1 commit into
mainfrom
prasad-stripe/doc-fixes

Conversation

@prasad-stripe

Copy link
Copy Markdown

Summary

The REST OpenAPI and MCP OpenRPC Shopping service definitions currently
declare only success responses (200/201). This PR adds standard error
response declarations to every endpoint:

  • 400 on POST/PUT operations with a request body
  • 401 on all operations
  • 404 on operations addressing a resource by ID
  • 409 on operations requiring Idempotency-Key

All error responses reference the existing error_response.json schema.
For MCP, equivalent JSON-RPC error objects are defined in components/errors.

Motivation

  • Code generators use response declarations to produce typed error handling
  • Implementers need normative guidance on expected error conditions
  • The error_response.json schema already exists but was not surfaced at the service layer

Changes

  • source/services/shopping/rest.openapi.json: add 4xx responses (pure additions)
  • source/services/shopping/mcp.openrpc.json: add components/errors + per-method error refs

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:needs-triage Signal that the PR is ready for human triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants