Skip to content

Commit 5f77e9a

Browse files
committed
Alter request generation to use class path rather than string
1 parent 6fbf75b commit 5f77e9a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/GenerateRequests.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,16 @@ protected function handleResponse(array $method_details, ClassType $class): void
244244
$type = $this->typeFromRef($get_type_from);
245245
}
246246
if ($this->notScalarType($type)){
247-
$type = "\\$model_ns\\$type";
247+
$type = "\\$model_ns\\$type::class";
248248
}
249249
else {
250-
$type = '';
250+
$type = "''";
251251
}
252252
}
253253
else {
254-
$type = '';
254+
$type = "''";
255255
}
256256

257-
$type = str_replace("\\", "\\\\", $type);
258257
$response_models[] = "'$code_string' => '$type'";
259258

260259
if ((int)$code_string>0 && (int)$code_string<400){

0 commit comments

Comments
 (0)