From 112fced48f5d20510a3f289e30bafee09640de8a Mon Sep 17 00:00:00 2001 From: generalpy Date: Wed, 18 Sep 2024 15:55:30 +0530 Subject: [PATCH 1/6] Added spec for dependent fields in expesnse rules --- src/components/schemas/expense_rules.yaml | 14 ++++++++ src/components/schemas/fields.yaml | 40 +++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/src/components/schemas/expense_rules.yaml b/src/components/schemas/expense_rules.yaml index f16ec6fab..f122442fc 100644 --- a/src/components/schemas/expense_rules.yaml +++ b/src/components/schemas/expense_rules.yaml @@ -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 @@ -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: diff --git a/src/components/schemas/fields.yaml b/src/components/schemas/fields.yaml index 453a47fc1..df5f3b88c 100644 --- a/src/components/schemas/fields.yaml +++ b/src/components/schemas/fields.yaml @@ -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: | From 3c48fe094e4421652ffdac5b109572a66a2b520a Mon Sep 17 00:00:00 2001 From: Siva Date: Wed, 18 Sep 2024 10:27:01 +0000 Subject: [PATCH 2/6] Auto generate API docs --- reference/admin.yaml | 55 +++++++++++++++++++++++++++++++++++++++++ reference/approver.yaml | 48 +++++++++++++++++++++++++++++++++++ reference/spender.yaml | 48 +++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+) diff --git a/reference/admin.yaml b/reference/admin.yaml index 7ee65b513..162226cff 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -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. + 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 @@ -3371,6 +3412,13 @@ components: Custom fields items: $ref: '#/components/schemas/custom_field' + dependent_expense_fields: + type: array + nullable: true + description: | + Dependent expense fields + items: + $ref: '#/components/schemas/dependent_expense_fields' tax_group: type: object nullable: true @@ -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 diff --git a/reference/approver.yaml b/reference/approver.yaml index b20302c48..d1267b936 100644 --- a/reference/approver.yaml +++ b/reference/approver.yaml @@ -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. + 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 @@ -1612,6 +1653,13 @@ components: Custom fields items: $ref: '#/components/schemas/custom_field' + dependent_expense_fields: + type: array + nullable: true + description: | + Dependent expense fields + items: + $ref: '#/components/schemas/dependent_expense_fields' tax_group: type: object nullable: true diff --git a/reference/spender.yaml b/reference/spender.yaml index 3ae057006..ea3cb37d1 100644 --- a/reference/spender.yaml +++ b/reference/spender.yaml @@ -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 @@ -1452,6 +1493,13 @@ components: Custom fields items: $ref: '#/components/schemas/custom_field' + dependent_expense_fields: + type: array + nullable: true + description: | + Dependent expense fields + items: + $ref: '#/components/schemas/dependent_expense_fields' tax_group: type: object nullable: true From 4464ebcbe1ecdcc695085ed04ac5e30dfa536663 Mon Sep 17 00:00:00 2001 From: generalpy Date: Tue, 24 Sep 2024 00:28:26 +0530 Subject: [PATCH 3/6] Minor name change --- src/components/schemas/expense_rules.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/schemas/expense_rules.yaml b/src/components/schemas/expense_rules.yaml index f122442fc..c78316157 100644 --- a/src/components/schemas/expense_rules.yaml +++ b/src/components/schemas/expense_rules.yaml @@ -87,7 +87,7 @@ expense_rule_data_in: Custom fields items: $ref: './fields.yaml#/custom_field' - dependent_expense_fields: + dependent_fields: type: array nullable: true description: | From c40e6238358c3e71486b2f07d88685ed05cb44b0 Mon Sep 17 00:00:00 2001 From: Siva Date: Mon, 23 Sep 2024 18:59:10 +0000 Subject: [PATCH 4/6] Auto generate API docs --- reference/admin.yaml | 2 +- reference/approver.yaml | 2 +- reference/spender.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index 162226cff..823b80ccd 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -3412,7 +3412,7 @@ components: Custom fields items: $ref: '#/components/schemas/custom_field' - dependent_expense_fields: + dependent_fields: type: array nullable: true description: | diff --git a/reference/approver.yaml b/reference/approver.yaml index d1267b936..77db2b6bc 100644 --- a/reference/approver.yaml +++ b/reference/approver.yaml @@ -1653,7 +1653,7 @@ components: Custom fields items: $ref: '#/components/schemas/custom_field' - dependent_expense_fields: + dependent_fields: type: array nullable: true description: | diff --git a/reference/spender.yaml b/reference/spender.yaml index ea3cb37d1..390c210fb 100644 --- a/reference/spender.yaml +++ b/reference/spender.yaml @@ -1493,7 +1493,7 @@ components: Custom fields items: $ref: '#/components/schemas/custom_field' - dependent_expense_fields: + dependent_fields: type: array nullable: true description: | From db50d33a471715ffe9822a5562221fa88c0b6a13 Mon Sep 17 00:00:00 2001 From: generalpy Date: Thu, 26 Sep 2024 12:33:29 +0530 Subject: [PATCH 5/6] Minor changes --- src/components/schemas/fields.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/schemas/fields.yaml b/src/components/schemas/fields.yaml index df5f3b88c..20c781ffa 100644 --- a/src/components/schemas/fields.yaml +++ b/src/components/schemas/fields.yaml @@ -711,12 +711,12 @@ dependent_expense_fields: parent_expense_field_id: type: integer description: | - 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. + This id provided by Fyle to identify the dependent expense field. example: 123 dependent_expense_field_value_id: type: integer From 38afd9f47e15185bae19e15cc797dc9ba34fc7cc Mon Sep 17 00:00:00 2001 From: Siva Date: Thu, 26 Sep 2024 07:04:08 +0000 Subject: [PATCH 6/6] Auto generate API docs --- reference/admin.yaml | 4 ++-- reference/approver.yaml | 4 ++-- reference/spender.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/reference/admin.yaml b/reference/admin.yaml index 9aeded446..d1a248e4e 100644 --- a/reference/admin.yaml +++ b/reference/admin.yaml @@ -3341,12 +3341,12 @@ components: parent_expense_field_id: type: integer description: | - 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. + This id provided by Fyle to identify the dependent expense field. example: 123 dependent_expense_field_value_id: type: integer diff --git a/reference/approver.yaml b/reference/approver.yaml index 77db2b6bc..134d63b61 100644 --- a/reference/approver.yaml +++ b/reference/approver.yaml @@ -1582,12 +1582,12 @@ components: parent_expense_field_id: type: integer description: | - 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. + This id provided by Fyle to identify the dependent expense field. example: 123 dependent_expense_field_value_id: type: integer diff --git a/reference/spender.yaml b/reference/spender.yaml index 390c210fb..7865e1967 100644 --- a/reference/spender.yaml +++ b/reference/spender.yaml @@ -1422,12 +1422,12 @@ components: parent_expense_field_id: type: integer description: | - 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. + This id provided by Fyle to identify the dependent expense field. example: 123 dependent_expense_field_value_id: type: integer