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

Function ApiDefineSchema

packages/core/src/core/openapi/decorators.ts:106–110  ·  view source on GitHub ↗
(
  key: string, schema: IApiSchema | IApiReference | ((controller: any) => IApiSchema | IApiReference)
)

Source from the content-addressed store, hash-verified

104}
105
106export function ApiDefineSchema(
107 key: string, schema: IApiSchema | IApiReference | ((controller: any) => IApiSchema | IApiReference)
108): OpenApiDecorator {
109 return AddMetadataProperty('api:components:schemas', key, schema);
110}
111
112export function ApiDefineResponse(
113 key: string, response: IApiResponse | IApiReference | ((controller: any) => IApiResponse | IApiReference)

Callers 7

ControllerClass · 0.90
ControllerClass · 0.90
ApiControllerClass · 0.90
ApiControllerClass · 0.90
PetControllerClass · 0.90
StoreControllerClass · 0.90
UserControllerClass · 0.90

Calls 1

AddMetadataPropertyFunction · 0.85

Tested by

no test coverage detected