Webroute

@webroute/oasType aliases

ParseBody

ParseBody<T, TRef>: T extends oas31.ReferenceObject ? ParseBodyOrResponseReference<T, "requestBodies", TRef> : T extends oas31.RequestBodyObject ? ParseBodyOrResponseObject<T, TRef> | T["required"] extends true ? never : undefined : unknown

Parses a single request body object of an OAS definition.

Type Parameters

Type Parameter
T extends BodyObjectOrRef | undefined
TRef extends oas31.ComponentsObject

On this page