Closed ctreatma closed 5 months ago
In a pinch we can patch in NVMe
as a supported value (leaving NVME
in place just in case).
Since drive type is not used to differentiate between different component schemas, this could be a safe place to introduce x-enum-as-string
.
The Java generator has a useEnumCaseInsensitive
option, which would be another good approach here, but that's not currently supported by the Go generator and I think we'd have to make a generator code change to add it. An x-enum-case-insensitive
vendor extension could work here, but I think we'd still need to either make a generator code change to make sure that an enum that is a case-insensitive string imports the "strings" package or add a Make task to fix missing imports (the lint
task can't do it because it expects the code being linted to be buildable, and it won't be buildable until the imports are fixed).
The enum concerns mentioned here are related to #134 as well.
This repo is deprecated and this issue has been copied to equinix/equinix-sdk-go
The API spec says that the
type
of a drive in a plan spec must be one of the following:However, the API can return the value
NVMe
, as mentioned in this PR comment from metal-cli: https://github.com/equinix/metal-cli/pull/350#issuecomment-1728298754The spec needs to be updated so that all possible values for
type
are documented accurately in the spec.