Repository navigation
DOC-7267 Show a literal first argument in the API Methods tab signatures - #4514
Merged
Merged
Conversation
The tab printed only the method name from each signature, then the params. A Ruby container entry such as xgroup(:create, key, group, ...) has a first argument that is a literal, not a param, so the :create was dropped and the XGROUP CREATE, DESTROY, DELCONSUMER and SETID entries all read xgroup( key, group ...). The code examples call r.xgroup(:create, ...), so the tab now prints the literal as the first line inside the parentheses. The literal is read from the signature text: a first argument that is a Ruby symbol (:create) or a quoted string. A signature whose first argument is a param, such as ioredis client(subcommand: "KILL", ...), is not a literal and renders as before. Compared with the unchanged template across 589 command pages, only the 4 Ruby XGROUP blocks differ, and every other client's block is identical. Learned: the tab builds each signature from the method name plus the params list, not from the signature text, so a part of the signature that is not a param never shows Constraint: do not print the whole signature text, about 3,000 Jedis, Lettuce and NRedisStack signatures start with a return type that the tab already shows after the arrow, and 236 ioredis signatures are long tuple forms Directive: a client whose container commands pass the subcommand as a literal first argument should write it as the first argument of the signature, and the tab will show it Gaps: a literal that is not the first argument is still not shown Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Contributor
🧠 Redis MemoryFound 5 related items from repository history (5 new this commit):
Memory updated at a69fd4c |
dwdougherty
approved these changes
Nov 9, 2026
andy-stark-redis
added a commit
that referenced
this pull request
Nov 9, 2026
The Ruby entries were added to the API Methods tab dropdown in #4498, but 310 of the 527 commands had no redis_rb list. Each is now accounted for against the redis-rb v6.0.0 source. 89 command files get an entry and 203 commands are recorded as generic_only in the status file, so the tab says to use call. 23 commands name a method with complete YARD docs (BITCOUNT, BITOP, GETBIT, GEOSEARCH, INFO, PING, TIME and others) and take its signature, @PARAM types and descriptions, and @return. 66 container subcommands go through the container method that forwards the subcommand to the server, as XGROUP CREATE already does: client(:kill, *args), cluster, script and config with the same shape, slowlog(:get, length = nil), and xinfo for stream, groups and consumers with the return type that belongs to the subcommand. The 203 generic_only commands have no method in redis-rb 6.0.0, among them the array AR* commands, the V* vector commands, the module commands, the HOTKEYS family and the hash field-expiry commands, each searched for by name and by command symbol. The 18 methods without YARD parameter docs are covered by #4516 and the literal subcommand symbol is shown by #4514. Learned: redis-rb container commands are one method each that passes the subcommand through, so a subcommand entry shows the container call with the symbol in the signature Constraint: only emit an entry from YARD when every parameter has a @PARAM and the method has a @return, otherwise the type would be invented Directive: do not list a command redis-rb 6.0.0 lacks, send it with call, and check the source for the method before marking generic_only Recheck: when redis-rb ships a release after 6.0.0, search the new source for the generic_only commands Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
Summary
The API Methods tab printed only the method name from each signature, then the params. A Ruby container entry such as
xgroup(:create, key, group, ...)has a first argument that is a literal rather than a param, so the:createwas dropped. The code examples callr.xgroup(:create, ...), so the tab now prints a literal first argument as the first line inside the parentheses:The literal is read from the signature text: a Ruby symbol (
:create) or a quoted string. A signature whose first argument is a param, such as ioredisclient(subcommand: "KILL", ...), isn't a literal and renders as before.Review notes
content/develop/clientsignored (the full site only builds in CI), once with this template and once with the unchanged one, and compared the API Methods blocks on 589 command pages. Only the 4 Ruby XGROUP blocks differ, and every other client's block is identical.client(:kill, *args),slowlog(:get, ...)andxinfo(:stream, ...)) that this change makes readable. The two PRs don't depend on each other.🤖 Generated with Claude Code
Note
Low Risk
Documentation template-only change to signature HTML rendering; no runtime API or data pipeline impact.
Overview
The API Methods tab now detects and prints a literal first argument inside method parentheses when it is not part of the structured
paramslist—common for Ruby calls likexgroup(:create, ...).Rendering parses the signature string after the method name and, when the first token is a Ruby symbol or quoted string, shows it before the typed parameter lines (with a trailing comma when params follow). Signatures whose first argument is already a named param are unchanged.
Scope: docs-only Hugo template change in
api-methods-tab.html; behavior is limited to signature display, not mapping data or client selection logic.Reviewed by Cursor Bugbot for commit a69fd4c. Bugbot is set up for automated code reviews on this repo. Configure here.