Adding role to users #12
@ -35,8 +35,7 @@ paths:
|
|||||||
name: type
|
name: type
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: string
|
$ref: '#components/schemas/Roles'
|
||||||
enum: [teacher, student, secretary]
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@ -89,6 +88,8 @@ paths:
|
|||||||
BirthDate:
|
BirthDate:
|
||||||
type: string
|
type: string
|
||||||
description: Follow the iso 8601 ("YYYY-MM-DD")
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
||||||
|
Role:
|
||||||
|
$ref: "#/components/schemas/Roles"
|
||||||
example:
|
example:
|
||||||
{
|
{
|
||||||
"LastName": "Doe" ,
|
"LastName": "Doe" ,
|
||||||
@ -98,6 +99,7 @@ paths:
|
|||||||
"Address": "Rue de Tournais 42",
|
"Address": "Rue de Tournais 42",
|
||||||
"Country": "BE"},
|
"Country": "BE"},
|
||||||
"BirthDate": "1941-02-22",
|
"BirthDate": "1941-02-22",
|
||||||
|
"Role": "student"
|
||||||
}
|
}
|
||||||
responses:
|
responses:
|
||||||
'201':
|
'201':
|
||||||
@ -122,6 +124,7 @@ paths:
|
|||||||
description: Successfully changed.
|
description: Successfully changed.
|
||||||
'401':
|
'401':
|
||||||
$ref: '#/components/responses/UnauthorizedError'
|
$ref: '#/components/responses/UnauthorizedError'
|
||||||
|
|
||||||
/user/{mat}:
|
/user/{mat}:
|
||||||
parameters:
|
parameters:
|
||||||
- name: mat
|
- name: mat
|
||||||
@ -390,6 +393,8 @@ components:
|
|||||||
birthDate:
|
birthDate:
|
||||||
type: string
|
type: string
|
||||||
description: Follow the iso 8601 ("YYYY-MM-DD")
|
description: Follow the iso 8601 ("YYYY-MM-DD")
|
||||||
|
role:
|
||||||
|
$ref: '#/components/schemas/Roles'
|
||||||
example:
|
example:
|
||||||
{
|
{
|
||||||
"regNo": 42,
|
"regNo": 42,
|
||||||
@ -400,7 +405,7 @@ components:
|
|||||||
"address": "Rue de Tournais 42",
|
"address": "Rue de Tournais 42",
|
||||||
"country": "BE"},
|
"country": "BE"},
|
||||||
"birthDate": "1941-02-22",
|
"birthDate": "1941-02-22",
|
||||||
"staffMember": true,
|
"role": "student"
|
||||||
}
|
}
|
||||||
Address:
|
Address:
|
||||||
type: object
|
type: object
|
||||||
@ -459,6 +464,10 @@ components:
|
|||||||
"id": 42,
|
"id": 42,
|
||||||
"courses": ['Math', 'Info']
|
"courses": ['Math', 'Info']
|
||||||
}
|
}
|
||||||
|
Roles:
|
||||||
|
type: string
|
||||||
|
enum: [teacher, student, secretary]
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
UnauthorizedError:
|
UnauthorizedError:
|
||||||
description: Unauthorized access or missing bearer
|
description: Unauthorized access or missing bearer
|
||||||
|
Loading…
Reference in New Issue
Block a user