Hello :slightly_smiling_face: I think I have foun...
# pact-rust
a
Hello 🙂 I think I have found an inconsistency between pact_ffi and the rust implementation when creating sync message contracts. When using
pactffi_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.
🤔 1
m
Thanks Adam. There is possibly a good reason for it, but the core maintainer (Ron) is currently off for the next couple of weeks on PTO. Would you mind please creating an issue in the pact-reference repo?
a
Sorry for the late response. Yes I will open an issue for this tomorrow. I have also spotted something with the pact-standalone-verifier not exposing the scheme that has tripped us up so will open one for that as well
👍 1
m
lovely, thank you