Skip to content

Commit 1b56781

Browse files
committed
Move AssetStatu in component
Use AssetStatus for both Asset object and as a arg for getAssets operation. The operation requires the string be ALL caps and using ENUMs prevents incorrect casing when performing a create or get operation.
1 parent 50e4320 commit 1b56781

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

assets-yaml/xero_assets.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@ paths:
3232
in: query
3333
description: Required when retrieving a collection of assets. See Asset Status Codes
3434
schema:
35-
type: string
36-
enum:
37-
- Draft
38-
- Registered
39-
- Disposed
40-
example: Draft
35+
$ref: '#/components/schemas/AssetStatus'
4136
required: true
4237
- name: page
4338
in: query
@@ -647,13 +642,7 @@ components:
647642
description: "The price the asset was disposed at"
648643
example: "1.0000"
649644
assetStatus:
650-
type: string
651-
description: "See Asset Status Codes."
652-
example: "Draft"
653-
enum:
654-
- Draft
655-
- Registered
656-
- Disposed
645+
$ref: '#/components/schemas/AssetStatus'
657646
warrantyExpiryDate:
658647
type: string
659648
description: "The date the asset’s warranty expires (if needed) YYYY-MM-DD"
@@ -679,6 +668,14 @@ components:
679668
type: boolean
680669
description: "Boolean to indicate whether delete is enabled"
681670
example: true
671+
AssetStatus:
672+
type: string
673+
description: "See Asset Status Codes."
674+
example: "DRAFT"
675+
enum:
676+
- DRAFT
677+
- REGISTERED
678+
- DISPOSED
682679
AssetType:
683680
type: object
684681
required:

0 commit comments

Comments
 (0)