Skip to content

docs: fix named parameters docs for endpoint routing - #707

Merged
64J0 merged 2 commits into
giraffe-fsharp:masterfrom
AugustoRengel:docs/704-fix-routef-with-named-parameter-example
Jan 10, 2026
Merged

docs: fix named parameters docs for endpoint routing#707
64J0 merged 2 commits into
giraffe-fsharp:masterfrom
AugustoRengel:docs/704-fix-routef-with-named-parameter-example

Conversation

@AugustoRengel

Copy link
Copy Markdown
Contributor

Description

Removes the example that incorrectly referenced named parameters for routef in the Giraffe.Routing module, since this feature is only supported when using Giraffe.EndpointRouting. It also adds a reference to the official sample.

How to test

Review the updated documentation and verify that the named parameter examples refer only to the Giraffe.EndpointRouting module.

Related issues

Fixes #704

@64J0 64J0 added the documentation Request to change or extend documentation label Jan 9, 2026
@64J0
64J0 requested a review from Copilot January 9, 2026 20:02

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.

Pull request overview

This PR corrects the documentation for the routef handler by clarifying that named parameters (e.g., %i:petId) are only supported when using ASP.NET Core's Endpoint Routing module, not in standard Giraffe routing. This fixes issue #704 where users were attempting to use named parameters with standard routing and finding they didn't work.

Key changes:

  • Removed the misleading named parameter example from the standard routef section
  • Updated the format string description to focus only on format characters
  • Added a clear "Named parameters" subsection explaining that this feature requires Endpoint Routing, with an example and reference to the official sample

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread DOCUMENTATION.md Outdated

@64J0 64J0 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.

Looks good to me, thanks for the contribution @AugustoRengel! I'm adding some suggestions that improve the text IMHO, please check them when you have some time.

Comment thread DOCUMENTATION.md Outdated
Comment thread DOCUMENTATION.md Outdated
Comment thread DOCUMENTATION.md Outdated
Co-authored-by: Vinícius Gajo <50725287+64J0@users.noreply.github.com>
@AugustoRengel

Copy link
Copy Markdown
Contributor Author

Thank you for the suggestions. They make sense to me, so I’ve committed them.

@64J0 64J0 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.

Thanks again for this contribution @AugustoRengel 🚀

@64J0
64J0 merged commit b304625 into giraffe-fsharp:master Jan 10, 2026
5 checks passed
esbenbjerre pushed a commit to esbenbjerre/Giraffe that referenced this pull request Jun 16, 2026
)

* docs: fix named parameters docs for endpoint routing

* Apply suggestions from code review

Co-authored-by: Vinícius Gajo <50725287+64J0@users.noreply.github.com>

---------

Co-authored-by: Vinícius Gajo <50725287+64J0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Request to change or extend documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Routes with named parameters are not matched

3 participants