Skip to content

declaredResponseSchema

reference
1 min readUpdated

Kind: Function

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

The response schema the handler's swagger decorators declare for status, if any.

@ApiResponse({ status: 200, description: '…' }) with no schema/type declares nothing about the body and is ignored — a description is prose, not a shape.

Signature

ts
function declaredResponseSchema(method: MethodDeclaration, status: string, ctx: OriginContext): Record<string, unknown> | undefined

Parameters

NameType
methodMethodDeclaration
statusstring
ctxOriginContext

Returns: Record<string, unknown> | undefined

Was this page helpful?

Download as PDF