Implement support for interpolated openapi paths#2317
Merged
joelrosario merged 16 commits intomainfrom Mar 18, 2026
Merged
Conversation
- Add simple tests for the same
- Use TemplateTokenizer to parse paths instead of splitting - Add simple test for the same
- Splits rawValue based on the provided regex - Add simple tests for the same
- Add simple tests for the same
- score segments by literalness - 0 = pure token/matcher segment - 1 = embedded/interpolated token segment - 2 = fully literal segment
- Add simple tests for the same
Summary
|
- As fine-grained errors don't matter on structural mismatch - We can use a regex based approach which simplifies the extraction - Move tests from PathSegmentExtractorTest to HttpPathPatternTest
# Conflicts: # core/src/main/kotlin/io/specmatic/conversions/OpenApiSpecification.kt
396611b to
c0e910b
Compare
- Add simple tests for the same
c0e910b to
218cf34
Compare
- Use a special Score dataclass instead of plain Int - Provide an accumulated score for grouping
- Enables callers to modify resolver, for example enabling mockMode
# Conflicts: # core/src/main/kotlin/io/specmatic/core/HttpPathPattern.kt
cf2d2c4 to
beb1515
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Implement support for interpolated paths, such as
/test/{param1},{param2}and/api/version-{version}Checklist: