Skip to content

Commit

Permalink
sanitize the name of the endpoint for the operation with the url
Browse files Browse the repository at this point in the history
  • Loading branch information
vanyauhalin committed Dec 6, 2024
1 parent 1729577 commit 8f58002
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion site/generations/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class ResourcePather {
let c: Declaration | undefined = d

while (c) {
s = `${c.name}/${s}`
const n = sanitizeName(c.name)
s = `${n}/${s}`
c = retrieve(c.parent)
}

Expand All @@ -94,3 +95,7 @@ class ResourcePather {
return s
}
}

function sanitizeName(t: string): string {
return t.replaceAll("/", " ")
}

0 comments on commit 8f58002

Please sign in to comment.