Skip to content

mergeRouteParams

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/path-parameters.ts

The parameters a route declares, with everything the parser already knows kept intact.

Declared entries win outright — they carry the handler's real type and any prose — and are never reordered or dropped, so this can only ever add. Missing segments are appended in URL order as plain strings, which is what the template alone can honestly say about them.

Signature

ts
function mergeRouteParams(template: string, declared: ParameterDefinition[]): ParameterDefinition[]

Parameters

NameType
templatestring
declaredParameterDefinition[]

Returns: ParameterDefinition[]

Was this page helpful?

Download as PDF