VAULT-24437 Address OpenAPI endpoint ignoring redact_version listener parameter (#26607)

* VAULT-24437 Address OpenAPI endpoint ignoring redact_version listener parameter

* VAULT-24437 changelog

* VAULT-24437 changelog mistake
This commit is contained in:
Violet Hynes
2024-04-24 12:16:55 -04:00
committed by GitHub
parent 5369aa88b0
commit b896dc1610
5 changed files with 134 additions and 3 deletions

View File

@@ -384,6 +384,10 @@ func (p *Path) helpCallback(b *Backend) OperationFunc {
vaultVersion = env.VaultVersion
}
}
redactVersion, _, _, _ := logical.CtxRedactionSettingsValue(ctx)
if redactVersion {
vaultVersion = ""
}
doc := NewOASDocument(vaultVersion)
if err := documentPath(p, b, requestResponsePrefix, doc); err != nil {
b.Logger().Warn("error generating OpenAPI", "error", err)