Closed Cruiser13 closed 2 years ago
Hi @Cruiser13,
A fix has been published, can you try it on your project please? I have some concerns about performances while injecting the router on services.
To install this pre-release version:
composer require tilleuls/forgot-password-bundle:dev-main
@vincentchalamon thank you, this works nicely! We can not measure any performance differences on the ForgotPassword endpoint.
Describe the bug Both Bridge/ApiPlatform/OpenApi/OpenApiFactory.php and Bridge/ApiPlatform/Serializer/DocumentationNormalizer.php use hardcoded paths to /forgot-password/and /forgot-password/{token}
To Reproduce Use a routing like this:
Expected behavior The bundle works at /api/forgot_password
Actual behavior The routing is set to /api/forgot_password but the docs are still leading to /forgot-password/and /forgot-password/{token} While it's possible to set the proper routes using OpenApi in application it seems to be not possible to remove the routes set by the bundle.
Proposed fix Use prefix instead of hardcoded route in Bridge/ApiPlatform/OpenApi/OpenApiFactory.php and Bridge/ApiPlatform/Serializer/DocumentationNormalizer.php