`/sites/{site_id}/deploys/{deploy_id}/restore` returns 200 instead of 201
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 323
- Forks
- 133
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 2
Description
restoreSiteDeploy is documented as returning 201 on creation.
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":""}}
(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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the restoreSiteDeploy response definition in swagger.yml at lines 1164-1183 and the generated handling in go/plumbing/operations/operations_client.go at lines 3905-3907. Verify the successful status returned by the restore endpoint and align the specification or API behavior so a successful restore does not produce a Go client error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100