Skip to content

[Backport 5.x] docs: document fastify.query() shorthand for RFC 10008 - #7094

Merged
Tony133 merged 2 commits into
5.xfrom
backport-7004-to-5.x
Oct 12, 2026
Merged

Tony133 merged 2 commits into
5.xfrom
backport-7004-to-5.x

Conversation

@github-actions

Copy link
Copy Markdown

Backport 3963a51 from #7004.

## Why

PR [#6832](#6832) introduced the
QUERY HTTP method (RFC 10008) and the `fastify.query()` route shorthand.
`docs/Reference/Server.md` and `docs/Reference/Errors.md` were updated
as part of that PR, but `docs/Reference/Routes.md` was not — leaving
users without a doc entry for the new shorthand and a stale list of
supported methods.

## What

Four edits to `docs/Reference/Routes.md`:

1. Add `QUERY` to the methods listed for the `method` route option.
2. Add `QUERY` to the methods for which the `body` schema is validated.
3. Add the `fastify.query(path, [options], handler)` shorthand entry
after `fastify.patch`.
4. Note that QUERY (RFC 10008) requires a `Content-Type` header

## Verification

`npx markdownlint-cli2 docs/Reference/Routes.md` — no errors.

Co-authored-by: Antonio Tripodi <[email protected]>
(cherry picked from commit 3963a51)

@gurgunday gurgunday left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gurgunday

Copy link
Copy Markdown
Member

Can someone fix the lint?

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 12, 2026
@Tony133

Tony133 commented Oct 12, 2026

Copy link
Copy Markdown
Member

CI all green ✅ 🙌

@Tony133
Tony133 merged commit 63496de into 5.x Oct 12, 2026
28 checks passed
@Tony133
Tony133 deleted the backport-7004-to-5.x branch October 12, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants