summaryrefslogtreecommitdiff
path: root/examples/redis-unstable/src/commands/README.md
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:40:55 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:40:55 +0100
commit5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda (patch)
tree1acdfa5220cd13b7be43a2a01368e80d306473ca /examples/redis-unstable/src/commands/README.md
parentc7ab12bba64d9c20ccd79b132dac475f7bc3923e (diff)
downloadcrep-5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda.tar.gz
Add Redis source code for testing
Diffstat (limited to 'examples/redis-unstable/src/commands/README.md')
-rw-r--r--examples/redis-unstable/src/commands/README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/redis-unstable/src/commands/README.md b/examples/redis-unstable/src/commands/README.md
new file mode 100644
index 0000000..5ef9a3f
--- /dev/null
+++ b/examples/redis-unstable/src/commands/README.md
@@ -0,0 +1,15 @@
+This directory contains JSON files, one for each of Redis commands.
+
+Each JSON contains all the information about the command itself, but these JSON files are not to be used directly!
+Any third party who needs access to command information must get it from `COMMAND INFO` and `COMMAND DOCS`.
+The output can be extracted in a JSON format by using `redis-cli --json`, in the same manner as in `utils/generate-commands-json.py`.
+
+The JSON files are used to generate commands.def (and https://github.com/redis/redis-doc/blob/master/commands.json) in Redis, and
+despite looking similar to the output of `COMMAND` there are some fields and flags that are implicitly populated, and that's the
+reason one shouldn't rely on the raw files.
+
+The structure of each JSON is somewhat documented in https://redis.io/commands/command-docs/ and https://redis.io/commands/command/
+
+The `reply_schema` section is a standard JSON Schema (see https://json-schema.org/) that describes the reply of each command.
+It is designed to someday be used to auto-generate code in client libraries, but is not yet mature and is not exposed externally.
+