Should we allow registering duplicated route in Controller Registry? #14
-
Because, if the controller has implemented too many routes, it may need to be separated classes for maintainability. A real example from our tester repository These controllers work on the main same thing, but their developers separate them into multiple classes for grouping a small work. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
If that controller has too many routes. Then developer should create new controller, not the separate class with same controller |
Beta Was this translation helpful? Give feedback.
-
I think it should be allowed but not encouraged. If able, you should avoid using duplicated routes. However, from the given example, maintainbility is better. 😏 |
Beta Was this translation helpful? Give feedback.
-
These controllers don't work on the same thing. The reason that why these controller use the same controller is the limitation of accessible params from controller. In this case MaintenanceLog's controller will be |
Beta Was this translation helpful? Give feedback.
If that controller has too many routes. Then developer should create new controller, not the separate class with same controller