diff --git a/docusaurus/docs/cms/backend-customization/routes.md b/docusaurus/docs/cms/backend-customization/routes.md
index f5920ea584..5922735aaf 100644
--- a/docusaurus/docs/cms/backend-customization/routes.md
+++ b/docusaurus/docs/cms/backend-customization/routes.md
@@ -209,8 +209,9 @@ In the following example, the custom routes file name is prefixed with `01-` to
```js title="./src/api/restaurant/routes/01-custom-restaurant.js"
-
-module.exports = {
+/** @type {import('@strapi/strapi').Core.RouterConfig} */
+const config = {
+ type: 'content-api',
routes: [
{ // Path defined with an URL parameter
method: 'POST',
@@ -224,6 +225,8 @@ module.exports = {
}
]
}
+
+module.exports = config
```
@@ -231,8 +234,10 @@ module.exports = {
```js title="./src/api/restaurant/routes/01-custom-restaurant.ts"
+import type { Core } from '@strapi/strapi';
-export default {
+const config: Core.RouterConfig = {
+ type: 'content-api',
routes: [
{ // Path defined with a URL parameter
method: 'GET',
@@ -246,6 +251,8 @@ export default {
}
]
}
+
+export default config
```
diff --git a/docusaurus/static/llms-code.txt b/docusaurus/static/llms-code.txt
index f568818578..cca1062ebe 100644
--- a/docusaurus/static/llms-code.txt
+++ b/docusaurus/static/llms-code.txt
@@ -13372,8 +13372,9 @@ Language: JavaScript
File path: ./src/api/restaurant/routes/01-custom-restaurant.js
```js
-
-module.exports = {
+/** @type {import('@strapi/strapi').Core.RouterConfig} */
+const config = {
+ type: 'content-api',
routes: [
{ // Path defined with an URL parameter
method: 'POST',
@@ -13387,6 +13388,8 @@ module.exports = {
}
]
}
+
+module.exports = config
```
---
@@ -13394,8 +13397,10 @@ Language: TypeScript
File path: ./src/api/restaurant/routes/01-custom-restaurant.ts
```ts
+import type { Core } from '@strapi/strapi';
-export default {
+const config: Core.RouterConfig = {
+ type: 'content-api',
routes: [
{ // Path defined with a URL parameter
method: 'GET',
@@ -13409,6 +13414,8 @@ export default {
}
]
}
+
+export default config
```