Skip to content

pickValueAndTitle

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/param-source-inference.ts

Pick the value and label properties. The value is the item's own identifier — preferring a plain id over a foreign key like projectId, which would submit the wrong entity.

Signature

ts
function pickValueAndTitle(item: SchemaLike, paramName: string): { itemValuePath: string; itemTitlePath: string } | null

Parameters

NameType
itemSchemaLike
paramNamestring

Returns: { itemValuePath: string; itemTitlePath: string } | null

Was this page helpful?

Download as PDF