You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add RequestExample/ResponseExample components to API docs and sidebar anchors
Migrate inline example request/response blocks to RequestExample and
ResponseExample MDX components with tabbed cURL/JavaScript/Python samples.
Add anchors config to docs-config.json for section-based sidebar switching.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: api/get-posts-id-comments.mdx
+57-21Lines changed: 57 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,27 +42,6 @@ Returns an array of comment objects.
42
42
Content of the comment
43
43
</ResponseField>
44
44
45
-
## Example Response
46
-
47
-
```json
48
-
[
49
-
{
50
-
"postId": 1,
51
-
"id": 1,
52
-
"name": "id labore ex et quam laborum",
53
-
"email": "Eliseo@gardner.biz",
54
-
"body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium"
55
-
},
56
-
{
57
-
"postId": 1,
58
-
"id": 2,
59
-
"name": "quo vero reiciendis velit similique earum",
60
-
"email": "Jayne_Kuhic@sydney.com",
61
-
"body": "est natus enim nihil est dolore omnis voluptatem numquam\net omnis occaecati quod ullam at\nvoluptatem error expedita pariatur\nnihil sint nostrum voluptatem reiciendis et"
62
-
}
63
-
]
64
-
```
65
-
66
45
## Related Endpoints
67
46
68
47
<Cardtitle="Get Post Details"href="/api/get-posts-id"icon="lucide:file-text">
@@ -74,3 +53,60 @@ Returns an array of comment objects.
74
53
| Status | Description |
75
54
|--------|-------------|
76
55
|`404`| Post not found - the specified post ID does not exist |
56
+
57
+
<RequestExample>
58
+
<Tabsitems={["cURL", "JavaScript", "Python"]}>
59
+
<Tabtitle="cURL">
60
+
```bash
61
+
curl -X GET "https://jsonplaceholder.typicode.com/posts/1/comments"
"body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium"
93
+
},
94
+
{
95
+
"postId": 1,
96
+
"id": 2,
97
+
"name": "quo vero reiciendis velit similique earum",
98
+
"email": "Jayne_Kuhic@sydney.com",
99
+
"body": "est natus enim nihil est dolore omnis voluptatem numquam\net omnis occaecati quod ullam at\nvoluptatem error expedita pariatur\nnihil sint nostrum voluptatem reiciendis et"
Copy file name to clipboardExpand all lines: api/get-posts-id.mdx
+47-11Lines changed: 47 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,17 +36,6 @@ Retrieves detailed information about a specific blog post.
36
36
Full content of the post
37
37
</ResponseField>
38
38
39
-
## Example Response
40
-
41
-
```json
42
-
{
43
-
"userId": 1,
44
-
"id": 1,
45
-
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
46
-
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
47
-
}
48
-
```
49
-
50
39
## Related Endpoints
51
40
52
41
<CardGroupcols={2}>
@@ -63,3 +52,50 @@ Retrieves detailed information about a specific blog post.
63
52
| Status | Description |
64
53
|--------|-------------|
65
54
|`404`| Post not found - the specified ID does not exist |
55
+
56
+
<RequestExample>
57
+
<Tabsitems={["cURL", "JavaScript", "Python"]}>
58
+
<Tabtitle="cURL">
59
+
```bash
60
+
curl -X GET "https://jsonplaceholder.typicode.com/posts/1"
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
89
+
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
0 commit comments