Skip to content

docs: fix syntax errors in code examples - #7159

Merged
Tony133 merged 2 commits into
fastify:mainfrom
mayur-dhavan:patch-1
Oct 25, 2026
Merged

Tony133 merged 2 commits into
fastify:mainfrom
mayur-dhavan:patch-1

Conversation

@mayur-dhavan

Copy link
Copy Markdown
Contributor

Two code examples in the docs have syntax errors that break
parsing when copied:

  • docs/Guides/Migration-Guide-V5.md: both hasRoute examples
    (the v4 and v5 snippets) are missing the closing } of the
    options object before )); // true.
  • docs/Reference/Validation-and-Serialization.md: the response
    content-types schema example is missing a comma after the
    description string, before content:.

Each fixed example was verified to parse with the TypeScript
compiler. Docs only.

Signed-off-by: Mayur Dhavan <118877752+mayur-dhavan@users.noreply.github.com>
Signed-off-by: Mayur Dhavan <118877752+mayur-dhavan@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 13:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 25, 2026
@Eomm Eomm added the backport 5.x Issue or pr that should be backported to Fastify v5 label Oct 25, 2026
@Tony133
Tony133 merged commit 5df959f into fastify:main Oct 25, 2026
9 checks passed
Tony133 pushed a commit that referenced this pull request Oct 25, 2026
Two code examples in the docs have syntax errors that break
parsing when copied:

- docs/Guides/Migration-Guide-V5.md: both `hasRoute` examples
  (the v4 and v5 snippets) are missing the closing `}` of the
  options object before `)); // true`.
- docs/Reference/Validation-and-Serialization.md: the response
  content-types schema example is missing a comma after the
  `description` string, before `content:`.

Each fixed example was verified to parse with the TypeScript
compiler. Docs only.

---------

Signed-off-by: Mayur Dhavan <118877752+mayur-dhavan@users.noreply.github.com>
(cherry picked from commit 5df959f)
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.

4 participants