diff --git a/docs/1.guide/2.routing.md b/docs/1.guide/2.routing.md index 53d6643b69..c14909c9ec 100644 --- a/docs/1.guide/2.routing.md +++ b/docs/1.guide/2.routing.md @@ -205,13 +205,14 @@ Returning anything from a middleware will close the request and should be avoide ### Route Meta -You can define route handler meta at build-time using `defineRouteMeta` micro in the event handler files. +You can define route handler meta at build-time using `defineRouteMeta` macro in the event handler files. > [!IMPORTANT] > 🚧 This feature is currently experimental. ```ts [/api/test.ts] defineRouteMeta({ + openAPIEnabled: false, // defaults to true openAPI: { tags: ["test"], description: "Test route description", @@ -298,6 +299,7 @@ export default defineNitroConfig({ '/blog/**': { cache: { /* cache options*/ } }, '/assets/**': { headers: { 'cache-control': 's-maxage=0' } }, '/api/v1/**': { cors: true, headers: { 'access-control-allow-methods': 'GET' } }, + '/api/v1/admin/**': { openAPIEnabled: false }, '/old-page': { redirect: '/new-page' }, '/old-page/**': { redirect: '/new-page/**' }, '/proxy/example': { proxy: 'https://example.com' }, @@ -314,6 +316,7 @@ export default defineNuxtConfig({ '/blog/**': { cache: { /* cache options*/ } }, '/assets/**': { headers: { 'cache-control': 's-maxage=0' } }, '/api/v1/**': { cors: true, headers: { 'access-control-allow-methods': 'GET' } }, + '/api/v1/admin/**': { openAPIEnabled: false }, '/old-page': { redirect: '/new-page' }, '/old-page/**': { redirect: '/new-page/**' }, '/proxy/example': { proxy: 'https://example.com' }, diff --git a/docs/3.config/0.index.md b/docs/3.config/0.index.md index 544ba33141..dcb3cb0b03 100644 --- a/docs/3.config/0.index.md +++ b/docs/3.config/0.index.md @@ -361,6 +361,7 @@ routeRules: { '/blog/**': { cache: { /* cache options*/ } }, '/assets/**': { headers: { 'cache-control': 's-maxage=0' } }, '/api/v1/**': { cors: true, headers: { 'access-control-allow-methods': 'GET' } }, + '/api/v1/admin/**': { openAPIEnabled: false }, '/old-page': { redirect: '/new-page' }, // uses status code 307 (Temporary Redirect) '/old-page2': { redirect: { to:'/new-page2', statusCode: 301 } }, '/old-page/**': { redirect: '/new-page/**' },