From 8f580023f156d0a037e2881927d3f6af77eb1c3c Mon Sep 17 00:00:00 2001 From: vanyauhalin Date: Fri, 6 Dec 2024 18:46:26 +0400 Subject: [PATCH] sanitize the name of the endpoint for the operation with the url --- site/generations/service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/site/generations/service.ts b/site/generations/service.ts index 3150a8daf..1c7b1f3bf 100644 --- a/site/generations/service.ts +++ b/site/generations/service.ts @@ -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) } @@ -94,3 +95,7 @@ class ResourcePather { return s } } + +function sanitizeName(t: string): string { + return t.replaceAll("/", " ") +}