Skip to content

Commit 3bbb6da

Browse files
committed
fix: User common refs
1 parent 4b11ef8 commit 3bbb6da

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

backend/schema/components/user-object.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
{
22
"type": "object",
33
"description": "User object",
4-
"required": ["id", "created_on", "modified_on", "is_disabled", "email", "name", "nickname", "avatar", "roles"],
4+
"required": [
5+
"id",
6+
"created_on",
7+
"modified_on",
8+
"is_disabled",
9+
"email",
10+
"name",
11+
"nickname",
12+
"avatar",
13+
"roles"
14+
],
515
"additionalProperties": false,
616
"properties": {
717
"id": {
8-
"type": "integer",
9-
"description": "User ID",
10-
"minimum": 1,
11-
"example": 1
18+
"$ref": "../common.json#/properties/user_id"
1219
},
1320
"created_on": {
14-
"type": "string",
15-
"description": "Created Date",
16-
"example": "2020-01-30T09:36:08.000Z"
21+
"$ref": "../common.json#/properties/created_on"
1722
},
1823
"modified_on": {
19-
"type": "string",
20-
"description": "Modified Date",
21-
"example": "2020-01-30T09:41:04.000Z"
24+
"$ref": "../common.json#/properties/modified_on"
2225
},
2326
"is_disabled": {
2427
"type": "boolean",
2528
"description": "Is user Disabled",
2629
"example": true
2730
},
2831
"email": {
29-
"type": "string",
30-
"description": "Email",
31-
"minLength": 3,
32-
"example": "jc@jc21.com"
32+
"$ref": "../common.json#/properties/email"
3333
},
3434
"name": {
3535
"type": "string",
@@ -49,7 +49,9 @@
4949
},
5050
"roles": {
5151
"description": "Roles applied",
52-
"example": ["admin"],
52+
"example": [
53+
"admin"
54+
],
5355
"type": "array",
5456
"items": {
5557
"type": "string"

0 commit comments

Comments
 (0)