Skip to content

Commit

Permalink
fix: allow synchronous messages to be saved in a v4 pact json report
Browse files Browse the repository at this point in the history
  • Loading branch information
gjkersten committed Mar 20, 2024
1 parent ca1afe4 commit 245b17c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class JsonReporter(

override fun interactionDescription(interaction: Interaction) {
jsonData["execution"].asArray()!!.last()["interactions"].asArray()!!.add(jsonObject(
"interaction" to Json.toJson(interaction.toMap(PactSpecVersion.V3)),
"interaction" to Json.toJson(interaction.toMap(if (interaction.isV4()) PactSpecVersion.V4 else PactSpecVersion.V3)),
"verification" to jsonObject("result" to "OK")
))
}
Expand Down

0 comments on commit 245b17c

Please sign in to comment.