We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a72054f commit 25fd487Copy full SHA for 25fd487
src/SDK/Language/DotNet.php
@@ -285,7 +285,11 @@ public function getParamExample(array $param): string
285
$output .= $example;
286
break;
287
case self::TYPE_OBJECT:
288
- $output .= '[object]';
+ $output .= ($example === '{}')
289
+ ? '[object]'
290
+ : (($formatted = json_encode(json_decode($example, true), JSON_PRETTY_PRINT))
291
+ ? 'new ' . preg_replace('/\n/', "\n ", $formatted)
292
+ : 'new ' . $example);
293
294
case self::TYPE_BOOLEAN:
295
$output .= ($example) ? 'true' : 'false';
0 commit comments