docs([[...rest]]): add experimental banner (#13641)
This feature is still experimental.
This commit is contained in:
parent
ad24a0c855
commit
f49309a92e
2 changed files with 6 additions and 0 deletions
|
@ -82,6 +82,9 @@ Now, a request to `/api/post/a/b/c` will respond with the text: `Post: a, b, c`.
|
||||||
|
|
||||||
### Optional catch all API routes
|
### Optional catch all API routes
|
||||||
|
|
||||||
|
> **Warning**: This feature is **experimental and may not work as expected**.
|
||||||
|
> You must enable the `optionalCatchAll` experimental option to try it.
|
||||||
|
|
||||||
Catch all routes can be made optional by including the parameter in double brackets (`[[...slug]]`).
|
Catch all routes can be made optional by including the parameter in double brackets (`[[...slug]]`).
|
||||||
|
|
||||||
For example, `pages/api/post/[[...slug]].js` will match `/api/post`, `/api/post/a`, `/api/post/a/b`, and so on.
|
For example, `pages/api/post/[[...slug]].js` will match `/api/post`, `/api/post/a`, `/api/post/a/b`, and so on.
|
||||||
|
|
|
@ -87,6 +87,9 @@ And in the case of `/post/a/b`, and any other matching path, new parameters will
|
||||||
|
|
||||||
### Optional catch all routes
|
### Optional catch all routes
|
||||||
|
|
||||||
|
> **Warning**: This feature is **experimental and may not work as expected**.
|
||||||
|
> You must enable the `optionalCatchAll` experimental option to try it.
|
||||||
|
|
||||||
Catch all routes can be made optional by including the parameter in double brackets (`[[...slug]]`).
|
Catch all routes can be made optional by including the parameter in double brackets (`[[...slug]]`).
|
||||||
|
|
||||||
For example, `pages/post/[[...slug]].js` will match `/post`, `/post/a`, `/post/a/b`, and so on.
|
For example, `pages/post/[[...slug]].js` will match `/post`, `/post/a`, `/post/a/b`, and so on.
|
||||||
|
|
Loading…
Reference in a new issue