Skip to content

Commit 21d4ea7

Browse files
committed
feat: add x-enum-varnames to all Closed enum schemas
- Added x-enum-varnames for better code generation - Provides PascalCase names for enum values in generated code - Improves developer experience with more readable enum names - Affects 49 Closed enum schemas across 8 files
1 parent 551718a commit 21d4ea7

8 files changed

Lines changed: 1280 additions & 0 deletions

xero-finance.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,18 @@ components:
13601360
additionalProperties: false
13611361
ProblemTypeClosed:
13621362
type: string
1363+
x-enum-varnames:
1364+
- Notset
1365+
- BankAccountNotFound
1366+
- InternalError
1367+
- InvalidApplication
1368+
- InvalidRequest
1369+
- OrganisationNotFound
1370+
- OrganisationOffline
1371+
- RequestTimeout
1372+
- ServiceUnavailable
1373+
- Unauthorized
1374+
- RateLimitError
13631375
enum:
13641376
- NotSet
13651377
- bank-account-not-found

xero-payroll-au.yaml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3465,6 +3465,11 @@ components:
34653465
$ref: '#/components/schemas/LeavePeriodStatus'
34663466
LeavePeriodStatusClosed:
34673467
type: string
3468+
x-enum-varnames:
3469+
- Scheduled #the default status
3470+
- Processed #a leaveperiod is set to the "processed" status when the payrun associated with the leaveperiod is "posted"
3471+
- Requested
3472+
- Rejected
34683473
enum:
34693474
- SCHEDULED #The default status
34703475
- PROCESSED #A LeavePeriod is set to the "Processed" status when the Payrun associated with the LeavePeriod is "POSTED"
@@ -4892,6 +4897,10 @@ components:
48924897
example: ANNUALLEAVE
48934898
RateTypeClosed:
48944899
type: string
4900+
x-enum-varnames:
4901+
- Fixedamount
4902+
- Multiple #multiple of employee’s ordinary earnings rate an earnings rate which is derived from an employee’s ordinary earnings rate
4903+
- Rateperunit #an earnings rate allowing entry of a rate per unit
48954904
enum:
48964905
- FIXEDAMOUNT
48974906
- MULTIPLE #Multiple of Employee’s Ordinary Earnings Rate - an earnings rate which is derived from an employee’s ordinary earnings rate
@@ -4902,6 +4911,21 @@ components:
49024911
- type: string
49034912
EarningsTypeClosed:
49044913
type: string
4914+
x-enum-varnames:
4915+
- Fixed
4916+
- Ordinarytimeearnings
4917+
- Overtimeearnings
4918+
- Allowance
4919+
- Lumpsumd
4920+
- Employmentterminationpayment
4921+
- Lumpsuma
4922+
- Lumpsumb
4923+
- Bonusesandcommissions
4924+
- Lumpsume
4925+
- Lumpsumw
4926+
- Directorsfees
4927+
- Paidparentalleave
4928+
- Workerscompensation
49054929
enum:
49064930
- FIXED
49074931
- ORDINARYTIMEEARNINGS
@@ -4923,6 +4947,9 @@ components:
49234947
- type: string
49244948
EmploymentTerminationPaymentTypeClosed:
49254949
type: string
4950+
x-enum-varnames:
4951+
- O
4952+
- R
49264953
enum:
49274954
- O
49284955
- R
@@ -4932,6 +4959,16 @@ components:
49324959
- type: string
49334960
AllowanceTypeClosed:
49344961
type: string
4962+
x-enum-varnames:
4963+
- Car
4964+
- Transport
4965+
- Laundry
4966+
- Meals
4967+
- Travel
4968+
- Other
4969+
- Tools
4970+
- Tasks
4971+
- Qualifications
49354972
enum:
49364973
- CAR
49374974
- TRANSPORT
@@ -4948,6 +4985,14 @@ components:
49484985
- type: string
49494986
AllowanceCategoryClosed:
49504987
type: string
4988+
x-enum-varnames:
4989+
- Nondeductible
4990+
- Uniform
4991+
- Privatevehicle
4992+
- Homeoffice
4993+
- Transport
4994+
- General
4995+
- Other
49514996
enum:
49524997
- NONDEDUCTIBLE
49534998
- UNIFORM
@@ -4962,6 +5007,13 @@ components:
49625007
- type: string
49635008
CalendarTypeClosed:
49645009
type: string
5010+
x-enum-varnames:
5011+
- Weekly
5012+
- Fortnightly
5013+
- Fourweekly
5014+
- Monthly
5015+
- Twicemonthly
5016+
- Quarterly
49655017
enum:
49665018
- WEEKLY
49675019
- FORTNIGHTLY
@@ -4975,6 +5027,10 @@ components:
49755027
- type: string
49765028
EarningsRateCalculationTypeClosed:
49775029
type: string
5030+
x-enum-varnames:
5031+
- Useearningsrate
5032+
- Enterearningsrate
5033+
- Annualsalary
49785034
enum:
49795035
- USEEARNINGSRATE
49805036
- ENTEREARNINGSRATE
@@ -4985,6 +5041,10 @@ components:
49855041
- type: string
49865042
DeductionTypeCalculationTypeClosed:
49875043
type: string
5044+
x-enum-varnames:
5045+
- Fixedamount
5046+
- Pretax
5047+
- Posttax
49885048
enum:
49895049
- FIXEDAMOUNT
49905050
- PRETAX
@@ -5003,6 +5063,11 @@ components:
50035063
- BASEDONORDINARYEARNINGS
50045064
SuperannuationContributionTypeClosed:
50055065
type: string
5066+
x-enum-varnames:
5067+
- Sgc
5068+
- Salarysacrifice
5069+
- Employeradditional
5070+
- Employee
50065071
enum:
50075072
- SGC
50085073
- SALARYSACRIFICE
@@ -5014,6 +5079,10 @@ components:
50145079
- type: string
50155080
SuperannuationCalculationTypeClosed:
50165081
type: string
5082+
x-enum-varnames:
5083+
- Fixedamount
5084+
- Percentageofearnings
5085+
- Statutory
50175086
enum:
50185087
- FIXEDAMOUNT
50195088
- PERCENTAGEOFEARNINGS
@@ -5024,6 +5093,14 @@ components:
50245093
- type: string
50255094
PaymentFrequencyTypeClosed:
50265095
type: string
5096+
x-enum-varnames:
5097+
- Weekly
5098+
- Monthly
5099+
- Fortnightly
5100+
- Quarterly
5101+
- Twicemonthly
5102+
- Fourweekly
5103+
- Yearly
50275104
enum:
50285105
- WEEKLY
50295106
- MONTHLY
@@ -5038,6 +5115,11 @@ components:
50385115
- type: string
50395116
LeaveTypeContributionTypeClosed:
50405117
type: string
5118+
x-enum-varnames:
5119+
- Sgc
5120+
- Salarysacrifice
5121+
- Employeradditional
5122+
- Employee
50415123
enum:
50425124
- SGC
50435125
- SALARYSACRIFICE
@@ -5049,6 +5131,9 @@ components:
50495131
- type: string
50505132
EntitlementFinalPayPayoutTypeClosed:
50515133
type: string
5134+
x-enum-varnames:
5135+
- Notpaidout
5136+
- Paidout
50525137
enum:
50535138
- NOTPAIDOUT
50545139
- PAIDOUT
@@ -5058,6 +5143,9 @@ components:
50585143
- type: string
50595144
PayRunStatusClosed:
50605145
type: string
5146+
x-enum-varnames:
5147+
- Draft
5148+
- Posted
50615149
enum:
50625150
- DRAFT
50635151
- POSTED
@@ -5067,6 +5155,13 @@ components:
50675155
- type: string
50685156
ManualTaxTypeClosed:
50695157
type: string
5158+
x-enum-varnames:
5159+
- Paygmanual
5160+
- Etpomanual
5161+
- Etprmanual
5162+
- Schedule5manual
5163+
- Schedule5stslmanual
5164+
- Schedule4manual
50705165
enum:
50715166
- PAYGMANUAL
50725167
- ETPOMANUAL
@@ -5080,6 +5175,9 @@ components:
50805175
- type: string
50815176
SuperFundTypeClosed:
50825177
type: string
5178+
x-enum-varnames:
5179+
- Regulated
5180+
- Smsf
50835181
enum:
50845182
- REGULATED
50855183
- SMSF
@@ -5089,6 +5187,9 @@ components:
50895187
- type: string
50905188
EmploymentTypeClosed:
50915189
type: string
5190+
x-enum-varnames:
5191+
- Employee
5192+
- Contractor
50925193
enum:
50935194
- EMPLOYEE
50945195
- CONTRACTOR
@@ -5353,6 +5454,12 @@ components:
53535454
- SS
53545455
IncomeTypeClosed:
53555456
type: string
5457+
x-enum-varnames:
5458+
- Salaryandwages
5459+
- Workingholidaymaker
5460+
- Nonemployee
5461+
- Closelyheldpayees
5462+
- Labourhire
53565463
enum:
53575464
- SALARYANDWAGES
53585465
- WORKINGHOLIDAYMAKER
@@ -5365,6 +5472,13 @@ components:
53655472
- type: string
53665473
TaxScaleTypeClosed:
53675474
type: string
5475+
x-enum-varnames:
5476+
- Regular
5477+
- Actorsartistsentertainers
5478+
- Horticulturistorshearer
5479+
- Seniororpensioner
5480+
- Workingholidaymaker
5481+
- Foreign
53685482
enum:
53695483
- REGULAR
53705484
- ACTORSARTISTSENTERTAINERS
@@ -5378,6 +5492,10 @@ components:
53785492
- type: string
53795493
WorkConditionClosed:
53805494
type: string
5495+
x-enum-varnames:
5496+
- Promotional
5497+
- Threelessperformancesperweek
5498+
- None
53815499
enum:
53825500
- PROMOTIONAL
53835501
- THREELESSPERFORMANCESPERWEEK
@@ -5388,6 +5506,10 @@ components:
53885506
- type: string
53895507
SeniorMaritalStatusClosed:
53905508
type: string
5509+
x-enum-varnames:
5510+
- Memberofcouple
5511+
- Memberofillnessseparatedcouple
5512+
- Single
53915513
enum:
53925514
- MEMBEROFCOUPLE
53935515
- MEMBEROFILLNESSSEPARATEDCOUPLE
@@ -5398,6 +5520,13 @@ components:
53985520
- type: string
53995521
EmploymentBasisClosed:
54005522
type: string
5523+
x-enum-varnames:
5524+
- Fulltime
5525+
- Parttime
5526+
- Casual
5527+
- Labourhire
5528+
- Superincomestream # usage is deprecated
5529+
- Nonemployee
54015530
enum:
54025531
- FULLTIME
54035532
- PARTTIME
@@ -5411,6 +5540,11 @@ components:
54115540
- type: string
54125541
TFNExemptionTypeClosed:
54135542
type: string
5543+
x-enum-varnames:
5544+
- Notquoted
5545+
- Pending
5546+
- Pensioner
5547+
- Under18
54145548
enum:
54155549
- NOTQUOTED
54165550
- PENDING
@@ -5422,6 +5556,10 @@ components:
54225556
- type: string
54235557
ResidencyStatusClosed:
54245558
type: string
5559+
x-enum-varnames:
5560+
- Australianresident
5561+
- Foreignresident
5562+
- Workingholidaymaker # usage is deprecated
54255563
enum:
54265564
- AUSTRALIANRESIDENT
54275565
- FOREIGNRESIDENT
@@ -5432,6 +5570,12 @@ components:
54325570
- type: string
54335571
TimesheetStatusClosed:
54345572
type: string
5573+
x-enum-varnames:
5574+
- Draft
5575+
- Processed
5576+
- Approved
5577+
- Rejected
5578+
- Requested
54355579
enum:
54365580
- DRAFT
54375581
- PROCESSED

0 commit comments

Comments
 (0)