Files
go-unifi/codegen/customizations.yml
Mateusz Filipowicz 5a403dbb39 feat: simplified generated resources code customizations with yaml file config (#17)
* feat: simplified generated code customizations with yaml file config

* chore: apply linting
2025-02-12 09:18:44 +01:00

74 lines
1.9 KiB
YAML

---
customizations:
resources:
Account:
fields:
IP:
omitEmpty: true
NetworkID:
omitEmpty: true
ChannelPlan:
fields:
Channel:
ifFieldType: "string"
customUnmarshalType: "numberOrString"
BackupChannel:
ifFieldType: "string"
customUnmarshalType: "numberOrString"
TxPower:
ifFieldType: "string"
customUnmarshalType: "numberOrString"
Device:
fields:
_all:
omitEmpty: true
X:
fieldType: "float64"
Y:
fieldType: "float64"
StpPriority:
fieldType: "string"
customUnmarshalType: "numberOrString"
Ht:
fieldType: "int"
Channel:
customUnmarshalType: "numberOrString"
ifFieldType: "string"
BackupChannel:
customUnmarshalType: "numberOrString"
ifFieldType: "string"
TxPower:
customUnmarshalType: "numberOrString"
ifFieldType: "string"
LteExtAnt:
customUnmarshalType: "booleanishString"
LtePoe:
customUnmarshalType: "booleanishString"
PortOverrides:
omitEmpty: false
Network:
fields:
InternetAccessEnabled:
ifFieldType: "bool"
customUnmarshalType: "*bool"
customUnmarshalFunc: "emptyBoolToTrue"
IntraNetworkAccessEnabled:
ifFieldType: "bool"
customUnmarshalType: "*bool"
customUnmarshalFunc: "emptyBoolToTrue"
WANUsername:
omitEmpty: true
XWANPassword:
omitEmpty: true
User:
fields:
Blocked:
fieldType: "bool"
LastSeen:
fieldType: "int"
customUnmarshalType: "emptyStringInt"
WLAN:
fields:
ScheduleWithDuration:
omitEmpty: false