Skip to content

Commit

Permalink
Merge pull request #347 from tienvx/update-comment-metadata-v2
Browse files Browse the repository at this point in the history
docs: Update comment of pactffi_message_with_metadata_v2
  • Loading branch information
rholshausen authored Nov 27, 2023
2 parents 68e2e8d + c238fdd commit 133bf14
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rust/pact_ffi/src/mock_server/handles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,18 @@ pub extern fn pactffi_message_with_metadata(message_handle: MessageHandle, key:
///
/// * `key` - metadata key
/// * `value` - 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.
///
/// ```c
/// const char* value = "{\"value\": { \"ID\": \"sjhdjkshsdjh\", \"weight\": 100.5 }, \"pact:matcher:type\":\"type\"}";
/// pactffi_message_with_metadata_v2(handle, "TagData", value);
/// ```
/// See [IntegrationJson.md](https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_ffi/IntegrationJson.md)
///
/// # Safety
/// The key and value parameters must be valid pointers to NULL terminated strings.
#[no_mangle]
pub extern fn pactffi_message_with_metadata_v2(message_handle: MessageHandle, key: *const c_char, value: *const c_char) {
if let Some(key) = convert_cstr("key", key) {
Expand Down

0 comments on commit 133bf14

Please sign in to comment.