Skip to content

docs: document fastify.query() shorthand for RFC 10008 - #7004

Merged
mcollina merged 2 commits into
fastify:mainfrom
Puppo:docs/rfc-10008-query-routes
Oct 10, 2026
Merged

mcollina merged 2 commits into
fastify:mainfrom
Puppo:docs/rfc-10008-query-routes

Conversation

@Puppo

@Puppo Puppo commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

Why

PR #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.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 1, 2026
@Puppo
Puppo marked this pull request as draft September 1, 2026 06:35
PR fastify#6832 added the QUERY HTTP method and the fastify.query() route
shorthand, but Routes.md was not updated alongside the Server.md and
Errors.md changes.

- List QUERY in the supported methods for the route  option.
- Add QUERY to the methods for which the  schema is validated.
- Add the fastify.query() entry in the Shorthand declaration list.
- Note the Content-Type requirement (400 FST_ERR_ROUTE_MISSING_CONTENT_TYPE).
@Puppo
Puppo force-pushed the docs/rfc-10008-query-routes branch from f242e97 to b41ac06 Compare September 1, 2026 06:36
@Puppo
Puppo marked this pull request as ready for review September 1, 2026 06:37

@mcollina mcollina 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

@Tony133 Tony133 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

@mcollina
mcollina merged commit 3963a51 into fastify:main Oct 10, 2026
5 checks passed
@mcollina mcollina added the backport 5.x Issue or pr that should be backported to Fastify v5 label Oct 10, 2026
Tony133 added a commit that referenced this pull request Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 5.x Issue or pr that should be backported to Fastify v5 documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants