This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update spec for plan drive type to match API response (#155)
Relates to #154 (technically a fix, but I want to leave that issue open in hopes of a better solution later) This updates the enum items for drive types in a plan spec to change `NVME` to `NVMe`. The original spec has `NVME`, but the API actually uses the value `NVMe`, and the difference in case causes API responses to be invalid according to the spec. I tried patching in `NVMe` as an additional option, as mentioned in #154 (comment), but that causes the generator to generate invalid code because the constants for `NVMe` and `NVME` are both generated with the same name: ``` metal/v1/model_plan_specs_drives_inner_type.go:27:2: PLANSPECSDRIVESINNERTYPE_NVME redeclared in this block ``` We could patch the spec to remove the enum entirely for this property, but I wanted to keep this change as small as possible.
- Loading branch information
Showing
5 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/spec/oas3.patched/components/schemas/Plan.yaml b/spec/oas3.patched/components/schemas/Plan.yaml | ||
index 0b5f1d5..c8cdf6f 100644 | ||
--- a/spec/oas3.patched/components/schemas/Plan.yaml | ||
+++ b/spec/oas3.patched/components/schemas/Plan.yaml | ||
@@ -97,7 +97,7 @@ properties: | ||
enum: | ||
- HDD | ||
- SSD | ||
- - NVME | ||
+ - NVMe | ||
size: | ||
type: string | ||
example: 3.84TB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ properties: | |
enum: | ||
- HDD | ||
- SSD | ||
- NVME | ||
- NVMe | ||
size: | ||
type: string | ||
example: 3.84TB | ||
|