openapi: Add default values to the thing_mount_path parameters (#18935)

This commit is contained in:
Anton Averchenkov
2023-01-31 19:37:16 -05:00
committed by GitHub
parent aa5653a88c
commit 6a9ca261d1
3 changed files with 9 additions and 2 deletions

View File

@@ -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)