Skip to content

mcp/Resource: Refactor URI Template Matching with uritemplate Library #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

cryo-zd
Copy link
Contributor

@cryo-zd cryo-zd commented Jul 7, 2025

Changes:

  1. Replaced the uriTemplateToRegexp function with the use of yosida95/uritemplate to handle URI template matching as per the request.
  2. Updated the relevant test cases to verify the new implementation and fixed an invalid URI template ("file:///{}/{a}/{b}") that doesn't conform to RFC 6570 due to an empty {} expression.
  3. Updated go.mod and go.sum to reflect the new dependency.

Fixes #11

jba
jba previously approved these changes Jul 7, 2025
Copy link
Contributor

@jba jba left a comment

Choose a reason for hiding this comment

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

Thank you!

@jba
Copy link
Contributor

jba commented Jul 7, 2025

Can you resolve the conflict and re-push?

@cryo-zd cryo-zd force-pushed the refact/template branch from bb53bb5 to ca1dd25 Compare July 8, 2025 02:21
@cryo-zd cryo-zd requested a review from jba July 8, 2025 02:30
@cryo-zd
Copy link
Contributor Author

cryo-zd commented Jul 8, 2025

Can you resolve the conflict and re-push?

Sorry for my late response, I have updated it and you could review it again.

@jba jba merged commit fbff31a into modelcontextprotocol:main Jul 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URI template support
2 participants