Function pact_ffi::mock_server::handles::pactffi_message_with_metadata_v2
source · #[no_mangle]
pub extern "C" fn pactffi_message_with_metadata_v2(
message_handle: MessageHandle,
key: *const c_char,
value: *const c_char
)
Expand description
Adds expected metadata to the Message
key
- metadata keyvalue
- metadata value, supports JSON structures with matchers and generators
To include matching rules for the value, include the matching rule JSON format with the value as a single JSON document. I.e.
const char* value = "{\"value\": { \"ID\": \"sjhdjkshsdjh\", \"weight\": 100.5 }, \"pact:matcher:type\":\"type\"}";
pactffi_message_with_metadata_v2(handle, "TagData", value);
§Safety
The key and value parameters must be valid pointers to NULL terminated strings.