File tree Expand file tree Collapse file tree 4 files changed +137
-4
lines changed Expand file tree Collapse file tree 4 files changed +137
-4
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ REDIS_PORT=6379
26
26
MAIL_DRIVER = smtp
27
27
MAIL_HOST = smtp.mailtrap.io
28
28
MAIL_PORT = 2525
29
- MAIL_USERNAME = null
30
- MAIL_PASSWORD = null
29
+ MAIL_USERNAME = d88d6fc004652c
30
+ MAIL_PASSWORD = aa997006998217
31
31
MAIL_ENCRYPTION = null
32
32
33
33
PUSHER_APP_ID =
Original file line number Diff line number Diff line change 7
7
* ` ./dev artisan key:generate `
8
8
* ` ./dev artisan migrate `
9
9
10
+ ## API documentation
11
+
12
+ We are using [ Swagger 2] ( https://swagger.io/ ) for documenting all the endpoints. The swagger file is served to the consumers
13
+ via [ readme.io] ( https://dash.readme.io/go/eurides-mobility-shop-api ) . At the moment the file needs to be manually updated
14
+ on Readme after it changes, there is no auto sync.
15
+
16
+ You can use [ editor.swagger.io] ( https://editor.swagger.io/ ) for easier editing this file.
17
+
10
18
## Docker
11
19
12
20
### Installation
Original file line number Diff line number Diff line change 4
4
version : " 1.0.0"
5
5
title : " Eurides API"
6
6
host : " develop.eurides.mwlhq.com"
7
- basePath : " /"
7
+ basePath : " /api "
8
8
schemes :
9
9
- " http"
10
10
paths :
11
+ /signin :
12
+ post :
13
+ tags :
14
+ - " Authentication"
15
+ summary : " Request a passwordless login code via email"
16
+ description : " "
17
+ produces :
18
+ - " application/json"
19
+ parameters :
20
+ - in : " body"
21
+ name : " body"
22
+ description : " Email of the user that needs a login code"
23
+ required : true
24
+ schema :
25
+ type : object
26
+ properties :
27
+ email :
28
+ type : " string"
29
+ example : " john@doe.com"
30
+ responses :
31
+ 200 :
32
+ description : " Email was sent"
33
+ 422 :
34
+ description : " "
35
+ schema :
36
+ $ref : " #/definitions/ErrorResponse"
37
+ /signin/code :
38
+ post :
39
+ tags :
40
+ - " Authentication"
41
+ summary : " Get an access token in exchange for a passwordless login code"
42
+ description : " "
43
+ produces :
44
+ - " application/json"
45
+ parameters :
46
+ - in : " body"
47
+ name : " body"
48
+ description : " Passwordless login code received via email"
49
+ required : true
50
+ schema :
51
+ type : object
52
+ properties :
53
+ code :
54
+ type : " string"
55
+ example : " 1234abcd"
56
+ responses :
57
+ 200 :
58
+ description : " "
59
+ schema :
60
+ type : object
61
+ properties :
62
+ accessToken :
63
+ type : " string"
64
+ example : " abcdefghijklmnopqrstuvwxyz"
65
+ 422 :
66
+ description : " "
67
+ schema :
68
+ $ref : " #/definitions/ErrorResponse"
69
+ /oauth/token :
70
+ post :
71
+ tags :
72
+ - " Authentication"
73
+ summary : " Get an access token using oAuth2 client_credentials grant"
74
+ description : " "
75
+ produces :
76
+ - " application/json"
77
+ parameters :
78
+ - in : " body"
79
+ name : " body"
80
+ description : " Client credentials of the organisation"
81
+ required : true
82
+ schema :
83
+ type : object
84
+ properties :
85
+ grant_type :
86
+ type : " string"
87
+ example : " client_credentials"
88
+ client_id :
89
+ type : " string"
90
+ example : " 1233"
91
+ client_secret :
92
+ type : " string"
93
+ example : " abcd1234"
94
+ responses :
95
+ 200 :
96
+ description : " "
97
+ schema :
98
+ type : object
99
+ properties :
100
+ token_type :
101
+ type : " string"
102
+ example : " Bearer"
103
+ expires_in :
104
+ type : " number"
105
+ example : 604799
106
+ access_token :
107
+ type : " string"
108
+ example : " abcdefghijklmnopqrstuvwxyz"
109
+ 401 :
110
+ description : " "
111
+ schema :
112
+ type : object
113
+ properties :
114
+ error :
115
+ type : " string"
116
+ example : " Invalid client"
117
+ message :
118
+ type : " string"
119
+ example : " Client authentication failed"
11
120
/users/me :
12
121
get :
13
122
tags :
@@ -1431,6 +1540,20 @@ definitions:
1431
1540
page :
1432
1541
type : " integer"
1433
1542
example : 2
1543
+ ErrorResponse :
1544
+ type : " object"
1545
+ properties :
1546
+ message :
1547
+ type : " string"
1548
+ example : " The given data is invalid"
1549
+ errors :
1550
+ type : " array"
1551
+ items :
1552
+ type : " object"
1553
+ properties :
1554
+ email :
1555
+ type : " string"
1556
+ example : " The selected email is invalid."
1434
1557
Subscription :
1435
1558
type : " object"
1436
1559
required :
Original file line number Diff line number Diff line change 12
12
*/
13
13
14
14
Route::get ('/ ' , function () {
15
- return view ('welcome ' );
15
+ return new \Illuminate \Http \JsonResponse (
16
+ ['message ' => "Nothing to see here, move along " ]
17
+ );
16
18
});
You can’t perform that action at this time.
0 commit comments