-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
restoreSiteDeploy is documented as returning 201 on creation.
Lines 1164 to 1183 in 166c074
| /sites/{site_id}/deploys/{deploy_id}/restore: | |
| post: | |
| operationId: restoreSiteDeploy | |
| tags: [deploy] | |
| parameters: | |
| - name: site_id | |
| type: string | |
| in: path | |
| required: true | |
| - name: deploy_id | |
| type: string | |
| in: path | |
| required: true | |
| responses: | |
| '201': | |
| description: Created | |
| schema: | |
| $ref: '#/definitions/deploy' | |
| default: | |
| $ref: '#/responses/error' |
However, in practice, it appears that this API instead returns 200 on success. When using the go API, this gives the following error:
unexpected success response: content available as default response in error (status 200): {"Payload":{"message":""}}
open-api/go/plumbing/operations/operations_client.go
Lines 3905 to 3907 in 166c074
| // unexpected success response | |
| unexpectedSuccess := result.(*RestoreSiteDeployDefault) | |
| return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) |
(even though the operation has succeeded, and the deployment has been correctly restored).
It should be pretty easy to update the spec - but also not sure whether maybe the API is instead returning the incorrect status?
Metadata
Metadata
Assignees
Labels
No labels