diff --git a/src/Spec/Swagger2.php b/src/Spec/Swagger2.php index ec033caaf..c443501fb 100644 --- a/src/Spec/Swagger2.php +++ b/src/Spec/Swagger2.php @@ -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; }