Skip to content

Conversation

@AButler
Copy link
Owner

@AButler AButler commented Jan 28, 2026

No description provided.

@AButler AButler requested a review from Copilot January 28, 2026 16:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for handling both literal and templated paths in OpenAPI validation, with literal paths taking precedence over templated paths when both match a request.

Changes:

  • Modified path matching logic to distinguish between literal and templated paths
  • Added test data file with both literal (/user/me) and templated (/user/{UserId}) paths
  • Added three test cases to verify correct precedence behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
test/OpenApiValidate.Tests/TestData/LiteralAndTemplatedPath.yaml New test OpenAPI spec defining both templated and literal user paths
test/OpenApiValidate.Tests/ResponseValidatorTests.cs Three new tests verifying literal path precedence over templated paths
src/OpenApiValidate/Helpers/OpenApiExtensions.cs Updated path matching to track and prioritize literal paths over templated ones

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

)
)
{
isTemplatePath = false;
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

Setting isTemplatePath to false is unnecessary here since the function returns false immediately after. This assignment has no effect and adds confusion about the variable's purpose.

Suggested change
isTemplatePath = false;

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AButler AButler merged commit 7d9df59 into main Jan 28, 2026
2 checks passed
@AButler AButler deleted the templated-path branch January 28, 2026 16:28
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.

2 participants