Skip to content

Commit 2e1f41b

Browse files
committed
feat: enable enums to be open for xero_assets.yaml
BREAKING CHANGE: open enums
1 parent 3783c80 commit 2e1f41b

1 file changed

Lines changed: 56 additions & 34 deletions

File tree

xero_assets.yaml

Lines changed: 56 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,29 @@ paths:
5353
in: query
5454
description: Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice.
5555
schema:
56-
type: string
57-
enum:
58-
- AssetType
59-
- AssetName
60-
- AssetNumber
61-
- PurchaseDate
62-
- PurchasePrice
63-
- DisposalDate
64-
- DisposalPrice
56+
anyOf:
57+
- type: string
58+
enum:
59+
- AssetType
60+
- AssetName
61+
- AssetNumber
62+
- PurchaseDate
63+
- PurchasePrice
64+
- DisposalDate
65+
- DisposalPrice
66+
- type: string
6567
example: AssetName
6668
- name: sortDirection
6769
x-snake: sort_direction
6870
in: query
6971
description: ASC or DESC
7072
schema:
71-
type: string
72-
enum:
73-
- asc
74-
- desc
73+
anyOf:
74+
- type: string
75+
enum:
76+
- asc
77+
- desc
78+
- type: string
7579
example: ASC
7680
- name: filterBy
7781
x-snake: filter_by
@@ -711,22 +715,34 @@ components:
711715
type: boolean
712716
description: Boolean to indicate whether delete is enabled
713717
example: true
714-
AssetStatus:
718+
AssetStatusClosed:
715719
type: string
716720
description: See Asset Status Codes.
717-
example: Draft
718721
enum:
719722
- Draft
720723
- Registered
721724
- Disposed
722-
AssetStatusQueryParam:
725+
example: Draft
726+
AssetStatus:
727+
description: See Asset Status Codes.
728+
anyOf:
729+
- $ref: '#/components/schemas/AssetStatusClosed'
730+
- type: string
731+
example: Draft
732+
AssetStatusQueryParamClosed:
723733
type: string
724734
description: See Asset Status Codes.
725-
example: DRAFT
726735
enum:
727736
- DRAFT
728737
- REGISTERED
729738
- DISPOSED
739+
example: DRAFT
740+
AssetStatusQueryParam:
741+
description: See Asset Status Codes.
742+
anyOf:
743+
- $ref: '#/components/schemas/AssetStatusQueryParamClosed'
744+
- type: string
745+
example: DRAFT
730746
AssetType:
731747
type: object
732748
x-snake: asset_type
@@ -767,21 +783,25 @@ components:
767783
BookDepreciationSetting:
768784
properties:
769785
depreciationMethod:
770-
type: string
771-
enum:
772-
- NoDepreciation
773-
- StraightLine
774-
- DiminishingValue100
775-
- DiminishingValue150
776-
- DiminishingValue200
777-
- FullDepreciation
786+
anyOf:
787+
- type: string
788+
enum:
789+
- NoDepreciation
790+
- StraightLine
791+
- DiminishingValue100
792+
- DiminishingValue150
793+
- DiminishingValue200
794+
- FullDepreciation
795+
- type: string
778796
example: StraightLine
779797
description: The method of depreciation applied to this asset. See Depreciation Methods
780798
averagingMethod:
781-
type: string
782-
enum:
783-
- FullMonth
784-
- ActualDays
799+
anyOf:
800+
- type: string
801+
enum:
802+
- FullMonth
803+
- ActualDays
804+
- type: string
785805
example: ActualDays
786806
description: The method of averaging applied to this asset. See Averaging Methods
787807
depreciationRate:
@@ -795,11 +815,13 @@ components:
795815
example: 5
796816
description: Effective life of the asset in years (e.g. 5)
797817
depreciationCalculationMethod:
798-
type: string
799-
enum:
800-
- Rate
801-
- Life
802-
- None
818+
anyOf:
819+
- type: string
820+
enum:
821+
- Rate
822+
- Life
823+
- None
824+
- type: string
803825
example: None
804826
description: See Depreciation Calculation Methods
805827
depreciableObjectId:

0 commit comments

Comments
 (0)