Refactor/openapi dedupe errors #133
Open
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.
refactor: deduplicate parameters and standardize error responses
Description
This PR refactors the Shopping Service OpenAPI specification source/services/shopping/openapi.json to improve maintainability and strictly follow the DRY principle.
Key Changes:
Authorization,X-API-Key,Request-Id) from individual operations to the path level. This significantly reduces redundancy across endpoints like/checkout-sessionsand/carts.error_responseschema and added standard HTTP error responses (400, 401, 404, 500) to all operations, referencing shared definitions incomponents/responses.These changes make the OpenAPI spec more concise, easier to read, and ensure consistent error handling documentation across the API.
Type of change
Please delete options that are not relevant.
Is this a Breaking Change or Removal?
If you checked "Breaking change" above, or if you are removing any schema
files or fields:
!to my PR title (e.g.,feat!: remove field).Checklist