Repository navigation
CBG-5715: type serialized JSON array query parameters as strings - #8650
Conversation
|
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. |
Redocly previews |
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.
6b8eee7 to
5995873
Compare
5995873 to
6d4983b
Compare
Pull Request is not mergeable
`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>
6d4983b to
a3a2e0b
Compare
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