Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Syntax of command arg with token and multiple (e.g. CLIENT LIST) #115

Open
zuiderkwast opened this issue Aug 31, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@zuiderkwast
Copy link
Contributor

zuiderkwast commented Aug 31, 2024

This is about command arguments specified in the JSON file with these properties:

  • a "token" property,
  • a "type" that is not "pure-token" and
  • "multiple": true
  • ("optional": true in the examples below, but otherwise, it just affects the use of [ ] vs < >)

For arguments like this, the token is displayed as to be repeated for each argument.

Example: The CLIENT LIST has this argument in the JSON file:

        {
            "name": "client-id",
            "token": "ID",
            "type": "integer",
            "optional": true,
            "multiple": true,
            "since": "6.2.0"
        }

It is presented on the command web page like this:

CLIENT LIST [ TYPE normal | master | replica | pubsub ] [ ID client-id ] [ [ ID client-id ] ... ] 

Expected behaviour

The expected behaviour is that ID only appears once, e.g.

CLIENT LIST [TYPE <NORMAL | MASTER | REPLICA | PUBSUB>] [ID client-id [client-id...]]

Additional

There's an exception: If the argument has "multiple_token": true, then the token should actually be repeated. An example is the SORT command, which is already rendered correctly on the website, with GET get-pattern repeated as a whole:

SORT key [ BY by-pattern ] [ LIMIT offset count ] [ GET get-pattern ] [ [ GET get-pattern ] ... ] [ asc | desc ] [ sorting ] [ STORE destination ] 
@zuiderkwast zuiderkwast added the bug Something isn't working label Aug 31, 2024
@zuiderkwast zuiderkwast changed the title [BUG] Syntax of CLIENT LIST [BUG] Syntax of command arg with token and multiple (e.g. CLIENT LIST) Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant