MCPcopy
hub / github.com/nestjs/swagger / scanModuleControllers

Method scanModuleControllers

lib/swagger-scanner.ts:128–148  ·  view source on GitHub ↗
(
    controller: Map<InjectionToken, InstanceWrapper>,
    applicationConfig: ApplicationConfig,
    options: {
      modulePath: string | undefined;
      globalPrefix: string | undefined;
      operationIdFactory?: OperationIdFactory;
      linkNameFactory?: (
        controllerKey: string,
        methodKey: string,
        fieldKey: string
      ) => string;
      autoTagControllers?: boolean;
      onlyIncludeDecoratedEndpoints?: boolean;
    }
  )

Source from the content-addressed store, hash-verified

126 }
127
128 public scanModuleControllers(
129 controller: Map<InjectionToken, InstanceWrapper>,
130 applicationConfig: ApplicationConfig,
131 options: {
132 modulePath: string | undefined;
133 globalPrefix: string | undefined;
134 operationIdFactory?: OperationIdFactory;
135 linkNameFactory?: (
136 controllerKey: string,
137 methodKey: string,
138 fieldKey: string
139 ) => string;
140 autoTagControllers?: boolean;
141 onlyIncludeDecoratedEndpoints?: boolean;
142 }
143 ): ModuleRoute[] {
144 const denormalizedArray = [...controller.values()].map((ctrl) =>
145 this.explorer.exploreController(ctrl, applicationConfig, options)
146 );
147 return flatten(denormalizedArray) as any;
148 }
149
150 public getModules(
151 modulesContainer: Map<string, Module>,

Callers 1

scanApplicationMethod · 0.95

Calls 1

exploreControllerMethod · 0.80

Tested by

no test coverage detected