diff --git a/src/Abstraction/Resource.php b/src/Abstraction/Resource.php index f804a35..5db1ec4 100644 --- a/src/Abstraction/Resource.php +++ b/src/Abstraction/Resource.php @@ -121,7 +121,7 @@ protected function getAllParameters($parameters){ $fields = preg_replace('/\/([^\{\},]*)(?:(\{.*?\})?(,|$)|(\}))/', ':{$1$2}$3$4', $fields); } - $fields = preg_replace('/(?<=[^:\w])(\w+)(?=[^:\w])/', '$1:""', $fields); + $fields = preg_replace('/(?<=[^:\w]|^)(\w+)(?=[^:\w]|$)/', '$1:""', $fields); $fields = preg_replace('/(\w+)/', '"$1"', $fields); $fields = '{' . $fields . '}'; $fields = json_decode($fields, true);