Include error in the async response apis #58
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.
Pull Request: Update Response Schemas to Support Error Responses
Summary
Updated OpenAPI response schemas to support both successful responses and error responses using
oneOfconstraints. Responses now requirecontextand exactly one ofmessageorerror.Changes
Response Schema Pattern
required: [context, message]- only successful responses allowedrequired: [context]withoneOfrequiring eithermessageorerror- supports both success and error responsesUpdated Endpoints
All
on_*callback endpoints now support error responses:/beckn/on_discover/beckn/on_select/beckn/on_init/beckn/on_confirm/beckn/on_status/beckn/on_update/beckn/on_cancel/beckn/on_support/beckn/on_track/beckn/on_rating/beckn/v2/catalog/on_publish/beckn/on_discover/offerSchema Updates
errorproperty to response schemas. The error object structure: