mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-13 13:53:34 +01:00
ProtoBufMatcher import in proto not working #585
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 @vgoranski on GitHub (Mar 6, 2024).
Originally assigned to: @StefH on GitHub.
Describe the bug
I'm not sure if it's a bug or more of a feature request, but it seems that the current implmentation of ProtoBufMatcher is not supporting imports in proto.
Expected behavior:
Imports in proto work.
Test to reproduce
@StefH commented on GitHub (Mar 6, 2024):
Imports should work, see default example proto definition here:
https://protobuf.heyenrath.nl/
I think that the JsonMatcher will not match, I think in that case you need a https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching-JsonPartialMatcher
@vgoranski commented on GitHub (Mar 6, 2024):
Yes, imports actually work. In my example above the problem was eventually the JsonMatcher.
I also noticed that in case when none of the types are used from the import, then there will be an error. But usually, if you use an import you should use the types from it, so I guess it's not that big of a deal.
If you remove the import form this example, everything will work fine.
@StefH commented on GitHub (Mar 6, 2024):
This is very strange, I need to check that. can you maybe create a issue here : https://github.com/StefH/ProtoBufJsonConverter ?
@StefH commented on GitHub (Mar 6, 2024):
Closing this one...