Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VAULT-5813] Remove duplicate sha_256 in SystemCatalogRequest OAS #15163

Merged
merged 4 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/15163.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
sdk: Fix OpenApi spec generator to remove duplicate sha_256 parameter
```
6 changes: 6 additions & 0 deletions sdk/framework/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ func documentPath(p *Path, specialPaths *logical.Paths, requestResponsePrefix st
}

for name, field := range bodyFields {
// Removing this field from the spec as it is deprecated in favor of using "sha256"
// The duplicate sha_256 and sha256 in these paths cause issues with codegen
if name == "sha_256" && strings.Contains(path, "plugins/catalog/") {
continue
}

openapiField := convertType(field.Type)
if field.Required {
s.Required = append(s.Required, name)
Expand Down