Fork me on GitHub
#luminus
<
2019-12-11
>
Luke Schubert19:12:16

extension from the previous question

Luke Schubert19:12:38

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

Luke Schubert19:12:53

and using spec internally

Luke Schubert19:12:22

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

ikitommi19:12:40

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

ikitommi19:12:25

Are you using compojure-api?

Luke Schubert19:12:02

no, luminus+reitit

ikitommi19:12:17

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

ikitommi19:12:32

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.