CBG-5715: type serialized JSON array query parameters as strings - #8650
Open
torcolvin wants to merge 4 commits into
Open
CBG-5715: type serialized JSON array query parameters as strings#8650torcolvin wants to merge 4 commits into
torcolvin wants to merge 4 commits into
Conversation
2 tasks
Contributor
|
Droid finished @torcolvin's task —— View job Validation complete for PR #8650 (Phase 2). Summary: No candidate inline comments to validate or post. The OpenAPI parameter schema updates look consistent with the PR description. |
bbrks
requested changes
Aug 24, 2026
Redocly previews |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the OpenAPI specifications for Sync Gateway’s _changes and related endpoints to correctly document certain query parameters that are serialized JSON arrays carried as a single query-string value, and adds examples to show the expected encoding.
Changes:
- Retypes
doc_ids(GET/{keyspace}/_changes) as astringand adds examples for both serialized JSON array and comma-separated formats. - Retypes shared query parameters (
atts_since,keys,open_revs,revs_from) from OpenAPIarraytostringand adds examples reflecting the serialized-JSON-in-string encoding. - Updates
_changesrequest body property types (e.g.,limit,active_only,heartbeat,timeout) and addsrequest_plus/version_typedocumentation in the_changespath specs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/api/paths/public/keyspace-_changes.yaml | Updates public _changes query params (notably doc_ids) and POST body property schemas; adds request_plus and version_type. |
| docs/api/paths/admin/keyspace-_changes.yaml | Mirrors public _changes spec adjustments for the admin endpoint, including doc_ids query param examples and POST body typing updates. |
| docs/api/components/parameters.yaml | Retypes JSON-array-in-string query parameters (atts_since, keys, open_revs, revs_from) to string and adds examples/description clarifications. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
`atts_since`, `keys`, `open_revs`, `revs_from` and `_changes?doc_ids` are all read with `getJSONStringArrayQuery`, i.e. the query value is a single string containing a serialized JSON array — not an OpenAPI `array`, which renders and validates as repeated/comma-separated query values. Retype them as `string` and add examples showing the expected encoding. `doc_ids` also accepts a comma-separated list, so it gets both examples. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
torcolvin
force-pushed
the
CBG-5715-02-serialized-json-params
branch
from
August 24, 2026 17:42
6b8eee7 to
5995873
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CBG-5715
Split out of #8589 — stack 2/9, based on #8649.
atts_since,keys,open_revs,revs_fromand_changes?doc_idsare all read as a single query string containing a serialized JSON array — not an OpenAPIarray, which renders and validates as repeated/comma-separated query values.Retype them as
stringand add examples showing the expected encoding.doc_idsalso accepts a comma-separated list, so it gets both examples.Evidence:
rest/doc_api.go:54,57—getJSONStringArrayQuery("revs_from")/("atts_since")rest/bulk_api.go:92—getJSONStringArrayQuery("keys");rest/view_api.go:107JSON-unmarshalskeysfor viewsrest/doc_api.go:31,145—open_revsisallor a JSON array stringrest/changes_api.go:213-228— GETdoc_idstriesJSONUnmarshalfirst, then falls back tostrings.Split(",")Pre-review checklist
docs/api🤖 Generated with Claude Code