Skip to content

classifyResponse

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/response-shape.ts

Classify a handler's response from its source, or return undefined to leave it alone.

source should be the decorators plus the signature plus the body — everything the parser can see about one handler. returnType and routePath sharpen the answer where the body is ambiguous.

Signature

ts
function classifyResponse(source: string, returnType: string, routePath: string): ResponseShape | undefined

Parameters

NameType
sourcestring
returnTypestring
routePathstring

Returns: ResponseShape | undefined

Was this page helpful?

Download as PDF