Wrap On/Off values with quotes

OpenApi Generator conceders On/Off values in spec as boolean. Therefore
we need to specify On/Off values as strings explicitly to avoid
conversion to bool

Change-Id: I011c3f11aa6dc2fefe5d4a1333b0f7b7aceff6d6
This commit is contained in:
Dmitry Ukov 2020-03-18 14:37:38 +04:00
parent 279a313a81
commit db034d1d75
3 changed files with 6 additions and 6 deletions

View File

@ -333,8 +333,8 @@ components:
type: string
PowerState:
enum:
- "true"
- "false"
- On
- Off
- PoweringOn
- PoweringOff
type: string

View File

@ -13,8 +13,8 @@ type PowerState string
// List of PowerState
const (
POWERSTATE_TRUE PowerState = "true"
POWERSTATE_FALSE PowerState = "false"
POWERSTATE_ON PowerState = "On"
POWERSTATE_OFF PowerState = "Off"
POWERSTATE_POWERING_ON PowerState = "PoweringOn"
POWERSTATE_POWERING_OFF PowerState = "PoweringOff"
)

View File

@ -51,8 +51,8 @@ components:
PowerState:
type: string
enum:
- On
- Off
- "On"
- "Off"
- PoweringOn
- PoweringOff
ResetType: