Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: openapi specs for remove_approvers_from_report_api #287

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4027,6 +4027,26 @@ components:
description: |
Explanation to the action if provided by the user
example: All bills are in order
remove_approvers_in:
type: object
additionalProperties: false
required:
- id
- approver_emails
properties:
id:
type: string
description: |
id of report, from which the approvers need to be removed
example: rpa21A2rdj2
approver_emails:
type: array
items:
allOf:
- $ref: '#/components/schemas/email'
example:
- adb@gmail.com
- kartikey.rajvaidya@fyle.in
process_ach_in:
type: object
properties:
Expand Down Expand Up @@ -12523,6 +12543,53 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/404'
/admin/reports/remove_approvers:
post:
tags:
- Reports
summary: Remove Approvers
description: |
Remove Approvers
operationId: report_remove_approvers
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- data
properties:
data:
$ref: '#/components/schemas/remove_approvers_in'
responses:
'200':
description: OK
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
/admin/reports/process_ach/bulk:
post:
tags:
Expand Down
2 changes: 2 additions & 0 deletions src/admin/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ paths:
$ref: paths/admin@reports.yaml
/admin/reports/eject_expenses:
$ref: 'paths/admin@reports@eject_expenses.yaml'
/admin/reports/remove_approvers:
$ref: 'paths/admin@reports@remove_approvers.yaml'
/admin/reports/process_ach/bulk:
$ref: paths/admin@reports@process_ach@bulk.yaml
/admin/reports/mark_paid/bulk:
Expand Down
46 changes: 46 additions & 0 deletions src/admin/paths/admin@reports@remove_approvers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
post:
tags:
- Reports
summary: Remove Approvers
description: |
Remove Approvers
operationId: report_remove_approvers
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: False
required:
- data
properties:
data:
$ref: ../../components/schemas/report.yaml#/remove_approvers_in
responses:
'200':
sourav014 marked this conversation as resolved.
Show resolved Hide resolved
description: OK
'400':
description: Bad request
content:
application/json:
schema:
$ref: ../../components/schemas/400.yaml
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: ../../components/schemas/401.yaml
'403':
description: Forbidden
content:
application/json:
schema:
$ref: ../../components/schemas/403.yaml
'404':
description: Not Found
content:
application/json:
schema:
$ref: '../../components/schemas/404.yaml'
19 changes: 19 additions & 0 deletions src/components/schemas/report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,25 @@ report_action_with_expenses_ids_to_eject:
- $ref: './fields.yaml#/id_string'
example: [ 'txelntgwgwll' ]

remove_approvers_in:
sourav014 marked this conversation as resolved.
Show resolved Hide resolved
type: object
additionalProperties: False
required:
- id
- approver_emails
properties:
id:
type: string
description: |
id of report, from which the approvers need to be removed
example: 'rpa21A2rdj2'
approver_emails:
type: array
items:
allOf:
- $ref: './fields.yaml#/email'
example: [ "adb@gmail.com", "kartikey.rajvaidya@fyle.in" ]

report_action_submit:
type: object
additionalProperties: False
Expand Down