microsoft / microsoft/typespec
[hsjs] Support URI template matching in the router
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
There are parts of routing in HSJS that cannot be accomplished without at least some support for URI templates, particularly reserved expansions. This issue tracks extending the router to match the restricted subset of URI templates that we allow in TypeSpec. Currently, we are still using the older path templates.
- This will enable more sophisticated route differentiation automatically, since query parameters will by construction be included in route differentiation if the router understands URI templates.
- This will allow exploded and reserved expansions.
- This will allow parameters that are within the path but do not constitute a whole segment (e.g. `/path/{param1}-{param2}/`Currently, we treat all path parameters as if they must be strictly separated by slashes.
Contributor guide
Assessment
This issue has not been assessed yet.