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 authored and rholshausen committed Apr 22, 2024
1 parent 3670bbd commit 151211e
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 151211e

Please sign in to comment.