spectator icon indicating copy to clipboard operation
spectator copied to clipboard

Add regex pattern match against the requested url path (#1)

Open paulund opened this issue 1 year ago • 0 comments

  • 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.

paulund avatar Aug 05 '24 14:08 paulund