Skip to content

Commit 0e0e47b

Browse files
committed
Add Ruby example
1 parent ef096c7 commit 0e0e47b

File tree

11 files changed

+430
-286
lines changed

11 files changed

+430
-286
lines changed

.scribe/.filehashes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
22
# Scribe uses this file to know when you change something manually in your docs.
3-
.scribe/index.md=64f1cd5ab919e7da2c8d8a2e8a6eafdf
3+
.scribe/index.md=c8cb5fa262a4e2884e5c37d0ebead040
44
.scribe/authentication.md=325963d01b9a982f33c1f72830d5786d

.scribe/endpoints.cache/1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ endpoints:
5858
name: name
5959
description: 'The name of your side project. Must not be greater than 80 characters.'
6060
required: true
61-
example: '"The SideProject API"'
61+
example: 'The SideProject API'
6262
type: string
6363
description:
6464
name: description

.scribe/endpoints.cache/2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ endpoints:
6262
responses:
6363
-
6464
status: 200
65-
content: '{"data":{"id":6,"name":"Dr. Kallie Schroeder","email":"[email protected]","side_projects":[{"id":10,"name":"similique et et","description":"Odit molestiae non est nostrum sunt.","url":null,"due_at":"20221026","created_at":"2021-06-01T13:45:30.000000Z","updated_at":"2021-06-01T13:45:30.000000Z","user_id":"6"}]}}'
65+
content: '{"data":{"id":6,"name":"Dr. Kallie Schroeder","email":"[email protected]","side_projects":[{"id":10,"name":"similique et et","description":"Odit molestiae non est nostrum sunt.","url":null,"due_at":"20221027","created_at":"2021-06-01T16:38:10.000000Z","updated_at":"2021-06-01T16:38:10.000000Z","user_id":"6"}]}}'
6666
headers: []
6767
description: null
6868
-

.scribe/endpoints/1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endpoints:
5656
name: name
5757
description: 'The name of your side project. Must not be greater than 80 characters.'
5858
required: true
59-
example: '"The SideProject API"'
59+
example: 'The SideProject API'
6060
type: string
6161
description:
6262
name: description

.scribe/endpoints/2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ endpoints:
6060
responses:
6161
-
6262
status: 200
63-
content: '{"data":{"id":6,"name":"Dr. Kallie Schroeder","email":"[email protected]","side_projects":[{"id":10,"name":"similique et et","description":"Odit molestiae non est nostrum sunt.","url":null,"due_at":"20221026","created_at":"2021-06-01T13:45:30.000000Z","updated_at":"2021-06-01T13:45:30.000000Z","user_id":"6"}]}}'
63+
content: '{"data":{"id":6,"name":"Dr. Kallie Schroeder","email":"[email protected]","side_projects":[{"id":10,"name":"similique et et","description":"Odit molestiae non est nostrum sunt.","url":null,"due_at":"20221027","created_at":"2021-06-01T16:38:10.000000Z","updated_at":"2021-06-01T16:38:10.000000Z","user_id":"6"}]}}'
6464
headers: []
6565
description: null
6666
-

.scribe/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ You can switch the language used with the tabs at the top right (or from the nav
1515
> Base URL
1616
1717
```yaml
18-
http://sideprojects.knuckles.wtf
18+
http://testapi.com
1919
```

app/Http/Controllers/SideProjectController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function index()
4242
public function store(Request $request)
4343
{
4444
$validated = $request->validate([
45-
// The name of your side project. Example: "The SideProject API"
45+
// The name of your side project. Example: The SideProject API
4646
'name' => 'string|max:80|required',
4747
// A longer description of your side project.
4848
'description' => 'string|max:255',

config/scribe.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/*
2020
* The base URL displayed in the docs. If this is empty, Scribe will use the value of config('app.url').
2121
*/
22-
'base_url' => 'http://sideprojects.knuckles.wtf',
22+
'base_url' => 'http://testapi.com',
2323

2424
/*
2525
* Tell Scribe what routes to generate documentation for.
@@ -260,6 +260,7 @@
260260
'javascript',
261261
'php',
262262
'python',
263+
'ruby',
263264
],
264265

265266
/*

docs/collection.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"key": "baseUrl",
66
"type": "string",
77
"name": "string",
8-
"value": "sideprojects.knuckles.wtf"
8+
"value": "testapi.com"
99
}
1010
],
1111
"info": {
1212
"name": "The SideProject API",
13-
"_postman_id": "52863080-895f-462d-96cf-fbf7d156f6f1",
13+
"_postman_id": "853ce7e2-9158-4216-b6a9-cb651c4fb039",
1414
"description": "Start (and never finish) side projects with this API.",
1515
"schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
1616
},
@@ -156,7 +156,7 @@
156156
],
157157
"body": {
158158
"mode": "raw",
159-
"raw": "{\"name\":\"\\\"The SideProject API\\\"\",\"description\":\"sogdteihlaodtuesxlcjccmumvueaqrzmrjzxagwffmmojyubrekpbmhsbokzkztsiikazrxqdgtonbqleghxiwfoopcjvrhbdacaeylhnfyjkhcptvqkngkengcntvxqlsurucdxvuylbglmeyynmxreohvojahkyqyowxtlewslgeibjfwgyrjovircbjzllbjibvzjcuktprzuszolftzuxeafvmsfkqqsetgbzrjqovztqyxohzmncroo\",\"url\":\"https:\\\/\\\/www.rohan.com\\\/quia-aperiam-alias-qui-facere-vitae\",\"due_at\":\"2087-12-08\"}"
159+
"raw": "{\"name\":\"The SideProject API\",\"description\":\"ovsnvfcwodowljclfphodypoplikvyotjovrjudbmxqvvdlccjyfgdivsjtacjokurmwmxjffismejdaobevyfcbyleqjgqcoefmvdnrazszstfwulwyendppvmxeocdljwpxkslcereqwua\",\"url\":\"http:\\\/\\\/www.smitham.info\\\/consequatur-tempora-aspernatur-officiis-omnis-sed-similique.html\",\"due_at\":\"2077-09-25\"}"
160160
},
161161
"description": "_Even though we both know you'll never finish it._\n\nThis endpoint's body parameters were automatically generated by Scribe\nfrom the controller's code. Check out the source! <\/aside>"
162162
},
@@ -175,7 +175,7 @@
175175
{
176176
"id": "id",
177177
"key": "id",
178-
"value": "9",
178+
"value": "12",
179179
"description": "The ID of the side project."
180180
}
181181
]
@@ -197,7 +197,7 @@
197197
{
198198
"header": [],
199199
"code": 200,
200-
"body": "{\"data\":{\"name\":\"incidunt laudantium cupiditate\",\"description\":\"Accusantium ut dolores debitis ut et.\",\"due_date\":\"20220707\",\"owner\":{\"id\":1,\"name\":\"Pete\",\"email\":\"[email protected]\",\"email_verified_at\":null,\"created_at\":\"2021-05-29T22:53:05.000000Z\",\"updated_at\":\"2021-05-29T22:53:05.000000Z\"}}}",
200+
"body": "{\"data\":{\"name\":\"quo quo molestias\",\"description\":\"Tempora aspernatur officiis omnis sed similique et et.\",\"due_date\":\"20241229\",\"owner\":{\"id\":1,\"name\":\"Pete\",\"email\":\"[email protected]\",\"email_verified_at\":null,\"created_at\":\"2021-05-29T22:53:05.000000Z\",\"updated_at\":\"2021-05-29T22:53:05.000000Z\"}}}",
201201
"name": null
202202
}
203203
]
@@ -215,7 +215,7 @@
215215
{
216216
"id": "id",
217217
"key": "id",
218-
"value": "14",
218+
"value": "12",
219219
"description": "The ID of the side project."
220220
}
221221
]
@@ -248,7 +248,7 @@
248248
{
249249
"id": "id",
250250
"key": "id",
251-
"value": "14",
251+
"value": "12",
252252
"description": "The ID of the side project."
253253
}
254254
]
@@ -293,7 +293,7 @@
293293
],
294294
"body": {
295295
"mode": "raw",
296-
"raw": "{\"name\":\"iyvesjvapprtnqekbbuconazxeqwxsdisrbawwoxwbrpoalydexicizlwatouoarqlvu\",\"email\":\"felipa38@example.net\",\"password\":\"soluta\"}"
296+
"raw": "{\"name\":\"ovsnvfcwodowljclfphodypoplikvyotjovrjudbmxqvvdlccjyfgdivsjtacjokurmwmxjffismejdaobevyfcbyleqjgqcoefmvdnrazszstfwulwyendppvmxeocdljwpxkslcereqwua\",\"email\":\"mckayla50@example.net\",\"password\":\"error\"}"
297297
},
298298
"description": "This endpoint's body parameters are automatically generated from a FormRequest.",
299299
"auth": {
@@ -315,7 +315,7 @@
315315
{
316316
"id": "id",
317317
"key": "id",
318-
"value": "9",
318+
"value": "12",
319319
"description": "The ID of the user."
320320
}
321321
]
@@ -337,7 +337,7 @@
337337
{
338338
"header": [],
339339
"code": 200,
340-
"body": "{\"data\":{\"id\":6,\"name\":\"Waylon Dickinson\",\"email\":\"wfriesen@example.org\",\"side_projects\":[{\"id\":10,\"name\":\"iusto dolor neque\",\"description\":\"Aliquam quia quis ratione iure.\",\"url\":null,\"due_at\":\"20280228\",\"created_at\":\"2021-05-31T16:44:48.000000Z\",\"updated_at\":\"2021-05-31T16:44:48.000000Z\",\"user_id\":\"6\"}]}}",
340+
"body": "{\"data\":{\"id\":6,\"name\":\"Dr. Kallie Schroeder\",\"email\":\"boyle.krista@example.com\",\"side_projects\":[{\"id\":10,\"name\":\"similique et et\",\"description\":\"Odit molestiae non est nostrum sunt.\",\"url\":null,\"due_at\":\"20221027\",\"created_at\":\"2021-06-01T16:38:10.000000Z\",\"updated_at\":\"2021-06-01T16:38:10.000000Z\",\"user_id\":\"6\"}]}}",
341341
"name": null
342342
},
343343
{
@@ -427,7 +427,7 @@
427427
{
428428
"id": "id",
429429
"key": "id",
430-
"value": "4",
430+
"value": "12",
431431
"description": "The ID of the user."
432432
}
433433
]

0 commit comments

Comments
 (0)