-
-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ressource URLs naming strategy #534
Comments
It's not currently supported for default operations (their routes are automatically added). If you insist, you can still manually declare all the operations, but it's a lot of work for not much return. I love dashes too, but I think there's no need to obsess over pretty-looking URLs for an API. Alternatively: figure out a way and send a PR. I'm sure we'll all be happy. (But no BC breaks if you're doing it for 1.x) |
Is changing naming strategy in 2.x without touching 1.x version an acceptable solution ? Or It would be too bad for people migrating from v1 to v2 ? Anyway, I don't think making naming strategy configurable is a good thing. |
See #165. That being said it would be nice to have it configurable. It's not a problem API, it's more a matter to be able to choose a convention and stick to it. You have the same debate over and over for databases; in the end the choice that has been made in most of ORM is to let the user choose the convention he wants to use. |
BC breaks are still OK for 2.0 (until we release it). It's now or never :) Having a naming strategy would be nice (and I'm pretty sure it can be done easily) by injecting a strategy in this class: https://github.com/api-platform/core/blob/master/src/Bridge/Symfony/Routing/ApiLoader.php#L58 |
Hello,
I wonder why in multi words entities names (like PasswordReset) the URL generated have "_" seperator and not "-" (like /password_reset, I want /password-reset), and if I can change the naming strategy somewhere.
ps: thanks for the great work!
The text was updated successfully, but these errors were encountered: