Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of
pact-python
. - I have read the console error message carefully (if applicable).
Description
Replace the str
with a new ConsumerVersionSelector
class, or equivalent kwargs
in:
pact-python/src/pact/v3/verifier.py
Line 893 in c7f6667
Reproducible demo
No response
Steps to reproduce
Try using the consumer_versions
key with most strings and the FFI call fails.
Expected behavior
The end-user should not be responsible for manually serialising data into JSON. Instead, the Python implementation should provide a nice interface.
There could be two options for this implementation, ultimately implementing the following Rust struct:
The first option is to add a TypedDict
class, and using the Unpack
typing annotation to help convert it into appropriate kwargs
. The other is to manually define the kwargs
as per the underlying struct.
The JSON string would then be created within the method's logic.
Actual behavior
End user is responsible for generating valid JSON string.
Your environment
No response
Self-service
- I'd be willing to fix this bug myself.