Skip to content

Commit c98a2d9

Browse files
Merge pull request #2799 from redis/DOC-6268-api-cmd-map-tool
DOC-6268 infra to map command names to client API calls and display in docs
2 parents 147d4d0 + 01857f5 commit c98a2d9

File tree

609 files changed

+336126
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

609 files changed

+336126
-24
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Command API Mapping
2+
3+
The `data/command-api-mapping/` directory contains individual JSON files mapping Redis commands to their client library method signatures.
4+
5+
## Structure
6+
7+
Each file is named after a Redis command (e.g., `GET.json`, `SET.json`, `BF.ADD.json`) and contains the API mappings for that command:
8+
9+
```json
10+
{
11+
"api_calls": {
12+
"redis_py": [...],
13+
"jedis": [...],
14+
"lettuce_sync": [...],
15+
"lettuce_async": [...],
16+
"lettuce_reactive": [...],
17+
"go-redis": [...],
18+
"node_redis": [...],
19+
"ioredis": [...],
20+
"redis_rs_sync": [...],
21+
"redis_rs_async": [...],
22+
"nredisstack_sync": [...],
23+
"nredisstack_async": [...],
24+
"php": [...]
25+
}
26+
}
27+
```
28+
29+
## Adding a New Command
30+
31+
1. Create a new file named `data/command-api-mapping/COMMAND_NAME.json` (e.g., `MGET.json`)
32+
2. Add the `api_calls` structure with method signatures for each client
33+
3. Run the merge script to generate the combined output
34+
35+
## Merging Files
36+
37+
To combine all individual files into a single `command-api-mapping.json`:
38+
39+
```bash
40+
./build/merge-command-api-mapping.sh # Output to data/command-api-mapping.json
41+
./build/merge-command-api-mapping.sh /path/to/output.json # Output to custom location
42+
```
43+
44+
## Files
45+
46+
- `data/command-api-mapping/*.json` - Individual command mapping files (273 commands)
47+
- `build/merge-command-api-mapping.sh` - Script to combine all files into a single JSON
48+
- `build/command-api-mapping-README.md` - This file
49+

0 commit comments

Comments
 (0)