Repository navigation
docs: fix incorrect defaults and code examples in Server.md - #6805
Merged
Eomm merged 3 commits intoJul 5, 2026
Merged
Conversation
- Fix genReqId note: requestIdHeader defaults to false, not request-id - Fix frameworkErrors example: use error (the param name), not err - Fix buildPrettyMeta example: show as factory option, not inside route - Fix routerOptions querystringParser: default is fast-querystring, not node:querystring Fixes fastify#6767
Contributor
There was a problem hiding this comment.
Pull request overview
This PR corrects several inaccuracies and broken snippets in docs/Reference/Server.md, aligning documentation defaults and examples with Fastify’s actual behavior and intended usage.
Changes:
- Fixes
requestIdHeaderdefault noted undergenReqIdtofalse. - Corrects a
frameworkErrorsexample to send the definederrorvariable. - Makes the
buildPrettyMetaexample syntactically valid by showing it inrouterOptions, and updates therouterOptions.querystringParsersection to reflectfast-querystringas the default.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]> Signed-off-by: Adit Jain <[email protected]>
Eomm
approved these changes
Jun 28, 2026
metcoder95
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6767
Corrects four documentation inaccuracies in
docs/Reference/Server.md:genReqIdnote (line ~523): statedrequestIdHeaderdefaults to'request-id', but the actual default isfalse(seefastify.jsline 877).frameworkErrorsexample (line ~724): the handler parameter iserrorbut the example referenced undefinederr.buildPrettyMetaexample (lines ~849-863): was incorrectly nested inside a route handler (fastify.get(...)), making it syntactically invalid. Corrected to show it as a factoryrouterOptionsconfiguration.querystringParserunder routerOptions (lines ~1065-1093): stated the default is "Node.js's corequerystringmodule" and importednode:querystringin the example. The actual default isfast-querystring, matching the description in the top-level factory option section.Bug 3 from the issue (
serializerCompilerdouble braces in Routes.md) appears to already be fixed on main.