[NREPL-29] Provide a mechanism for overriding an operation Created: 09/Sep/12 Updated: 13/Nov/12
|Affects Version/s:||0.2.0-beta9, 0.2.0-beta10|
|Reporter:||Hugo Duncan||Assignee:||Chas Emerick|
When specifying middleware, it would be much easier for the user to be able to override a default middleware without having to specify a handler.
For example, if there is a default middleware providing the "complete" operation, the user should be able to just specify their preferred completion middleware, without having to specify all middleware as a handler.
One way to do this might be to check metadata for the provided operations of the specified metadata, and ensure that either the default middleware for that operation is removed, or that the specified middleware takes precendence (which may be simpler when a middleware provides multiple operations).
|Comment by Chas Emerick [ 14/Sep/12 7:44 AM ]|
Just making sure that the order in which additional middlewares are provided is taken as a default stack order will suffice for most use cases. Transforming middlewares (either in full or in part) would need another metadata slot, :replace perhaps, though it seems like that would be much more difficult to get right.