Skip to content

Commit e15377c

Browse files
authored
SELFDEV-626 Change PUT site's routes body to array (#351)
<!-- Ticket number or summary of work --> # [SELFDEV-626] ## What changed? This PR changes the request body of PUT site's routes to an array of objects, as pointed out by the SELFDEV-626 submitter. > Furthermore, the code sample for "Update a Site's Routes" is incorrect. Since it's a bulk update for all possible Routes, it should be wrapped in an array: > ``` > [{ > "id": 0, > "type": "product", > "matching": "5", > "route": "/my-amazing-product" > }] > ``` > Attempting to run the code sample presently documented will result in this error: > > ``` > "status": 422, > "title": "The request payload has to be a JSON array for the endpoint" > ``` [SELFDEV-626]: https://bigcommercecloud.atlassian.net/browse/SELFDEV-626?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent df4d224 commit e15377c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

reference/sites.v3.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,9 @@ paths:
401401
content:
402402
application/json:
403403
schema:
404-
$ref: '#/components/schemas/siteRoute_Full'
404+
type: array
405+
items:
406+
$ref: '#/components/schemas/siteRoute_Full'
405407
x-examples:
406408
application/json:
407409
- id: 1

0 commit comments

Comments
 (0)