Skip to content

Commit

Permalink
Fixed array default value for body param
Browse files Browse the repository at this point in the history
  • Loading branch information
eldadfux committed Dec 23, 2020
1 parent 9eb9c29 commit 910d403
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Spec/Swagger2.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ public function getMethods($service)
$param['default'] = $value['default'] ?? null;
$param['example'] = $value['x-example'] ?? null;

$param['default'] = (is_array($value['default'])) ? json_encode($value['default']): $value['default'];

$output['parameters']['body'][] = $param;
$output['parameters']['all'][] = $param;
}
Expand Down

0 comments on commit 910d403

Please sign in to comment.