From 3b71f493a27cf4e1aa02d60c322bd55d3ead910e Mon Sep 17 00:00:00 2001 From: Satyam Jadhav Date: Tue, 6 Aug 2024 12:00:36 +0530 Subject: [PATCH] feat: Added documentation for /admin/employees/potential_duplicate_expenses API --- src/admin/openapi.yaml | 2 ++ ...mployees@potential_duplicate_expenses.yaml | 36 +++++++++++++++++++ src/components/schemas/employee.yaml | 18 ++++++++++ 3 files changed, 56 insertions(+) create mode 100644 src/admin/paths/admin@employees@potential_duplicate_expenses.yaml diff --git a/src/admin/openapi.yaml b/src/admin/openapi.yaml index 25e5eb292..d5bf2e912 100644 --- a/src/admin/openapi.yaml +++ b/src/admin/openapi.yaml @@ -169,6 +169,8 @@ paths: $ref: paths/admin@levels.yaml /admin/employees: $ref: paths/admin@employees.yaml + /admin/employees/potential_duplicate_expenses: + $ref: paths/admin@employees@potential_duplicate_expenses.yaml /admin/employees/business_units: $ref: paths/admin@employees@business_units.yaml /admin/employees/titles: diff --git a/src/admin/paths/admin@employees@potential_duplicate_expenses.yaml b/src/admin/paths/admin@employees@potential_duplicate_expenses.yaml new file mode 100644 index 000000000..0c3d38523 --- /dev/null +++ b/src/admin/paths/admin@employees@potential_duplicate_expenses.yaml @@ -0,0 +1,36 @@ +get: + tags: + - Employees + summary: List employees and potential duplicate expenses + operationId: employees_list + description: | + This API supports very rich filtering on all response fields and pagination via query parameters. To understand how to use these parameters, please see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering) + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: False + properties: + count: + $ref: ../../components/schemas/count.yaml + offset: + $ref: ../../components/schemas/offset.yaml + data: + type: array + items: + $ref: ../../components/schemas/employee.yaml#/employee_out_potential_duplicate_expenses + '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 diff --git a/src/components/schemas/employee.yaml b/src/components/schemas/employee.yaml index 017f1e658..5b912f3e3 100644 --- a/src/components/schemas/employee.yaml +++ b/src/components/schemas/employee.yaml @@ -267,6 +267,24 @@ employee_out_embed: # nullable: true # example: Finance ops +employee_out_potential_duplicate_expenses: + type: object + additionalProperties: False + properties: + user_id: + $ref: './fields.yaml#/user_id' + email: + $ref: './fields.yaml#/email' + full_name: + type: string + maxLength: 255 + description: | + Represents the full name of the Employee. Must be at least 3 characters. + example: John Doe + potential_duplicate_expenses: + type: array + items: + $ref: ../../components/schemas/expense.yaml#/expense_duplicate_sets_out employee_out_embed_for_expense: type: object