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.
2 parents 6597948 + 7aedc52 commit 53a6686Copy full SHA for 53a6686
src/SDK/Language/Kotlin.php
@@ -228,9 +228,17 @@ public function getParamExample(array $param)
228
case self::TYPE_FILE:
229
case self::TYPE_NUMBER:
230
case self::TYPE_INTEGER:
231
- case self::TYPE_ARRAY:
232
$output .= $example;
233
break;
+ case self::TYPE_ARRAY:
234
+ if (\str_starts_with($example, '[')) {
235
+ $example = \substr($example, 1);
236
+ }
237
+ if (\str_ends_with($example, ']')) {
238
+ $example = \substr($example, 0, -1);
239
240
+ $output .= 'listOf(' . $example . ')';
241
+ break;
242
case self::TYPE_BOOLEAN:
243
$output .= ($example) ? 'true' : 'false';
244
0 commit comments