Skip to content

Commit

Permalink
Added spec for dependent fields in expesnse rules
Browse files Browse the repository at this point in the history
  • Loading branch information
generalpy101 committed Sep 18, 2024
1 parent a54a961 commit 112fced
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
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_expense_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.
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

0 comments on commit 112fced

Please sign in to comment.