You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NestJS matches paths with its platform's router. A param with literal text after it works only when that text starts with `.` or `-`, and a catch-all param must fill its whole segment. `/files/{name}.json` works, while `/apps/{id}:publish`, `/files/{name}json` and `/files/x{+path}.json` throw.
51
+
:::
52
+
49
53
## Implement Your Contract
50
54
51
55
To implement your contract in NestJS, use the `@Implement` decorator and the `implement` function. The `@Implement` very similar to NestJS built-in HTTP method decorators (e.g., `@Get`, `@Post`) and can be used to implement either a single procedure contract or an [router contract](/docs/contract/router) or combine with other NestJS decorators.
Copy file name to clipboardExpand all lines: apps/content/docs/migrations/from-v1.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ const listPlanet = os
106
106
:::
107
107
108
108
:::warning[rou3 path syntax is now literal text]
109
-
v1 also accepted rou3 syntax such as `/:id` and `**`. v2 reads only `{name}` and `{+name}`filling a whole path segment, so anything else is literal text and the route returns 404. This includes paths set with the `.route` extension.
109
+
v1 also accepted rou3 syntax such as `/:id` and `**`. v2 reads only `{name}` and `{+name}`([Path Parameters](/docs/openapi/routing#path-parameters)), so anything else is literal text and the route returns 404. This includes paths set with the `.route` extension.
Copy file name to clipboardExpand all lines: apps/content/docs/openapi/routing.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,8 @@ const getFile = os
46
46
47
47
A path can have only one `{+name}`, but more segments can follow it, as in `/files/{+path}/raw`.
48
48
49
+
A param can have literal text around it in its segment, as in `/files/{name}.json`, `/apps/{id}:publish` or `/files/x{+path}.json`. A segment can have only one param, and a name only ASCII letters, digits, `_` and `-`, so `/{name}-{version}.zip` and `/{a.b}` throw when the OpenAPI handler starts or the spec is generated.
50
+
49
51
:::info
50
52
To customize path parameter encoding and decoding, see [Path Parameter Styles](/docs/openapi/input-and-output-mapping#path-parameter-styles).
0 commit comments