Adam Cox
04/19/2023, 1:39 PMpactffi_with_body
and adding a JSON body to the contract a metadata field is added with a contentType property [1]. However with the Rust implementation this property is not added [2]. Whats more is that it does not seem possible to add this metadata via the Rust SyncMessageBuilder API [2] or by using .contents_from
[3]
[1] Pact FFI:
https://github.com/pact-foundation/pact-reference/blob/ac136ed57941fb09ee35cc34baf84da0c8d1409e/rust/pact_ffi/src/mock_server/handles.rs#L1286
[2] Pact-Rust:
https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_consumer/src/builders/sync_message_builder.rs#L272
[3] Pact-Rust:
https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_consumer/src/builders/sync_message_builder.rs#L133
This is currently causing a problem in our plugin where contracts made from rust clients look different to contracts made with C++ clients for the same requests. We can adjust the plugin to handle it but thought I would raise this here.Matt (pactflow.io / pact-js / pact-go)
Adam Cox
04/26/2023, 6:58 PMMatt (pactflow.io / pact-js / pact-go)
Adam Cox
04/28/2023, 2:05 PM