Endpoint naming - kebab-case
Issue #50
closed
I did some research on best practices on endpoint naming.
One thing to avoid is camelCasing the endpoints, as they become less readable. Instead kebab-case is better.
It would be really nice if the endpoint class names and method names could be translated to kebab-case. Of course it should be optional through an extension setting.
Comments (3)
-
reporter -
reporter I found it’s possible to decide a custom route instead of using the routing by method-name, by adding this annotation:
* @Api\Route("GET /facebook-sharing/connection-status")
That’s is great!
But I would still prefer that kebab-case would work by default by method-name.
-
- changed status to closed
Nice idea. And totally right. Added it with this commit: https://bitbucket.org/99grad-team/nnrestapi/commits/bbd0532006e898305603d4154d105fe0b93ee58f
- Log in to comment
I think the best would be if both would work at the same time. For example:
/api/facebookSharing/connectionStatus
/api/facebook-sharing/connection-status
The extension setting, should then only decide which one is prefered to be shown in the interface.