Skip to content

Commit d4b65e8

Browse files
committed
Update docs
1 parent 1404d59 commit d4b65e8

File tree

17 files changed

+192
-169
lines changed

17 files changed

+192
-169
lines changed

.scribe/.filemtimes

Lines changed: 2 additions & 2 deletions
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=1622334857
4-
.scribe/authentication.md=1622334857
3+
.scribe/index.md=1622336665
4+
.scribe/authentication.md=1622336665

.scribe/endpoints.cache/1.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ endpoints:
6262
name: description
6363
description: 'A longer description of your side project. The value must not be greater than 255 characters.'
6464
required: false
65-
example: szzvblztjfkdcmbnyysgwaagmzzqsujuvpbfznqhdmixenuexclndzcqzufmzfuqiwccyiaskjwvgupofzwbgfpegblnuzsqqpbqgsgfgujnefakxbecccbmogvbydjszntyazlkgsgsuhzyqiedsqyvwgepiotomphpxrfgxkhgeqpwtjtnkguxdbmuwsscywbgmerhulfvznigtfezrgmmngkmltynhsenqenrgwhpklflyedqiwuhkcyy
65+
example: fgjbfzbzhamascqffkukusyxpfhhnexibriqgoylogtkynblcsjszzfmuiyixsoborxcppjuwtwugoxonwehwavbbmbycmufnnqlatfoqoxlylkouuojexovacalpbjnuwnmbcbgnwqidmlgcgplkzzbf
6666
type: string
6767
url:
6868
name: url
6969
description: 'A url to your side project. The value must be a valid URL.'
7070
required: false
71-
example: 'http://www.lemke.info/id-nihil-earum-minima-ea-quis-tempora.html'
71+
example: 'http://www.bayer.org/architecto-laudantium-perferendis-doloribus-sint'
7272
type: string
7373
due_at:
7474
name: due_at
7575
description: 'Due date for the side project. The value must be a valid date. The value must be a valid date in the format Ymd. The value must be a date after <code>today</code>.'
7676
required: false
77-
example: '2062-01-04'
77+
example: '2112-08-03'
7878
type: string
7979
responses: []
8080
responseFields: []
@@ -105,7 +105,7 @@ endpoints:
105105
responses:
106106
-
107107
status: 200
108-
content: '{"data":{"name":"voluptatem mollitia odit","description":"Atque molestiae soluta libero vitae pariatur at.","due_date":"20240222","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"}}}'
108+
content: '{"data":{"name":"omnis facere quia","description":"Porro atque exercitationem aspernatur doloribus reiciendis quo repellendus.","due_date":"20280807","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"}}}'
109109
headers: []
110110
description: null
111111
responseFields: []
@@ -126,7 +126,7 @@ endpoints:
126126
name: id
127127
description: 'The ID of the side project.'
128128
required: true
129-
example: 3
129+
example: 4
130130
type: integer
131131
queryParameters: []
132132
bodyParameters: []
@@ -148,7 +148,7 @@ endpoints:
148148
name: id
149149
description: 'The ID of the side project.'
150150
required: true
151-
example: 16
151+
example: 6
152152
type: integer
153153
queryParameters: []
154154
bodyParameters: []

.scribe/endpoints.cache/2.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ endpoints:
2121
name: name
2222
description: 'The value must be at least 1 characters. The value must not be greater than 255 characters.'
2323
required: true
24-
example: smwrfzagusffdunbvldexcnxwwlekvhhzuadousqjqlzhfjyrjieurdsegqxaadncagszmgajcaoasevirpdknbggkemhnvgupmxxqfwbfkkpitdcjcowrrajpflaltrcdwfnicxxibboaqtkqr
24+
example: meinzggvhunivpobtwkftopruribdemrysmmuudebsbyazghwgwjlslewevcvocfftaryqiuqxlfbbyguukraxzd
2525
type: string
2626
email:
2727
name: email
2828
description: 'The value must be a valid email address.'
2929
required: true
30-
example: lemke.jillian@example.com
30+
example: shanahan.bridie@example.net
3131
type: string
3232
password:
3333
name: password
3434
description: ''
3535
required: true
36-
example: nemo
36+
example: magni
3737
type: string
3838
responses: []
3939
responseFields: []
@@ -55,14 +55,14 @@ endpoints:
5555
name: id
5656
description: 'The ID of the user.'
5757
required: true
58-
example: 8
58+
example: 4
5959
type: integer
6060
queryParameters: []
6161
bodyParameters: []
6262
responses:
6363
-
6464
status: 200
65-
content: '{"data":{"id":6,"name":"Alvina Krajcik","email":"rhoda22@example.net","side_projects":[{"id":10,"name":"labore neque necessitatibus","description":"Et omnis occaecati aut ab porro est qui harum.","url":null,"due_at":"20250126","created_at":"2021-05-30T00:34:17.000000Z","updated_at":"2021-05-30T00:34:17.000000Z","user_id":"6"}]}}'
65+
content: '{"data":{"id":6,"name":"Maximillia Stracke","email":"schaefer.marielle@example.net","side_projects":[{"id":10,"name":"et eaque in","description":"Error et mollitia pariatur enim.","url":null,"due_at":"20281002","created_at":"2021-05-30T01:04:25.000000Z","updated_at":"2021-05-30T01:04:25.000000Z","user_id":"6"}]}}'
6666
headers: []
6767
description: null
6868
-
@@ -137,7 +137,7 @@ endpoints:
137137
name: id
138138
description: 'The ID of the user.'
139139
required: true
140-
example: 11
140+
example: 14
141141
type: integer
142142
queryParameters: []
143143
bodyParameters: []

.scribe/endpoints/1.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ endpoints:
6060
name: description
6161
description: 'A longer description of your side project. The value must not be greater than 255 characters.'
6262
required: false
63-
example: szzvblztjfkdcmbnyysgwaagmzzqsujuvpbfznqhdmixenuexclndzcqzufmzfuqiwccyiaskjwvgupofzwbgfpegblnuzsqqpbqgsgfgujnefakxbecccbmogvbydjszntyazlkgsgsuhzyqiedsqyvwgepiotomphpxrfgxkhgeqpwtjtnkguxdbmuwsscywbgmerhulfvznigtfezrgmmngkmltynhsenqenrgwhpklflyedqiwuhkcyy
63+
example: fgjbfzbzhamascqffkukusyxpfhhnexibriqgoylogtkynblcsjszzfmuiyixsoborxcppjuwtwugoxonwehwavbbmbycmufnnqlatfoqoxlylkouuojexovacalpbjnuwnmbcbgnwqidmlgcgplkzzbf
6464
type: string
6565
url:
6666
name: url
6767
description: 'A url to your side project. The value must be a valid URL.'
6868
required: false
69-
example: 'http://www.lemke.info/id-nihil-earum-minima-ea-quis-tempora.html'
69+
example: 'http://www.bayer.org/architecto-laudantium-perferendis-doloribus-sint'
7070
type: string
7171
due_at:
7272
name: due_at
7373
description: 'Due date for the side project. The value must be a valid date. The value must be a valid date in the format Ymd. The value must be a date after <code>today</code>.'
7474
required: false
75-
example: '2062-01-04'
75+
example: '2112-08-03'
7676
type: string
7777
responses: []
7878
responseFields: []
@@ -103,7 +103,7 @@ endpoints:
103103
responses:
104104
-
105105
status: 200
106-
content: '{"data":{"name":"voluptatem mollitia odit","description":"Atque molestiae soluta libero vitae pariatur at.","due_date":"20240222","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"}}}'
106+
content: '{"data":{"name":"omnis facere quia","description":"Porro atque exercitationem aspernatur doloribus reiciendis quo repellendus.","due_date":"20280807","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"}}}'
107107
headers: []
108108
description: null
109109
responseFields: []
@@ -124,7 +124,7 @@ endpoints:
124124
name: id
125125
description: 'The ID of the side project.'
126126
required: true
127-
example: 3
127+
example: 4
128128
type: integer
129129
queryParameters: []
130130
bodyParameters: []
@@ -146,7 +146,7 @@ endpoints:
146146
name: id
147147
description: 'The ID of the side project.'
148148
required: true
149-
example: 16
149+
example: 6
150150
type: integer
151151
queryParameters: []
152152
bodyParameters: []

.scribe/endpoints/2.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ endpoints:
1919
name: name
2020
description: 'The value must be at least 1 characters. The value must not be greater than 255 characters.'
2121
required: true
22-
example: smwrfzagusffdunbvldexcnxwwlekvhhzuadousqjqlzhfjyrjieurdsegqxaadncagszmgajcaoasevirpdknbggkemhnvgupmxxqfwbfkkpitdcjcowrrajpflaltrcdwfnicxxibboaqtkqr
22+
example: meinzggvhunivpobtwkftopruribdemrysmmuudebsbyazghwgwjlslewevcvocfftaryqiuqxlfbbyguukraxzd
2323
type: string
2424
email:
2525
name: email
2626
description: 'The value must be a valid email address.'
2727
required: true
28-
example: lemke.jillian@example.com
28+
example: shanahan.bridie@example.net
2929
type: string
3030
password:
3131
name: password
3232
description: ''
3333
required: true
34-
example: nemo
34+
example: magni
3535
type: string
3636
responses: []
3737
responseFields: []
@@ -53,14 +53,14 @@ endpoints:
5353
name: id
5454
description: 'The ID of the user.'
5555
required: true
56-
example: 8
56+
example: 4
5757
type: integer
5858
queryParameters: []
5959
bodyParameters: []
6060
responses:
6161
-
6262
status: 200
63-
content: '{"data":{"id":6,"name":"Alvina Krajcik","email":"rhoda22@example.net","side_projects":[{"id":10,"name":"labore neque necessitatibus","description":"Et omnis occaecati aut ab porro est qui harum.","url":null,"due_at":"20250126","created_at":"2021-05-30T00:34:17.000000Z","updated_at":"2021-05-30T00:34:17.000000Z","user_id":"6"}]}}'
63+
content: '{"data":{"id":6,"name":"Maximillia Stracke","email":"schaefer.marielle@example.net","side_projects":[{"id":10,"name":"et eaque in","description":"Error et mollitia pariatur enim.","url":null,"due_at":"20281002","created_at":"2021-05-30T01:04:25.000000Z","updated_at":"2021-05-30T01:04:25.000000Z","user_id":"6"}]}}'
6464
headers: []
6565
description: null
6666
-
@@ -135,7 +135,7 @@ endpoints:
135135
name: id
136136
description: 'The ID of the user.'
137137
required: true
138-
example: 11
138+
example: 14
139139
type: integer
140140
queryParameters: []
141141
bodyParameters: []

.scribe/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Start (and never finish) side projects with this API.
44

5-
This documentation aims to provide all the information you need to work with our API.
5+
The SideProject API is a sample API, built to demonstrate Scribe's capabilities.
6+
7+
Lke many side projects, it is itself an unfinished API, but hopefully it should be enough to convince you to try Scribe out.😉 You can check out the source code [on GitHub](https://github.com/knuckleswtf/TheSideProjectAPI/).
68

79
<aside class="success">Example of aside with class=success.</aside>
810
<aside class="warning">Example of aside with class=warning.</aside>
911

10-
This is an unfinished API (get it?), but hopefully it should be enough to convince you to try Scribe out.😉
11-
1212
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
1313
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
1414

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# The SideProject API
22

3-
Sample API to demonstrate Scribe's API documentation capabilities. See the docs at [sample.scribe.knuckles.wtf](http://sample.scribe.knuckles.wtf).
3+
Sample (Laravel) API to demonstrate [Scribe's](http://scribe.knuckles.wtf) API documentation capabilities. See the docs at [sample.scribe.knuckles.wtf](http://sample.scribe.knuckles.wtf).
4+
5+
6+
The docs are built with `php artisan scribe:generate`, and then moved into the docs/ folder, so that GitHub Pages can work with them. This two-step process is handled with the `composer docs` command.

app/Http/Controllers/SideProjectController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace App\Http\Controllers;
44

5-
use App\Http\Transformers\BadWordTransformer;
65
use App\Http\Transformers\SideProjectTransformer;
76
use App\Models\SideProject;
87
use Illuminate\Http\Request;

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
],
5353
"post-create-project-cmd": [
5454
"@php artisan key:generate --ansi"
55+
],
56+
"docs": [
57+
"@php artisan scribe:generate",
58+
"@php copy-docs-for-gh-pages.php"
5559
]
5660
},
5761
"extra": {

copy-docs-for-gh-pages.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
@mkdir('docs/css', 0777, true);
4+
@mkdir('docs/js', 0777, true);
5+
@mkdir('docs/images', 0777, true);
6+
7+
foreach(glob("public/docs/*.*") as $file) {
8+
print_r($file, str_replace("public/", "", $file)."\n");
9+
copy($file, str_replace("public/", "", $file));
10+
}
11+
foreach(glob("public/docs/*/*.*") as $file) {
12+
print_r($file, str_replace("public/", "", $file)."\n");
13+
copy($file, str_replace("public/", "", $file));
14+
}
15+
16+
file_put_contents("docs/CNAME", "sample.scribe.knuckles.wtf");
17+
echo "Copied docs for GH pages";

0 commit comments

Comments
 (0)