mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-31 18:48:08 +00:00
Move version out of SDK. (#14229)
Move version out of SDK. For now it's a copy rather than move: the part not addressed by this change is sdk/helper/useragent.String, which we'll want to remove in favour of PluginString. That will have to wait until we've removed uses of useragent.String from all builtins.
This commit is contained in:
@@ -547,7 +547,16 @@ func (b *Backend) handleRootHelp(req *logical.Request) (*logical.Response, error
|
||||
genericMountPaths, _ := req.Get("genericMountPaths").(bool)
|
||||
|
||||
// Build OpenAPI response for the entire backend
|
||||
doc := NewOASDocument()
|
||||
vaultVersion := "unknown"
|
||||
if b.System() != nil {
|
||||
env, err := b.System().PluginEnv(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
vaultVersion = env.VaultVersion
|
||||
}
|
||||
|
||||
doc := NewOASDocument(vaultVersion)
|
||||
if err := documentPaths(b, requestResponsePrefix, genericMountPaths, doc); err != nil {
|
||||
b.Logger().Warn("error generating OpenAPI", "error", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user