mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
openapi: Add default values to the thing_mount_path parameters (#18935)
This commit is contained in:
committed by
GitHub
parent
aa5653a88c
commit
6a9ca261d1
3
changelog/18935.txt
Normal file
3
changelog/18935.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
```release-note:improvement
|
||||||
|
openapi: Add default values to thing_mount_path parameters
|
||||||
|
```
|
||||||
@@ -910,6 +910,9 @@ func (d *OASDocument) CreateOperationIDs(context string) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Discard "_mount_path" from any {thing_mount_path} parameters
|
||||||
|
path = strings.Replace(path, "_mount_path", "", 1)
|
||||||
|
|
||||||
// Space-split on non-words, title case everything, recombine
|
// Space-split on non-words, title case everything, recombine
|
||||||
opID := nonWordRe.ReplaceAllString(strings.ToLower(path), " ")
|
opID := nonWordRe.ReplaceAllString(strings.ToLower(path), " ")
|
||||||
opID = strings.Title(opID)
|
opID = strings.Title(opID)
|
||||||
|
|||||||
@@ -4606,9 +4606,10 @@ func (b *SystemBackend) pathInternalOpenAPI(ctx context.Context, req *logical.Re
|
|||||||
Description: "Path that the backend was mounted at",
|
Description: "Path that the backend was mounted at",
|
||||||
In: "path",
|
In: "path",
|
||||||
Schema: &framework.OASSchema{
|
Schema: &framework.OASSchema{
|
||||||
Type: "string",
|
Type: "string",
|
||||||
|
Default: strings.TrimRight(mount, "/"),
|
||||||
},
|
},
|
||||||
Required: true,
|
Required: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user