Update application/json to multipart/form-data - #33
Update application/json to multipart/form-data#33Agbaje Olalekan (olalekan-agbaje) wants to merge 1 commit into
Conversation
Change content type from application/json to multipart/form-data to match api expectations
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
| content: | ||
| application/json: | ||
| multipart/form-data: | ||
| schema: | ||
| $ref: '#/components/schemas/ReplayCallbackRequest' | ||
| example: |
There was a problem hiding this comment.
Suggestion: Switching this simple structured body to multipart/form-data breaks existing JSON clients and loses type fidelity (multipart parts are transmitted as strings, so schema validation/coercion of callback_url becomes ambiguous). Since no binary/file upload is involved, keep application/json — or at minimum declare both media types so current integrations continue to work. [possible issue, importance: 6]
New proposed code:
content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReplayCallbackRequest'
+ example:
+ callback_url: 'https://partner.example.com/webhook'
multipart/form-data:
schema:
$ref: '#/components/schemas/ReplayCallbackRequest'
example:
callback_url: 'https://partner.example.com/webhook'|
Agbaje Olalekan (@olalekan-agbaje) Thanks for the PR but we should fix this in the source repo... |
User description
Change content type from application/json to multipart/form-data to match api expectations
PR Type
Documentation
Description
Switch replay callback request body content type
application/jsonreplaced bymultipart/form-dataAligns OpenAPI spec with actual API behavior
Diagram Walkthrough
File Walkthrough
v3-replay-callback.yaml
Update replay callback request media typespecs/v3/v3-replay-callback.yaml
requestBodycontent media type fromapplication/jsontomultipart/form-dataReplayCallbackRequestand example remain unchanged