You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, via the DasherizedRoutingConvention, all controllers are considered as JSONAPI controllers and the routing convention is applied making it impossible to use that convention besides other non-JSONAPI controllers with custom attribute routing.
It should be possible to explicitly define which controllers are considered as JSONAPI controllers. Easiest way would be a simple attribute that's attached to a controller and the DasherizedRoutingConvention applies the convention only to those controllers with the attribute.
The text was updated successfully, but these errors were encountered:
So, I took a quick look at it this morning and i think a slightly better approach would be to just check the controller type. This should work without requiring any changes to the implementation. I'll open a PR with my suggestions.
Yes, you're right. At first I thought that an attribute would be good as you could use it again to overwrite the default behavior, but actually that does not make sense to overwrite the behavior for some JSONAPI controllers - either all are dasherized or none. So instead we should make it easy to enable or disable the daherized routing convention (e.g. via the JsonApiOptions), but maybe just leave it as is and only change it if there is really a need for it.
Currently, via the
DasherizedRoutingConvention
, all controllers are considered as JSONAPI controllers and the routing convention is applied making it impossible to use that convention besides other non-JSONAPI controllers with custom attribute routing.It should be possible to explicitly define which controllers are considered as JSONAPI controllers. Easiest way would be a simple attribute that's attached to a controller and the
DasherizedRoutingConvention
applies the convention only to those controllers with the attribute.The text was updated successfully, but these errors were encountered: