S.U 4 년 전
부모
커밋
49ab18ab26
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/Extracting/Strategies/UrlParameters/GetFromLaravelAPI.php

+ 3 - 1
src/Extracting/Strategies/UrlParameters/GetFromLaravelAPI.php

@@ -66,7 +66,9 @@ class GetFromLaravelAPI extends Strategy
                         continue;
                     }
 
-                    $type = $this->normalizeTypeName($argumentInstance->getKeyType());
+                    $typeName = $argumentInstance->getKeyName() === $argumentInstance->getRouteKeyName()
+                        ? $argumentInstance->getKeyType() : 'string';
+                    $type = $this->normalizeTypeName($typeName);
                     $parameters[$paramName]['type'] = $type;
 
                     // If the user explicitly set a `where()` constraint, use that to refine examples