Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ffi): deprecate pactffi_with_binary_file #457

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions rust/pact_ffi/src/mock_server/handles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1926,6 +1926,14 @@ pub extern fn pactffi_with_binary_body(
}).unwrap_or(false)
}

/// <div class="warning">
///
/// This function is deprecated. Use [`pactffi_with_binary_body`] in order to
/// set the binary body, and use [`pactffi_with_matching_rules`] to set the
/// matching rules to ensure that only the content type is being matched.
///
/// </div>
///
/// Adds a binary file as the body with the expected content type and example contents. Will use
/// a mime type matcher to match the body. Returns false if the interaction or Pact can't be
/// modified (i.e. the mock server for it has already started)
Expand All @@ -1952,6 +1960,7 @@ pub extern fn pactffi_with_binary_body(
/// Returns false if the interaction or Pact can't be modified (i.e. the mock server for it has
/// already started) or an error has occurred.
#[no_mangle]
#[deprecated(note = "Use `pactffi_with_binary_body` and `pactffi_with_matching_rules` instead")]
pub extern fn pactffi_with_binary_file(
interaction: InteractionHandle,
part: InteractionPart,
Expand Down
Loading