CBG-5715: use minLength/maxLength for string length constraints - #8649
Open
torcolvin wants to merge 1 commit into
Open
CBG-5715: use minLength/maxLength for string length constraints#8649torcolvin wants to merge 1 commit into
torcolvin wants to merge 1 commit into
Conversation
2 tasks
Redocly previews |
Contributor
|
Droid finished @torcolvin's task —— View job LGTM, the OpenAPI schema keyword changes (minimum/maximum → minLength/maxLength for strings) are correct and consistent for the touched definitions. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Sync Gateway OpenAPI spec to express string-length constraints using minLength/maxLength (instead of numeric minimum/maximum), improving correctness of generated docs and schema validation.
Changes:
- Switch
Replication.replication_idandDatabase.user_xattr_keystring constraints tomaxLengthinschemas.yaml. - Fix the
replicationidpath parameter constraints tominLength/maxLengthinparameters.yaml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/api/components/schemas.yaml | Replaces invalid string maximum usage with maxLength for affected schema properties. |
| docs/api/components/parameters.yaml | Replaces invalid string minimum/maximum with minLength/maxLength for the replicationid path parameter. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bbrks
approved these changes
Aug 24, 2026
`minimum`/`maximum` only apply to numeric schemas, so the length limits declared on these string schemas were silently ignored by validators and not rendered in the docs. - `replicationid` path parameter: 1-160 characters - `Replication.replication_id`: max 160 characters - `Database.user_xattr_key`: max 15 characters Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
torcolvin
force-pushed
the
CBG-5715-01-length-constraints
branch
from
August 24, 2026 17:42
7da0c56 to
1d65dd5
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 1/9, based on
main.minimum/maximumonly apply to numeric schemas, so the length limits declared on these string schemas were silently ignored by validators and not rendered in the docs.replicationidpath parameter: 1-160 charactersReplication.replication_id: max 160 charactersDatabase.user_xattr_key: max 15 charactersBecause
maximumon a string is inert whilemaxLengthactually binds, both values were checked against the code rather than carried over on trust:db/sg_replicate_cfg.go:190—if len(rc.ID) > 160, with a comment explaining the 160 (checkpoint-key prefix headroom). Note the adjacent error string says "less than 160" while the check admits exactly 160;maxLength: 160matches the check.rest/config.go:1145—if len(*dbConfig.UserXattrKey) > 15.Pre-review checklist
docs/api🤖 Generated with Claude Code