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
Copy file name to clipboardExpand all lines: manifest.js
+65-2Lines changed: 65 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -48,11 +48,68 @@ const devPlugins = [
48
48
{
49
49
plugin: 'hapi-swagger',
50
50
options: {
51
+
securityDefinitions: {
52
+
'jwt': {
53
+
'type': 'apiKey',
54
+
'name': 'Authorization',
55
+
'in': 'header'
56
+
}
57
+
},
58
+
security: [{'jwt': []}],
51
59
info: {
52
60
title: `${Config.get('/projectName')} API Documentation`,
53
-
version: Pack.version
61
+
version: Pack.version,
62
+
description: `Check out the **[Github Wiki](https://github.com/escommunity/fresh/wiki)** for common questions and how-tos.
63
+
64
+
A few key things to be aware of:
65
+
The core User model found in the /endpoint/v1/users/ endpoints have these basic fields: _id, email, username, password, isActive, roles, timeCreated.
66
+
67
+
This framework decorates the core User models with additional role specific fields via mapping it to 1 or more roles. Fresh comes with 2 default roles, customers and admins.
68
+
69
+
/endpoint/v1/accounts/ is the "customer account" role.
70
+
When users sign up via /endpoint/v1/signup the framework automatically creates a new User and a new Account (aka customer role) and links the two. Users can have multiple roles but each new instance of a role model can only be mapped to one user.
71
+
The customer Account role adds these additional fields for users who are customers: "name" (first, last), "notes", and "status". "Notes" allows admins to add notes to accounts.
72
+
73
+
/endpoint/v1/admins/ is the "admin" role.
74
+
This role contains a "name" (first, last), "permissions", and "groups" property allowing you to assign multiple admin-groups. The first admin-group is "root" which is allowed to perform the "Root Scope" actions.
75
+
76
+
More details on [Users, Roles & Groups](https://github.com/escommunity/fresh/wiki/Users,-Roles-&-Groups)
77
+
More details on [Admin & Admin Group Permissions](https://github.com/escommunity/fresh/wiki/Admin-&-Admin-Group-Permissions)`
54
78
},
55
-
grouping: 'tags'
79
+
grouping: 'tags',
80
+
sortTags: 'name',
81
+
tags: [
82
+
{
83
+
name: 'accounts',
84
+
description: 'endpoints to interact with customer role.'
85
+
},{
86
+
name: 'admin-groups',
87
+
description: 'endpoints to interact with admin groups.'
88
+
},{
89
+
name: 'admins',
90
+
description: 'endpoints to interact with admin roles.'
91
+
},{
92
+
name: 'contact'
93
+
},{
94
+
name: 'login',
95
+
description: 'endpoints for login flow.'
96
+
},{
97
+
name: 'logout'
98
+
},{
99
+
name: 'main'
100
+
},{
101
+
name: 'session',
102
+
description: 'endpoints to interact with user sessions.'
103
+
},{
104
+
name: 'signup'
105
+
},{
106
+
name: 'statuses',
107
+
description: 'endpoints to interact with customer role (account) statuses.'
108
+
},{
109
+
name: 'users',
110
+
description: 'endpoints to interact with users (outside of roles)'
0 commit comments