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

Added spec for dependent fields in expesnse rules #546

Open
wants to merge 4 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
55 changes: 55 additions & 0 deletions reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3333,6 +3333,47 @@ components:
nullable: true
example: true
description: This field marks whether a given expense is billable or not.
dependent_expense_fields:
type: object
description: |
Dependent expense fields details
properties:
parent_expense_field_id:
type: integer
description: |
This id provided by Fyle to identify an expense field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This id provided by Fyle to identify an expense field.
This id provided by Fyle to identify the parent expense field.

example: 123
dependent_expense_field_id:
type: integer
description: |
This id provided by Fyle to identify an expense field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This id provided by Fyle to identify an expense field.
This id provided by Fyle to identify the dependent expense field.

example: 123
dependent_expense_field_value_id:
type: integer
description: |
This id provided by Fyle to identify dependent field value.
example: 123
name:
type: string
description: |
This represents the name of the dependent expense field.
example: cf1
value:
nullable: true
oneOf:
- type: string
example: string1
- type: boolean
example: true
- type: integer
example: 123
- $ref: '#/components/schemas/location'
- type: array
items:
type: string
example:
- v1
- v2
expense_rule_data_in:
type: object
nullable: true
Expand Down Expand Up @@ -3371,6 +3412,13 @@ components:
Custom fields
items:
$ref: '#/components/schemas/custom_field'
dependent_fields:
type: array
nullable: true
description: |
Dependent expense fields
items:
$ref: '#/components/schemas/dependent_expense_fields'
tax_group:
type: object
nullable: true
Expand Down Expand Up @@ -12827,6 +12875,13 @@ components:
Custom fields
items:
$ref: '#/components/schemas/custom_field'
dependent_fields:
type: array
nullable: true
description: |
Dependent expense fields
items:
$ref: '#/components/schemas/dependent_expense_fields'
expense_rule_out:
type: object
additionalProperties: false
Expand Down
48 changes: 48 additions & 0 deletions reference/approver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,47 @@ components:
nullable: true
example: true
description: This field marks whether a given expense is billable or not.
dependent_expense_fields:
type: object
description: |
Dependent expense fields details
properties:
parent_expense_field_id:
type: integer
description: |
This id provided by Fyle to identify an expense field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comments as above

example: 123
dependent_expense_field_id:
type: integer
description: |
This id provided by Fyle to identify an expense field.
example: 123
dependent_expense_field_value_id:
type: integer
description: |
This id provided by Fyle to identify dependent field value.
example: 123
name:
type: string
description: |
This represents the name of the dependent expense field.
example: cf1
value:
nullable: true
oneOf:
- type: string
example: string1
- type: boolean
example: true
- type: integer
example: 123
- $ref: '#/components/schemas/location'
- type: array
items:
type: string
example:
- v1
- v2
expense_rule_data_in:
type: object
nullable: true
Expand Down Expand Up @@ -1612,6 +1653,13 @@ components:
Custom fields
items:
$ref: '#/components/schemas/custom_field'
dependent_fields:
type: array
nullable: true
description: |
Dependent expense fields
items:
$ref: '#/components/schemas/dependent_expense_fields'
tax_group:
type: object
nullable: true
Expand Down
48 changes: 48 additions & 0 deletions reference/spender.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,47 @@ components:
nullable: true
example: true
description: This field marks whether a given expense is billable or not.
dependent_expense_fields:
type: object
description: |
Dependent expense fields details
properties:
parent_expense_field_id:
type: integer
description: |
This id provided by Fyle to identify an expense field.
example: 123
dependent_expense_field_id:
type: integer
description: |
This id provided by Fyle to identify an expense field.
example: 123
dependent_expense_field_value_id:
type: integer
description: |
This id provided by Fyle to identify dependent field value.
example: 123
name:
type: string
description: |
This represents the name of the dependent expense field.
example: cf1
value:
nullable: true
oneOf:
- type: string
example: string1
- type: boolean
example: true
- type: integer
example: 123
- $ref: '#/components/schemas/location'
- type: array
items:
type: string
example:
- v1
- v2
expense_rule_data_in:
type: object
nullable: true
Expand Down Expand Up @@ -1452,6 +1493,13 @@ components:
Custom fields
items:
$ref: '#/components/schemas/custom_field'
dependent_fields:
type: array
nullable: true
description: |
Dependent expense fields
items:
$ref: '#/components/schemas/dependent_expense_fields'
tax_group:
type: object
nullable: true
Expand Down
14 changes: 14 additions & 0 deletions src/components/schemas/expense_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ expense_rule_data_in:
Custom fields
items:
$ref: './fields.yaml#/custom_field'
dependent_fields:
type: array
nullable: true
description: |
Dependent expense fields
items:
$ref: './fields.yaml#/dependent_expense_fields'

expense_rule_data_out:
type: object
Expand Down Expand Up @@ -132,6 +139,13 @@ expense_rule_data_out:
Custom fields
items:
$ref: './fields.yaml#/custom_field'
dependent_fields:
type: array
nullable: true
description: |
Dependent expense fields
items:
$ref: './fields.yaml#/dependent_expense_fields'


expense_rule_in:
Expand Down
40 changes: 40 additions & 0 deletions src/components/schemas/fields.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,46 @@ custom_fields:
items:
$ref: '#/custom_field'

dependent_expense_fields:
type: object
description: |
Dependent expense fields details
properties:
parent_expense_field_id:
type: integer
description: |
This id provided by Fyle to identify an expense field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

example: 123
dependent_expense_field_id:
type: integer
description: |
This id provided by Fyle to identify an expense field.
example: 123
dependent_expense_field_value_id:
type: integer
description: |
This id provided by Fyle to identify dependent field value.
example: 123
name:
type: string
description: |
This represents the name of the dependent expense field.
example: 'cf1'
value:
nullable: true
oneOf:
- type: string
example: string1
- type: boolean
example: True
- type: integer
example: 123
- $ref: '#/location'
- type: array
items:
type: string
example: [ 'v1', 'v2' ]

expense_custom_field:
type: object
description: |
Expand Down