Skip to content

Commit

Permalink
3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Jul 5, 2021
1 parent 6ae5e7c commit d0a6980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Removals

## 3.4.2 (Monday, 5 July 2021)
### Modified
- Only use model key type for URL param type if it's the same as the route key name (https://github.com/knuckleswtf/scribe/pull/265)
### Fixed
- Merge user-defined endpoints correctly. (https://github.com/knuckleswtf/scribe/commit/b7f8539b1bd5cd4d97496fa93803a3d7894889f6)

Expand Down
2 changes: 2 additions & 0 deletions src/Extracting/Strategies/UrlParameters/GetFromLaravelAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public function __invoke(ExtractedEndpointData $endpointData, array $routeRules)
continue;
}

// If a user customized their routeKeyName,
// we can't guarantee that it's the same type as the PK
$typeName = $argumentInstance->getKeyName() === $argumentInstance->getRouteKeyName()
? $argumentInstance->getKeyType() : 'string';
$type = $this->normalizeTypeName($typeName);
Expand Down

0 comments on commit d0a6980

Please sign in to comment.