File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,13 +54,20 @@ descriptive error is thrown when api is created with the old options format.
5454
5555* ** BREAKING** : Renamed ` middlewares ` to ` middleware ` and ` :middlewares ` key (restructuring) to ` :middleware `
5656
57- * ** BREAKING** : Middleware must be defined as data: both our forms take a vector
58- of middleware containing either a) fully configured mws (function)
59- or b) a middleware templates in form [ function args] . Nothing new, just best practices.
60- * You can also use anonymous functions to create middleware with correct parameters:
61- ` (middleware [#(wrap-foo % {:opts :bar})]) `
57+ * ** BREAKING** : Middleware must be defined as data: both middleware macro and : middleware restructuring
58+ take a vector of middleware containing either
59+ * a) fully configured middleware (function), or
60+ * b) a middleware templates in form of ` [function args] `
61+ * You can also use anonymous or lambda functions to create middleware with correct parameters,
62+ these are all identical:
63+ * ` [[wrap-foo {:opts :bar}]] `
64+ * ` [#(wrap-foo % {:opts :bar})] `
65+ * ` [(fn [handler] (wrap-foo handler {:opts :bar}))] `
6266 * Similar to [ duct] ( https://github.com/weavejester/duct/wiki/Components#handlers )
6367
68+
69+
70+
6471### Migration guide
6572
6673https://github.com/metosin/compojure-api/wiki/Migration-Guide-to-1.0.0
You can’t perform that action at this time.
0 commit comments