spectator
spectator copied to clipboard
Add regex pattern match against the requested url path (#1)
- Add regex pattern match against the requested url path
This issue came from having static URLs in the API documentation pointing to dynamic URL in my project.
/cars/electric
/cars/ice
Route::patch('/cars/{name}', function ($name) {
return [
'name' => $name,
];
});
Before this change it will also match with the last defined route in the API documentation, which meant that if the request data was different then the request openAPI validation will fail.
This change will use the route binding regex and the actual request path to find the correct path. Now it will only match the exact match routes if found.