Skip to main content
← Back to list
01Issue
BugShippedExtensionsPublic
Assigneesstack72

Relationships

#1990 spreadsheets-values: append and update cannot send valueInputOption, so neither can write — query-location parameters are never populated

Opened by crudec · 9/3/2026· Shipped 9/8/2026

Summary

On @swamp/gcp/sheets/spreadsheets-values, neither write method can reach the Sheets API. Both are generated from discovery configs that declare valueInputOption as a query parameter, and neither implementation ever populates it — it is absent from the method's argument schema, from GlobalArgsSchema, and from the params object handed to createResource / updateResource. The Sheets API rejects values.append and values.update without it.

update additionally cannot build its path, for an unrelated reason in the same function.

batch_update and batch_update_by_data_filter are unaffected: those endpoints take valueInputOption in the request body, and both implementations copy it there from args. They work, and are the only usable write path today.

This is a sibling of #1274 (same type, same generator gap: the implementation and the schema disagree about which arguments exist). #1274 shipped and spreadsheetId now resolves correctly.

Environment

* [@swamp](/u/swamp)/gcp/sheets 2026.08.12.2
* swamp 20260901.013347.0-sha.58c65184, macOS arm64
* Auth: service-account JSON via `credentialsJson` (vault-wired)
* Model: [@swamp](/u/swamp)/gcp/sheets/spreadsheets-values, globalArguments
  spreadsheetId / project / range / credentialsJson

Reproduction

1. appendvalueInputOption is unreachable

$ swamp model method run <model> append \
    --input '{"values":[["a","b","c"]]}'
Error: Create failed (400): {
  "error": {
    "code": 400,
    "message": "'valueInputOption' is required but not specified",
    "status": "INVALID_ARGUMENT"
  }
}

There is no way to supply it. append's argument schema (models/spreadsheets_values.ts, 2026.08.12.2) is { majorDimension, range, values }; GlobalArgsSchema does not declare it; and the execute body copies only spreadsheetId and range from globalArgs into params, so a query parameter cannot be added from either side. Passing --input valueInputOption=RAW is silently ignored (it is not in the schema), and adding it to globalArguments fails strict validation.

2. update — path range is read from the wrong state field

$ swamp model method run <model> get --input identifier='A1:C5'
# succeeds; writes state resource

$ swamp model method run <model> update --input identifier='A1:C5'
Error: Missing required path parameter: range

update sets params["range"] = existing["name"]?.toString() ?? "", but the state resource that get writes carries the range under range, not name:

{"name": null, "range": "Sheet1!A1:C5"}

So range is always "" and the path never builds. Were that fixed, update would then hit the same valueInputOption failure as append — its argument schema is { identifier } only.

Expected

append and update can write values. Concretely, a way to supply valueInputOption that validation accepts, and an update that resolves its range from state.

Verified locally by calling values:batchUpdate directly with valueInputOption in the body — the same credentials, sheet and payload succeed, which isolates the failure to argument plumbing rather than auth or permissions.

Suggested resolution

* Add `valueInputOption` (and the other query-location parameters:
  includeValuesInResponse, responseValueRenderOption,
  responseDateTimeRenderOption, insertDataOption) to the argument schemas
  of `append` and `update`, and copy any that are set into `params` rather
  than `body`. The generator appears to route every argument to `body`
  regardless of the `location` its discovery config declares — which is
  correct for the batch endpoints and wrong for these two.
* In `update`, read the path range from `existing["range"]`, falling back
  to `globalArgs["range"]`.

The location: "query" handling is the general case worth checking across the generated GCP extensions, not just this type: any method whose API requires a query parameter will have the same unreachable-argument shape.

Upstream repository: https://github.com/swamp-club/swamp-extensions

Upstream repository: https://github.com/swamp-club/swamp-extensions

Environment

  • Extension: @swamp/gcp/sheets@2026.08.12.2
  • swamp: 20260901.013347.0-sha.58c65184
  • OS: darwin (aarch64)
  • Deno: 2.8.3
  • Shell: /bin/zsh
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 4 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/8/2026, 5:05:03 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack729/8/2026, 4:05:38 AM

Sign in to post a ripple.