Skip to content

tsoa-next / tsoa-next / normalisePath

Function: normalisePath()

ts
function normalisePath(
   path, 
   withPrefix?, 
   withSuffix?, 
   skipPrefixAndSuffixIfEmpty?): string;

Defined in: packages/runtime/src/utils/pathUtils.ts:43

Normalizes slash usage in a route path and optionally applies a prefix and suffix.

Parameters

path

string

withPrefix?

string

withSuffix?

string

skipPrefixAndSuffixIfEmpty?

boolean

Returns

string

TypeScript-first OpenAPI generation, route generation, and runtime validation.