Skip to content

Commit

Permalink
feat: Added documentation for /admin/employees/potential_duplicate_ex…
Browse files Browse the repository at this point in the history
…penses API (#538)

* feat: Added documentation for /admin/employees/potential_duplicate_expenses API

* Auto generate API docs

---------

Co-authored-by: Siva <siva@fylehq.com>
  • Loading branch information
satyamyesj and snarayanank2 authored Aug 7, 2024
1 parent bf064c2 commit 346766b
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 14 deletions.
83 changes: 69 additions & 14 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1983,6 +1983,38 @@ components:
$ref: '#/components/schemas/category_out_embed'
description: |
List of categories that this employee is allowed to access.
expense_duplicate_sets_out:
type: object
additionalProperties: false
properties:
expense_ids:
type: array
nullable: false
items:
$ref: '#/components/schemas/id_string'
example:
- txwoirwlwwg
- txwlgwkgw42
description: |
List of expense IDs that are part of the duplicate set
employee_out_potential_duplicate_expenses:
type: object
additionalProperties: false
properties:
user_id:
$ref: '#/components/schemas/user_id'
email:
$ref: '#/components/schemas/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_duplicate_sets_out'
name_nullable:
type: string
maxLength: 255
Expand Down Expand Up @@ -12990,20 +13022,6 @@ components:
- txwlgwkgw42
description: |
List of expense IDs that needs to be dismissed as a duplicate from the target expense
expense_duplicate_sets_out:
type: object
additionalProperties: false
properties:
expense_ids:
type: array
nullable: false
items:
$ref: '#/components/schemas/id_string'
example:
- txwoirwlwwg
- txwlgwkgw42
description: |
List of expense IDs that are part of the duplicate set
expenses_duplicate_sets_stats_in:
properties:
query_params:
Expand Down Expand Up @@ -15370,6 +15388,43 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/401'
/admin/employees/potential_duplicate_expenses:
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'
offset:
$ref: '#/components/schemas/offset'
data:
type: array
items:
$ref: '#/components/schemas/employee_out_potential_duplicate_expenses'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/401'
/admin/employees/business_units:
get:
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 @@ -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:
Expand Down
36 changes: 36 additions & 0 deletions src/admin/paths/admin@employees@potential_duplicate_expenses.yaml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions src/components/schemas/employee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 346766b

Please sign in to comment.