Skip to content

Commit

Permalink
Merge pull request #1780 from gjkersten/fix-v4-syn-msg-json-report
Browse files Browse the repository at this point in the history
fix: allow synchronous messages to be saved in a v4 pact json report
  • Loading branch information
rholshausen authored Mar 21, 2024
2 parents ca1afe4 + 245b17c commit 4f3177a
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 4f3177a

Please sign in to comment.