MCPcopy
hub / github.com/FoalTS/foal / ApiResponse

Function ApiResponse

packages/core/src/core/openapi/decorators.ts:89–94  ·  view source on GitHub ↗
(
  key: 'default'|'1XX'|'2XX'|'3XX'|'4XX'|'5XX'|number,
  response: IApiResponse | IApiReference | ((controller: any) => IApiResponse | IApiReference)
)

Source from the content-addressed store, hash-verified

87}
88
89export function ApiResponse(
90 key: 'default'|'1XX'|'2XX'|'3XX'|'4XX'|'5XX'|number,
91 response: IApiResponse | IApiReference | ((controller: any) => IApiResponse | IApiReference)
92): OpenApiDecorator {
93 return AddMetadataProperty('api:operation:responses', key.toString(), response);
94}
95
96export function ApiCallback(
97 key: string, callback: IApiCallback | IApiReference | ((controller: any) => IApiCallback | IApiReference)

Callers 15

UseSessionsFunction · 0.90
ApiControllerClass · 0.90
ControllerClass · 0.90
Controller2Class · 0.90
Controller2Class · 0.90
ControllerClass · 0.90
PermissionRequiredFunction · 0.90
UserRequiredFunction · 0.90
ValidateQueryParamFunction · 0.90
ValidateBodyFunction · 0.90
ValidateHeaderFunction · 0.90
ValidatePathParamFunction · 0.90

Calls 1

AddMetadataPropertyFunction · 0.85

Tested by

no test coverage detected