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:
parent
279a313a81
commit
db034d1d75
|
@ -333,8 +333,8 @@ components:
|
|||
type: string
|
||||
PowerState:
|
||||
enum:
|
||||
- "true"
|
||||
- "false"
|
||||
- On
|
||||
- Off
|
||||
- PoweringOn
|
||||
- PoweringOff
|
||||
type: string
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -51,8 +51,8 @@ components:
|
|||
PowerState:
|
||||
type: string
|
||||
enum:
|
||||
- On
|
||||
- Off
|
||||
- "On"
|
||||
- "Off"
|
||||
- PoweringOn
|
||||
- PoweringOff
|
||||
ResetType:
|
||||
|
|
Loading…
Reference in New Issue