Closed
Description
Hi,
Thanks for the great work on reDoc!
I have a request if its possible to introduce sample request/response. For example have a look at this url for Shopify's API reference - https://help.shopify.com/api/reference/transaction.
Same endpoint can support one or more request scenarios. Provide samples would provide complete client documentation. This could be a new section below Responses section for each endpoint. The content of samples can be provided as JSON or YAML objects.
A scenario is presented below from above shopify url.
Scenario - Capture a specified amount on a previously authorized order.
POST /admin/orders/#{id}/transactions.json
{
"transaction": {
"amount": "10.00",
"kind": "capture"
}
}
Hide Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1068278464,
"order_id": 450789469,
"amount": "10.00",
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2017-01-05T15:31:49-05:00",
"test": true,
"authorization": null,
"currency": "USD",
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"device_id": null,
"receipt": {},
"error_code": null,
"source_name": "755357713"
}
}
Metadata
Metadata
Assignees
Labels
No labels