openapi: Add default values to the thing_mount_path parameters (#18935)
This commit is contained in:
parent
6487fe6ae8
commit
7b356f0366
|
@ -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
|
||||
}
|
||||
|
||||
// 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
|
||||
opID := nonWordRe.ReplaceAllString(strings.ToLower(path), " ")
|
||||
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",
|
||||
In: "path",
|
||||
Schema: &framework.OASSchema{
|
||||
Type: "string",
|
||||
Type: "string",
|
||||
Default: strings.TrimRight(mount, "/"),
|
||||
},
|
||||
Required: true,
|
||||
Required: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue