microsoft / microsoft/typespec

[hsjs] Support URI template matching in the router

Open
#6,933 0 comments 0 reactions 0 assignees View on GitHub
emitter:service:js feature triaged:core
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.