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

This commit is contained in:
AnPucel 2022-04-25 13:12:08 -07:00 committed by GitHub
parent a06f9863e7
commit 2b5be0adec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

3
changelog/15163.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
sdk: Fix OpenApi spec generator to remove duplicate sha_256 parameter
```

View File

@ -336,6 +336,12 @@ func documentPath(p *Path, specialPaths *logical.Paths, requestResponsePrefix st
} }
for name, field := range bodyFields { 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) openapiField := convertType(field.Type)
if field.Required { if field.Required {
s.Required = append(s.Required, name) s.Required = append(s.Required, name)