Open afbjorklund opened 1 month ago
They are indeed coming from https://github.com/Code-Hex/vz/blob/c3198942b1b797ac424b673e06769f45bef0d275/virtualmachinestate_string.go#L22C1-L23C93
I agree it would make more sense to strip the VirtualMachineState
, I don't think there are many users of this API right now (I'll have to check) so we can probably just do it.
And yes, documenting the possible values would be useful, a list is available there: https://github.com/Code-Hex/vz/blob/c3198942b1b797ac424b673e06769f45bef0d275/virtualization.go#L25-L67
I used both types of values (both "enum" and string), but it did raise some eyebrows during code review...
e.g. "running", "VirtualMachineStateRunning"
Documenting them might be easiest
https://github.com/crc-org/vfkit/blob/main/doc/usage.md#restful-service
It doesn't show the possible values of "string", but it doesn't match the POST:
It should probably be documented? I think the values come straight from vz.