luminus

Luke Schubert 2019-12-11T19:25:16.038700Z

extension from the previous question

Luke Schubert 2019-12-11T19:25:38.039100Z

I'm trying to have ring-swagger set up with this api

Luke Schubert 2019-12-11T19:25:53.039500Z

and using spec internally

Luke Schubert 2019-12-11T19:26:22.040200Z

is there anyway to convert a spec to camelCase for the sake of swagger?

ikitommi 2019-12-11T19:27:40.042400Z

You need to transform the swagger spec manually, for example using a custom middleware for the swagger endpoint route

ikitommi 2019-12-11T19:28:25.043100Z

Are you using compojure-api?

Luke Schubert 2019-12-11T19:30:02.044200Z

no, luminus+reitit

ikitommi 2019-12-11T19:31:17.046100Z

ok, just add {:middleware [custom-response-kebabizer]} to the swagger routes

Luke Schubert 2019-12-11T19:33:39.047700Z

ah thanks

ikitommi 2019-12-11T19:35:32.049500Z

looking at the code (https://github.com/metosin/reitit/blob/master/modules/reitit-swagger/src/reitit/swagger.cljc) , it would be a non-breaking change to add options to the swagger handler to do that more elegantly.