The command reply schema something can be depends on different arguments or conditions, and we would like to have a way to formalize such conditions in the reply schema.
We suggest adding a "condition" field to anyOf/oneOf schemas that refers to args. E.g. when SET returns NULL, the condition is arguments.get||arguments.condition, for OK the condition is !arguments.get, and for string the condition is arguments.get.
See the discussion in Reply schema PR - https://github.com/redis/redis/pull/10273#issuecomment-1346014720 - https://github.com/redis/redis/pull/10273#issuecomment-1371144589 - https://github.com/redis/redis/pull/10273#issuecomment-1371211255