Clarify which PATCH requests add vs. overwrite
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 323
- Forks
- 133
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 2
Description
We had an enterprise customer who was surprised when their PATCH request to update environment variables actually overwrote their existing variables. They said:
I made this patch request, expecting only the named environment variables to be updated. Instead, the entire env block was replaced.
The API call was curl --location --request PATCH 'https://api.netlify.com/api/v1/sites/:site_id' with payload
"build_settings": {
"env": {
"KEY": "VALUE"
}
which resulted in replacing several variables with just this one new one, KEY=VALUE
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 from the OpenAPI definition for PATCH /api/v1/sites/:site_id and inspect how the build_settings.env payload is described. Confirm whether named variables are merged or the entire env block is replaced, then clarify the specification so the documented behavior matches the observed request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100