diff --git a/api/source/index.ts b/api/source/index.ts index 789ff1e92..e591a8406 100644 --- a/api/source/index.ts +++ b/api/source/index.ts @@ -37,11 +37,13 @@ app.use(catchErrors()) app.use(cors()) -app.use(rateLimiterMiddleware) +router.use('/api/v1', docRoutes(), openapiRoutes(openapi)) + +router.use(rateLimiterMiddleware) const apiRoutes = publicodesAPI(new Engine(rules)) -router.use('/api/v1', apiRoutes, docRoutes(), openapiRoutes(openapi)) +router.use('/api/v1', apiRoutes) app.use(router.routes()) app.use(router.allowedMethods())