FastAPI: `dependencies=[Depends(auth), Depends(rate_limit)]` inside the route decorator.
(text: string)
| 357 | |
| 358 | /** FastAPI: `dependencies=[Depends(auth), Depends(rate_limit)]` inside the route decorator. */ |
| 359 | function dependenciesIn(text: string): string[] { |
| 360 | const m = /dependencies\s*=\s*\[([^\]]*)\]/.exec(text); |
| 361 | if (!m) return []; |
| 362 | return m[1]!.split(/,(?![^()]*\))/).map((x) => x.trim()).filter(Boolean); |
| 363 | } |
| 364 | |
| 365 | // ============================================================================= |
| 366 | // The endpoint |