Skip to content

Commit 373e9e6

Browse files
authored
Merge pull request #80 from codecrafters-io/andy/fix
Fix typo: correlation_id in #pv1
2 parents f0f92de + 74dd771 commit 373e9e6

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

stage_descriptions/base-05-pv1.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,25 @@ We've created an interactive protocol inspector to help you visualize the reques
99
- 🔎 [ApiVersions Request (v4)](https://binspec.org/kafka-api-versions-request-v4)
1010
- 🔎 [ApiVersions Response (v4)](https://binspec.org/kafka-api-versions-Response-v4)
1111

12-
1312
### The `ApiVersions` Response Body
1413

1514
The `ApiVersions` response body (v4) has the following structure:
1615

17-
| Field | Data type | Description |
18-
| ------------------ | -------------- | ---------------------------------------------- |
19-
| `error_code` | `INT16` | Error code (`0` for successful requests) |
20-
| `api_keys` | `COMPACT_ARRAY`| Array of supported APIs with version ranges |
21-
| `throttle_time_ms` | `INT32` | Throttle time in milliseconds |
22-
| `TAG_BUFFER` | `TAGGED_FIELDS`| Optional tagged fields |
16+
| Field | Data type | Description |
17+
| ------------------ | --------------- | ------------------------------------------- |
18+
| `error_code` | `INT16` | Error code (`0` for successful requests) |
19+
| `api_keys` | `COMPACT_ARRAY` | Array of supported APIs with version ranges |
20+
| `throttle_time_ms` | `INT32` | Throttle time in milliseconds |
21+
| `TAG_BUFFER` | `TAGGED_FIELDS` | Optional tagged fields |
2322

2423
Each entry in the `api_keys` array contains:
2524

26-
| Field | Data type | Description |
27-
| -------------- | --------------- | ------------------------------ |
28-
| `api_key` | `INT16` | The API identifier |
29-
| `min_version` | `INT16` | Minimum supported version |
30-
| `max_version` | `INT16` | Maximum supported version |
31-
| `TAG_BUFFER` | `TAGGED_FIELDS` | Optional tagged fields |
25+
| Field | Data type | Description |
26+
| ------------- | --------------- | ------------------------- |
27+
| `api_key` | `INT16` | The API identifier |
28+
| `min_version` | `INT16` | Minimum supported version |
29+
| `max_version` | `INT16` | Maximum supported version |
30+
| `TAG_BUFFER` | `TAGGED_FIELDS` | Optional tagged fields |
3231

3332
For this stage, your response must include at least one entry for API key `18` (ApiVersions) with a `min_version` of `0` and `max_version` of `4`.
3433

@@ -69,24 +68,19 @@ Here's what the request looks like:
6968
00 00 00 1a // message_size: 26
7069
00 12 // request_api_key: 18 (ApiVersions)
7170
00 04 // request_api_version: 4
72-
67 89 0a bc // correlation_id: 1736982204
71+
67 89 0a bc // correlation_id: 1737034428
7372
... // rest of header and body
7473
```
7574

7675
The tester will validate your response by checking that:
7776

7877
- The `message_size` field correctly represents the size of the header and body.
7978
- The correlation ID in the response header matches the correlation ID in the request header.
80-
- The `error_code` in the response body `0`.
79+
- The `error_code` in the response body is `0`.
8180
- The response includes an entry for API key `18` (ApiVersions), where the `min_version` is `0` and the `max_version` is `4`.
8281
- No extra bytes remain after decoding all response fields.
8382

8483
### Notes
8584

8685
- The tester will always send you v4 of the `ApiVersions` request.
8786
- From this stage onwards, the tester will start validating the first 4 bytes of your response (the `message_size`) in addition to the other checks.
88-
89-
90-
91-
92-

0 commit comments

Comments
 (0)