Skip to content

Commit

Permalink
Modified api/openapi/apis/users.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Reingold Shekhtel authored and Reingold Shekhtel committed Jan 13, 2025
1 parent 2d47510 commit e7eba14
Showing 1 changed file with 78 additions and 1 deletion.
79 changes: 78 additions & 1 deletion api/openapi/apis/users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ paths:
- User get access to any user avatar
tags:
- User
- Implemented
parameters:
- name: user_id
in: path
Expand Down Expand Up @@ -324,6 +323,84 @@ paths:
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
post:
summary: Upload user avatar
operationId: post-users-user_id-avatar
description: |-
Upload user avatar
### Authority
- `ADMINISTRATOR`
- `USER`
### Access level
- Administrator get access to any user avatar
- User get access only to their avatar
tags:
- User
parameters:
- name: user_id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
responses:
'201':
description: Avatar uploaded successfully
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
delete:
summary: Delete user avatar
operationId: delete-users-user_id-avatar
description: |-
Delete user avatar
### Authority
- `ADMINISTRATOR`
- `USER`
### Access level
- Administrator get access to any user avatar
- User get access only to their avatar
tags:
- User
parameters:
- name: user_id
in: path
required: true
schema:
type: string
responses:
'204':
description: Avatar deleted successfully
'400':
$ref: '#/components/responses/Error'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Avatar not found
components:
schemas:
Invitation:
Expand Down

0 comments on commit e7eba14

Please sign in to comment.