mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
JsonPartialMatcher fails to match on property name that JsonMatcher matches #648
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @epDugas on GitHub (Nov 15, 2024).
Originally assigned to: @StefH on GitHub.
Describe the bug
JsonPartialMatcher fails to match when the json object contains a property name with value:
urn:ietf:params:scim:schemas:extension:enterprise:2.0:UserExpected behavior:
The same json object that matches with JsonMatcher would match with JsonPartialMatcher.
Test to reproduce
{ "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": "foo" }Notes
The JToken.SelectToken fails to find the token, presumably because it treats the value as a JPath expression, and returns null causing the INPUT param of the IsMatch method to be null.
@StefH commented on GitHub (Dec 5, 2024):
@epDugas
I'm looking into this...
@StefH commented on GitHub (Dec 5, 2024):
https://github.com/WireMock-Net/WireMock.Net/pull/1216
@epDugas commented on GitHub (Dec 5, 2024):
Thanks @StefH !