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 send_back_reports_api #286

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
78 changes: 78 additions & 0 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4027,6 +4027,23 @@ components:
description: |
Explanation to the action if provided by the user
example: All bills are in order
reports_send_back_in:
type: object
additionalProperties: false
required:
- id
- reason
properties:
id:
type: string
description: |
id of report, which need to be send_back
example: rpa21A2rdj2
reason:
type: string
description: |
reason for sending back the report
example: We don't accept laundry bills
process_ach_in:
type: object
properties:
Expand Down Expand Up @@ -12523,6 +12540,67 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/404'
/admin/reports/send_back/bulk:
post:
tags:
- Reports
summary: Reports Send_back
description: |
Reports Send_back
operationId: reports_send_back
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/reports_send_back_in'
responses:
'200':
description: OK
'400':
description: Bad request
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/bulk_error'
- type: object
properties:
error:
type: string
nullable: true
message:
type: string
nullable: true
data:
type: object
nullable: true
'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/send_back/bulk:
$ref: 'paths/admin@reports@send_back@bulk.yaml'
/admin/reports/process_ach/bulk:
$ref: paths/admin@reports@process_ach@bulk.yaml
/admin/reports/mark_paid/bulk:
Expand Down
60 changes: 60 additions & 0 deletions src/admin/paths/admin@reports@send_back@bulk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
post:
tags:
- Reports
summary: Reports Send_back
description: |
Reports Send_back
operationId: reports_send_back
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: False
required:
- data
properties:
data:
type: array
items:
$ref: ../../components/schemas/report.yaml#/reports_send_back_in
responses:
'200':
description: OK
'400':
description: Bad request
content:
application/json:
schema:
oneOf:
- $ref: ../../components/schemas/bulk_error.yaml
- type: object
properties:
error:
type: string
nullable: true
message:
type: string
nullable: true
data:
type: object
nullable: true
'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'
18 changes: 18 additions & 0 deletions src/components/schemas/report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,24 @@ report_action_with_expenses_ids_to_eject:
- $ref: './fields.yaml#/id_string'
example: [ 'txelntgwgwll' ]

reports_send_back_in:
type: object
additionalProperties: False
required:
- id
- reason
properties:
id:
type: string
description: |
id of report, which need to be send_back
example: 'rpa21A2rdj2'
reason:
type: string
description: |
reason for sending back the report
example: "We don't accept laundry bills"

report_action_submit:
type: object
additionalProperties: False
Expand Down