Skip to content

Commit

Permalink
Added spec for dependent fields in expense rules (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
generalpy101 authored Sep 26, 2024
1 parent 05bf2dc commit 1b8c217
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 0 deletions.
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 the parent expense field.
example: 123
dependent_expense_field_id:
type: integer
description: |
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 @@ -12842,6 +12890,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 the parent expense field.
example: 123
dependent_expense_field_id:
type: integer
description: |
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 @@ -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 the parent expense field.
example: 123
dependent_expense_field_id:
type: integer
description: |
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 @@ -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 the parent expense field.
example: 123
dependent_expense_field_id:
type: integer
description: |
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: '#/location'
- type: array
items:
type: string
example: [ 'v1', 'v2' ]

expense_custom_field:
type: object
description: |
Expand Down

0 comments on commit 1b8c217

Please sign in to comment.