()
| 236 | } |
| 237 | |
| 238 | protected buildPaths() { |
| 239 | const paths: { [pathName: string]: Swagger.Path3 } = {}; |
| 240 | |
| 241 | this.metadata.controllers.forEach(controller => { |
| 242 | const normalisedControllerPath = normalisePath(controller.path, '/'); |
| 243 | // construct documentation using all methods except @Hidden |
| 244 | controller.methods |
| 245 | .filter(method => !method.isHidden) |
| 246 | .forEach(method => { |
| 247 | const normalisedMethodPath = normalisePath(method.path, '/'); |
| 248 | let path = normalisePath(`${normalisedControllerPath}${normalisedMethodPath}`, '/', '', false); |
| 249 | path = convertColonPathParams(path); |
| 250 | paths[path] = paths[path] || {}; |
| 251 | this.buildMethod(controller.name, method, paths[path], controller.produces); |
| 252 | }); |
| 253 | }); |
| 254 | |
| 255 | return paths; |
| 256 | } |
| 257 | |
| 258 | protected buildMethod(controllerName: string, method: Tsoa.Method, pathObject: any, defaultProduces?: string[]) { |
| 259 | const pathMethod: Swagger.Operation3 = (pathObject[method.method] = this.buildOperation(controllerName, method, defaultProduces)); |
no test coverage detected