Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: access handler name add properties to req route options #4470

Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b55808e
fix: 'Error' is not assignable to parameter of type 'null'
cesarvspr Dec 15, 2022
c8b3e19
chore: add handler, schema and config to req.routeOptions
cesarvspr Dec 17, 2022
8adce4d
rollback not needed change
cesarvspr Dec 17, 2022
59236db
Update lib/request.js
cesarvspr Dec 19, 2022
e617fb8
chore: use deepFreeze
cesarvspr Dec 19, 2022
7b13dd8
chore: use Object.defineProperty
cesarvspr Dec 24, 2022
5012a19
chore: use defineProperties
cesarvspr Dec 24, 2022
e3b72dc
chore: add tests
cesarvspr Dec 24, 2022
61dcac5
fix: test count exceeds plan
cesarvspr Dec 24, 2022
b8e10f8
fix: test count exceeds plan
cesarvspr Dec 24, 2022
9cf1318
fix: add TODO
cesarvspr Dec 24, 2022
398b158
chore: review improvements
cesarvspr Dec 24, 2022
d869181
Merge branch 'main' of github.com:fastify/fastify into (#4439)-Access…
cesarvspr Dec 28, 2022
c0b4b34
fix: proper warning codes
cesarvspr Dec 28, 2022
81a87aa
Merge branch 'main' into (#4439)-Access-handler-name-add-properties-t…
Eomm Mar 12, 2023
acc8b31
Merge branch 'main' into (#4439)-Access-handler-name-add-properties-t…
Fdawgs Mar 13, 2023
b9ad2b5
Merge branch 'main' into (#4439)-Access-handler-name-add-properties-t…
Eomm May 14, 2023
3a64cef
Update test/request.deprecated.test.js
Uzlopak Jul 8, 2023
5eb061b
Merge branch 'main' into (#4439)-Access-handler-name-add-properties-t…
Uzlopak Aug 6, 2023
c13caa1
Merge branch 'main' into (#4439)-Access-handler-name-add-properties-t…
Uzlopak Aug 21, 2023
3e3d05c
Apply suggestions from code review
Uzlopak Aug 21, 2023
8e5602e
add documentation
Uzlopak Aug 21, 2023
1c1901d
add missing documentation
Uzlopak Aug 21, 2023
232cc3e
Update docs/Reference/Request.md
Uzlopak Aug 23, 2023
53ecf4a
Merge branch 'main' into (#4439)-Access-handler-name-add-properties-t…
metcoder95 Aug 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/Reference/Request.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Request is a core Fastify object containing the following fields:
- `url` - the URL of the incoming request
- `originalUrl` - similar to `url`, this allows you to access the
original `url` in case of internal re-routing
- `routerMethod` - Deprecated, use `request.routeOptions.schema` instead. The
- `routerMethod` - Deprecated, use `request.routeOptions.method` instead. The
method defined for the router that is handling the request
- `routerPath` - Deprecated, use `request.routeOptions.config.url` instead. The
path pattern defined for the router that is handling the request
Expand All @@ -47,12 +47,14 @@ Request is a core Fastify object containing the following fields:
object.
- `routeOptions` - The route [`option`](./Routes.md#routes-options) object
- `bodyLimit` - either server limit or route limit
- `config` - the [`config`](./Routes.md#routes-config) object for this route
- `method` - the http method for the route
- `url` - the path of the URL to match this route
- `handler` - the handler for this route
- `attachValidation` - attach `validationError` to request
(if there is a schema defined)
- `logLevel` - log level defined for this route
- `schema` - the scheme definition for this route
Uzlopak marked this conversation as resolved.
Show resolved Hide resolved
- `version` - a semver compatible string that defines the version of the endpoint
- `exposeHeadRoute` - creates a sibling HEAD route for any GET routes
- `prefixTrailingSlash` - string used to determine how to handle passing /
Expand Down