Skip to content
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

Teach matchPath to honor fragments containing both concrete and templated parts #1876

Merged
merged 2 commits into from
Aug 26, 2021

Conversation

nulltoken
Copy link
Contributor

@nulltoken nulltoken commented Aug 25, 2021

Summary

Previous implementation was ignoring concrete parts of path segments while trying to match requests to potential operations: the matcher was wrongly thinking /something was a good fit for /somethingelse.{format}.

This proposal fixes this.

This PR also includes a commit to make Windows contributors' life a bit easier by keeping Prettier endlines check at bay, while ensuring no CR will ever be staged in the git repository.

Checklist

  • The basics
    • I tested these changes manually in my local or dev environment
  • Tests
    • Added or updated
    • N/A
  • Event Tracking
    • I added event tracking and followed the event tracking guidelines
    • N/A
  • Error Reporting
    • I reported errors and followed the error reporting guidelines
    • N/A

Will ensure only linefeeds are staged while making Prettier nicer
to Windows contributors
@nulltoken nulltoken requested review from a team and chohmann and removed request for a team August 25, 2021 09:49
@nulltoken nulltoken changed the title [WIP] Teach matchPath to cope with multiple params per path fragment [WIP] Teach matchPath to honor fragments containing both concrete and templated parts Aug 25, 2021
@nulltoken nulltoken force-pushed the ntk/matcher_fix branch 3 times, most recently from 48bf069 to 43d8ca0 Compare August 25, 2021 10:34
…ated parts

Previous implementation was ignoring concrete parts of path segments
while trying to match requests to potential operations: the matcher was
wrongly thinking `/something` was a good fit for `/something.{format}`.
@nulltoken nulltoken changed the title [WIP] Teach matchPath to honor fragments containing both concrete and templated parts Teach matchPath to honor fragments containing both concrete and templated parts Aug 25, 2021
@nulltoken
Copy link
Contributor Author

@chohmann 👋 No longer a WIP and ready for review.

@chohmann
Copy link
Contributor

This PR also includes a commit to make Windows contributors' life a bit easier by keeping Prettier endlines check at bay, while ensuring no CR will ever be staged in the git repository.

Windows 😳 ... I won't hold it against you 😉

Copy link
Contributor

@chohmann chohmann left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work 👏 Thank you for your contribution!

@chohmann chohmann merged commit 7e684c7 into stoplightio:master Aug 26, 2021
@chohmann
Copy link
Contributor

@nulltoken this was included in Prism v4.3.4 🎉

@nulltoken nulltoken deleted the ntk/matcher_fix branch August 27, 2021 06:32
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.

None yet

2 participants