A command like: automate test codetemplate "Response" --aschildof "{RestApi.ServiceOperation}" --export-data "data.json" fails with exception:
Failed Unexpectedly, with: The exported test data could not be written to: 'C:\Projects\endgame\Boost\src\data.json, error was: 'A possible object cycle was detected. This can either be due
to a cycle or if the object depth is larger than the maximum allowed depth of 64. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles. Path: $.'
This is because we are calling ToJson on the configuration of the draft, and including its ancestors.
A command like:
automate test codetemplate "Response" --aschildof "{RestApi.ServiceOperation}" --export-data "data.json"
fails with exception:This is because we are calling
ToJson
on the configuration of the draft, and including its ancestors.