Skip to content

Commit 2c7f74b

Browse files
committed
Side projects
1 parent 7af42af commit 2c7f74b

File tree

19 files changed

+1000
-6
lines changed

19 files changed

+1000
-6
lines changed

.scribe/.filemtimes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
2+
# Scribe uses this file to know when you change something manually in your docs.
3+
.scribe/index.md=1622334471
4+
.scribe/authentication.md=1622334471

.scribe/authentication.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Authenticating requests
2+
3+
This API is not authenticated.

.scribe/endpoints.cache/0.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Autogenerated by Scribe. DO NOT MODIFY.
2+
3+
name: General
4+
description: ''
5+
endpoints:
6+
-
7+
httpMethods:
8+
- GET
9+
uri: api/healthcheck
10+
metadata:
11+
title: Healthcheck
12+
description: |-
13+
Check that the service is up. If everything is okay, you'll get a 200 OK response.
14+
15+
Otherwise, the request will fail with a 400 error, and a response listing the failed services.
16+
authenticated: false
17+
headers:
18+
Content-Type: application/json
19+
Accept: application/json
20+
urlParameters: []
21+
queryParameters: []
22+
bodyParameters: []
23+
responses:
24+
-
25+
status: 200
26+
content: '{"status":"up","services":{"database":"up","redis":"up"}}'
27+
headers:
28+
cache-control:
29+
- 'no-cache, private'
30+
content-type:
31+
- application/json
32+
x-ratelimit-limit:
33+
- 60
34+
x-ratelimit-remaining:
35+
- 56
36+
access-control-allow-origin:
37+
- '*'
38+
description: null
39+
-
40+
status: 400
41+
content: '{"status": "down", "services": {"database": "up", "redis": "down"}}'
42+
headers: []
43+
description: '400, Service is unhealthy'
44+
responseFields:
45+
status:
46+
name: status
47+
description: 'The status of this API (`up` or `down`).'
48+
type: string
49+
services:
50+
name: services
51+
description: 'Map of each downstream service and their status (`up` or `down`).'
52+
type: object

.scribe/endpoints.cache/1.yaml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
## Autogenerated by Scribe. DO NOT MODIFY.
2+
3+
name: 'Side Projects'
4+
description: ''
5+
endpoints:
6+
-
7+
httpMethods:
8+
- GET
9+
uri: api/side_projects
10+
metadata:
11+
title: 'View all side projects'
12+
description: ''
13+
authenticated: false
14+
headers:
15+
Content-Type: application/json
16+
Accept: application/json
17+
urlParameters: []
18+
queryParameters: []
19+
bodyParameters: []
20+
responses:
21+
-
22+
status: 200
23+
content: '[{"id":1,"name":"voluptas assumenda maiores","description":"Consequuntur aut ea est non.","url":null,"due_at":"20310222","created_at":"2021-05-30T00:21:59.000000Z","updated_at":"2021-05-30T00:21:59.000000Z","user_id":"2"},{"id":2,"name":"iusto ut dolor","description":"Voluptatem aspernatur dolorem quae quaerat harum.","url":null,"due_at":"20301215","created_at":"2021-05-30T00:21:59.000000Z","updated_at":"2021-05-30T00:21:59.000000Z","user_id":"1"},{"id":3,"name":"provident et consequatur","description":"Quos et ipsum cum pariatur ex perspiciatis eius.","url":null,"due_at":"20231022","created_at":"2021-05-30T00:23:25.000000Z","updated_at":"2021-05-30T00:23:25.000000Z","user_id":"3"},{"id":4,"name":"corporis consequuntur amet","description":"Dolores eveniet deleniti voluptatem saepe expedita.","url":null,"due_at":"20230712","created_at":"2021-05-30T00:23:25.000000Z","updated_at":"2021-05-30T00:23:25.000000Z","user_id":"1"},{"id":5,"name":"optio excepturi ea","description":"Error deleniti sint a nostrum consequuntur et.","url":null,"due_at":"20260324","created_at":"2021-05-30T00:24:27.000000Z","updated_at":"2021-05-30T00:24:27.000000Z","user_id":"4"},{"id":6,"name":"nihil voluptate quaerat","description":"Animi reprehenderit soluta id quo.","url":null,"due_at":"20290603","created_at":"2021-05-30T00:24:27.000000Z","updated_at":"2021-05-30T00:24:27.000000Z","user_id":"1"},{"id":7,"name":"aspernatur architecto assumenda","description":"Nisi ea aut vel sint vero voluptas tempore.","url":null,"due_at":"20280710","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"5"},{"id":8,"name":"vel perspiciatis quo","description":"Et qui praesentium consequatur distinctio natus.","url":null,"due_at":"20210605","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"1"},{"id":9,"name":"qui et totam","description":"Veritatis quo dolorum soluta ut.","url":null,"due_at":"20270203","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"1"}]'
24+
headers:
25+
cache-control:
26+
- 'no-cache, private'
27+
content-type:
28+
- application/json
29+
x-ratelimit-limit:
30+
- 60
31+
x-ratelimit-remaining:
32+
- 54
33+
access-control-allow-origin:
34+
- '*'
35+
description: null
36+
responseFields: []
37+
-
38+
httpMethods:
39+
- POST
40+
uri: api/side_projects
41+
metadata:
42+
title: 'Start a new side project'
43+
description: |-
44+
_Even though we both know you'll never finish it._
45+
46+
This endpoint's body parameters were automatically generated by Scribe
47+
from the controller's code. Check out the source! </aside>
48+
authenticated: true
49+
headers:
50+
Content-Type: application/json
51+
Accept: application/json
52+
urlParameters: []
53+
queryParameters: []
54+
bodyParameters:
55+
name:
56+
name: name
57+
description: 'The name of your side project. The value must not be greater than 80 characters.'
58+
required: true
59+
example: '"The SideProject API"'
60+
type: string
61+
description:
62+
name: description
63+
description: 'A longer description of your side project. The value must not be greater than 255 characters.'
64+
required: false
65+
example: dnrllzuojuojsfdgxmtkywbhcumnxqrw
66+
type: string
67+
url:
68+
name: url
69+
description: 'A url to your side project. The value must be a valid URL.'
70+
required: false
71+
example: 'http://wilkinson.com/molestiae-ut-repellendus-a.html'
72+
type: string
73+
due_at:
74+
name: due_at
75+
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>.'
76+
required: false
77+
example: '2061-08-18'
78+
type: string
79+
responses: []
80+
responseFields: []
81+
-
82+
httpMethods:
83+
- GET
84+
uri: 'api/side_projects/{id}'
85+
metadata:
86+
title: 'View a side project'
87+
description: |-
88+
This endpoint's response uses a Fractal transformer, so we tell Scribe that using an annotation,
89+
and it figures out how to generate a sample. The 404 sample is gotten from a "response file".
90+
91+
<aside class="success">Also, pretty cool: this endpoint's (and many others') URL parameters were figured out entirely by Scribe!</aside>
92+
authenticated: false
93+
headers:
94+
Content-Type: application/json
95+
Accept: application/json
96+
urlParameters:
97+
id:
98+
name: id
99+
description: 'The ID of the side project.'
100+
required: true
101+
example: 8
102+
type: integer
103+
queryParameters: []
104+
bodyParameters: []
105+
responses:
106+
-
107+
status: 200
108+
content: '{"data":{"name":"magnam consequatur fugit","description":"Sapiente nesciunt impedit et doloremque consectetur fugiat debitis perferendis.","due_date":"20280607","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"}}}'
109+
headers: []
110+
description: null
111+
responseFields: []
112+
-
113+
httpMethods:
114+
- PUT
115+
- PATCH
116+
uri: 'api/side_projects/{id}'
117+
metadata:
118+
title: 'Update the specified resource in storage.'
119+
description: ''
120+
authenticated: false
121+
headers:
122+
Content-Type: application/json
123+
Accept: application/json
124+
urlParameters:
125+
id:
126+
name: id
127+
description: 'The ID of the side project.'
128+
required: true
129+
example: 7
130+
type: integer
131+
queryParameters: []
132+
bodyParameters: []
133+
responses: []
134+
responseFields: []
135+
-
136+
httpMethods:
137+
- DELETE
138+
uri: 'api/side_projects/{id}'
139+
metadata:
140+
title: 'Remove the specified resource from storage.'
141+
description: ''
142+
authenticated: false
143+
headers:
144+
Content-Type: application/json
145+
Accept: application/json
146+
urlParameters:
147+
id:
148+
name: id
149+
description: 'The ID of the side project.'
150+
required: true
151+
example: 14
152+
type: integer
153+
queryParameters: []
154+
bodyParameters: []
155+
responses: []
156+
responseFields: []

.scribe/endpoints.cache/2.yaml

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
## Autogenerated by Scribe. DO NOT MODIFY.
2+
3+
name: Users
4+
description: ''
5+
endpoints:
6+
-
7+
httpMethods:
8+
- POST
9+
uri: api/users
10+
metadata:
11+
title: 'Create a user'
12+
description: 'This endpoint''s body parameters are automatically generated from a FormRequest.'
13+
authenticated: false
14+
headers:
15+
Content-Type: application/json
16+
Accept: application/json
17+
urlParameters: []
18+
queryParameters: []
19+
bodyParameters:
20+
name:
21+
name: name
22+
description: 'The value must be at least 1 characters. The value must not be greater than 255 characters.'
23+
required: true
24+
example: orregrvsahjxxbbazsqbayaljjwdmkuyokpezwnrxiyaqdyavlphcnyhqrurjjgjmvzjfsdbrcjrcrunrnveaaqednmgohqfdukuivvlziwofjsytyq
25+
type: string
26+
email:
27+
name: email
28+
description: 'The value must be a valid email address.'
29+
required: true
30+
31+
type: string
32+
password:
33+
name: password
34+
description: ''
35+
required: true
36+
example: dolores
37+
type: string
38+
responses: []
39+
responseFields: []
40+
-
41+
httpMethods:
42+
- GET
43+
uri: 'api/users/{id}'
44+
metadata:
45+
title: 'Fetch a user'
46+
description: |-
47+
This endpoint's response uses an Eloquent API resource, so we tell Scribe that using an annotation,
48+
and it figures out how to generate a sample. The 404 sample is gotten from a "response file".
49+
authenticated: false
50+
headers:
51+
Content-Type: application/json
52+
Accept: application/json
53+
urlParameters:
54+
id:
55+
name: id
56+
description: 'The ID of the user.'
57+
required: true
58+
example: 11
59+
type: integer
60+
queryParameters: []
61+
bodyParameters: []
62+
responses:
63+
-
64+
status: 200
65+
content: '{"data":{"id":6,"name":"Ron Legros","email":"[email protected]","side_projects":[{"id":10,"name":"est quam magnam","description":"Sed harum voluptatibus et ut.","url":null,"due_at":"20290415","created_at":"2021-05-30T00:27:50.000000Z","updated_at":"2021-05-30T00:27:50.000000Z","user_id":"6"}]}}'
66+
headers: []
67+
description: null
68+
-
69+
status: 404
70+
content: '{"message":"Not found","resource":"user"}'
71+
headers: []
72+
description: '404, User not found'
73+
responseFields: []
74+
-
75+
httpMethods:
76+
- GET
77+
uri: api/users
78+
metadata:
79+
title: 'View all users'
80+
description: |-
81+
This endpoint uses a custom Scribe strategy that parses a
82+
`@usesPagination` annotation to add some query parameters.
83+
84+
The sample response is gotten by Scribe making a test API call (aka "response call").
85+
authenticated: false
86+
headers:
87+
Content-Type: application/json
88+
Accept: application/json
89+
urlParameters: []
90+
queryParameters:
91+
page:
92+
name: page
93+
description: 'Page number to return.'
94+
required: false
95+
example: 1
96+
type: string
97+
pageSize:
98+
name: pageSize
99+
description: 'Number of items to return in a page. Defaults to 10.'
100+
required: false
101+
example: null
102+
type: string
103+
bodyParameters: []
104+
responses:
105+
-
106+
status: 200
107+
content: '{"data":[{"id":1,"name":"Pete","email":"[email protected]","side_projects":[{"id":2,"name":"iusto ut dolor","description":"Voluptatem aspernatur dolorem quae quaerat harum.","url":null,"due_at":"20301215","created_at":"2021-05-30T00:21:59.000000Z","updated_at":"2021-05-30T00:21:59.000000Z","user_id":"1"},{"id":4,"name":"corporis consequuntur amet","description":"Dolores eveniet deleniti voluptatem saepe expedita.","url":null,"due_at":"20230712","created_at":"2021-05-30T00:23:25.000000Z","updated_at":"2021-05-30T00:23:25.000000Z","user_id":"1"},{"id":6,"name":"nihil voluptate quaerat","description":"Animi reprehenderit soluta id quo.","url":null,"due_at":"20290603","created_at":"2021-05-30T00:24:27.000000Z","updated_at":"2021-05-30T00:24:27.000000Z","user_id":"1"},{"id":8,"name":"vel perspiciatis quo","description":"Et qui praesentium consequatur distinctio natus.","url":null,"due_at":"20210605","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"1"},{"id":9,"name":"qui et totam","description":"Veritatis quo dolorum soluta ut.","url":null,"due_at":"20270203","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"1"}]},{"id":2,"name":"Alexane Weber","email":"[email protected]","side_projects":[{"id":1,"name":"voluptas assumenda maiores","description":"Consequuntur aut ea est non.","url":null,"due_at":"20310222","created_at":"2021-05-30T00:21:59.000000Z","updated_at":"2021-05-30T00:21:59.000000Z","user_id":"2"}]},{"id":3,"name":"John Kshlerin II","email":"[email protected]","side_projects":[{"id":3,"name":"provident et consequatur","description":"Quos et ipsum cum pariatur ex perspiciatis eius.","url":null,"due_at":"20231022","created_at":"2021-05-30T00:23:25.000000Z","updated_at":"2021-05-30T00:23:25.000000Z","user_id":"3"}]},{"id":4,"name":"Rebeca Morissette","email":"[email protected]","side_projects":[{"id":5,"name":"optio excepturi ea","description":"Error deleniti sint a nostrum consequuntur et.","url":null,"due_at":"20260324","created_at":"2021-05-30T00:24:27.000000Z","updated_at":"2021-05-30T00:24:27.000000Z","user_id":"4"}]},{"id":5,"name":"Prof. Adah Witting IV","email":"[email protected]","side_projects":[{"id":7,"name":"aspernatur architecto assumenda","description":"Nisi ea aut vel sint vero voluptas tempore.","url":null,"due_at":"20280710","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"5"}]}]}'
108+
headers:
109+
cache-control:
110+
- 'no-cache, private'
111+
content-type:
112+
- application/json
113+
x-ratelimit-limit:
114+
- 60
115+
x-ratelimit-remaining:
116+
- 55
117+
access-control-allow-origin:
118+
- '*'
119+
description: null
120+
responseFields: []
121+
-
122+
httpMethods:
123+
- POST
124+
uri: 'api/users/{id}/auth'
125+
metadata:
126+
title: Authenticate
127+
description: |-
128+
Get a new API token.
129+
130+
<aside>Yes, we know you can impersonate any user.🙄</aside>
131+
authenticated: false
132+
headers:
133+
Content-Type: application/json
134+
Accept: application/json
135+
urlParameters:
136+
id:
137+
name: id
138+
description: 'The ID of the user.'
139+
required: true
140+
example: 9
141+
type: integer
142+
queryParameters: []
143+
bodyParameters: []
144+
responses:
145+
-
146+
status: 200
147+
content: '{"token": "2|KLDoUXc68Ko0JaFDZoX9qYkUqWglwdGxQsvTGBCg"}'
148+
headers: []
149+
description: '200'
150+
responseFields:
151+
token:
152+
name: token
153+
description: 'The new API token. Valid forever.'
154+
type: string

0 commit comments

Comments
 (0)