Skip to content

Commit b8b35ba

Browse files
docs(router): add changes based on suggestions
1 parent 585761f commit b8b35ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/docs-app/docs/features/api/overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ With this configuration, Analog exposes the API routes under the `/services` pre
7474

7575
A route defined in `src/server/routes/v1/hello.ts` can now be accessed at `/services/v1/hello`.
7676

77-
## Route with Dynamic Parameters
77+
## Dynamic API Routes
7878

79-
Routes can use dynamic parameters within brackets in the file name like `/api/hello/[name].ts` and be accessed via event.context.params.
79+
Dynamic API routes are defined by using the filename as the route path enclosed in square brackets. Parameters can be accessed via `event.context.params`.
8080

8181
```ts
8282
// /server/routes/v1/hello/[name].ts
@@ -87,7 +87,7 @@ export default defineEventHandler(
8787
);
8888
```
8989

90-
OR
90+
Another way to access route parameters is by using the `getRouterParam` function.
9191

9292
```ts
9393
// /server/routes/v1/hello/[name].ts
@@ -101,7 +101,7 @@ export default defineEventHandler((event) => {
101101

102102
## Specific HTTP request method
103103

104-
File names can be suffixed with .get, .post, .put, .delete, ... to match request's HTTP Method.
104+
File names can be suffixed with `.get`, `.post`, `.put`, `.delete`, etc. to match the specific HTTP request method.
105105

106106
### GET
107107

0 commit comments

Comments
 (0)