Repurpose redisCommandArg's name as the unique ID
Partial fix of #10948
This PR makes sure that "name" is unique for all arguments in the same level (i.e. all args of a command and all args within a block/oneof). This means several argument with identical meaning can be referred to together, but also if someone needs to refer to a specific one, they can use its full path.
In addition, the "display" field has been added, to be used by redis.io in order to render the syntax of the command (for the vast majority it is identical to "name" but sometimes we want to use a different string that is not "name") The "display" field is exposed via COMMAND DOCS and will be present for every argument, except "oneof" and "block" (which are container arguments)
Other changes:
- Make sure we do not have any container arguments ("oneof" or "block") that contain less than two sub-args (otherwise it doesn't make sense)
- migrate.json: both AUTH and AUTH2 should not be "optional"
- arg names cannot contain underscores, and force the usage of hyphens (most of these were a result of the script that generated the initial json files from redis.io commands.json).
- [x] go over all "name"s: make sure they make sense because soon we won't be able to modify them (people may rely on their value)
- [x] validate no underscore in "name"
I'm good with this.
@redis/core-team please approve, adds a "display" field for command arguments in COMMAND DOCS output. more details at the top.
@guybe7 please make a PR to update the docs of COMMAND DOCS, and also coordinate with @itamarhaber what should be done in order for redis.io to render the new display_text field.
Merged website support for new display field... now we just need the new commands.json :)
https://github.com/redis/redis-doc/pull/2091