docs: fix named parameters docs for endpoint routing - #707
Conversation
There was a problem hiding this comment.
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
routefsection - 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.
64J0
left a comment
There was a problem hiding this comment.
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.
Co-authored-by: Vinícius Gajo <50725287+64J0@users.noreply.github.com>
|
Thank you for the suggestions. They make sense to me, so I’ve committed them. |
64J0
left a comment
There was a problem hiding this comment.
Thanks again for this contribution @AugustoRengel 🚀
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