ring-swagger 2018-09-26

@mping has joined the channel

Hi, is there a way to fine tune compojure-api coercion? Whenever I run a main class, I get a bunch of compojure.api.coercion.schema - :schema coercion enabled in compojure.api hinting that some how I’m starting compojure-api

@mping those should be removed. PR welcome.

it was pre clojure 1.9.0 where the spec was optional. we could require 1.9.0 and it would always be available

@ikitommi thanks, I enjoy using compojure-api, I can try a PR

👍 1

but what really bothers me is that it seems that somehow I’m running some compojure-api code even though I’m just doing lein run -m some.main.class

there’s probably a require somewhere thats under my radar or something

but, clojure is imperative at the core (multimethods and protocol extensions) and that’s whats happening:

(defmethod cc/named-coercion :schema [_] default-coercion)

e.g. you load a namespace, and the schema coercion gets registered. it’s a side-effect.

but, no missiles fired here 😉

😄 1

I see, I’ll put up a PR whenever I can

thanks for the explanation and plz keep up the good work