luminus

2020-03-27T14:11:35.006400Z

I’m trying to transform incoming JSON keys from camelCase into kebab-case, I found this tidbit but it’s not clear how to apply it. https://clojurians-log.clojureverse.org/luminus/2019-12-10 If I add it to to the instance def in middleware/formats.clj then I need to use it somewhere, so I added as a wrapper for my API (a compojure-api thing):

(-> #'service-routes
    (wrap-authentication …)
    (wrap-routes middleware/wrap-formats))
But this doesn’t seem to work.

2020-03-27T14:15:00.006800Z

I get an error from compojure-api:

ERROR compojure.api.exception - Malformed application/json request.