ring-swagger

ring-swagger & compojure-api
ikitommi 2018-01-15T06:20:00.000101Z

Ported Muuntaja from Record to Protocol, some other optimizations too. Muuntaja 1kb JSON echo is now 30x faster than with same with the ring-middleware-format: https://github.com/metosin/muuntaja/pull/60.

1👍2🎆
mgrbyte 2018-01-15T10:43:26.000291Z

@ikitommi thanks very much, that solved it :thumbsup:

mgrbyte 2018-01-15T10:45:44.000217Z

fwiw, I'm using the latest c.api, with spec - decided to make all clients pass EDN as it makes the validation much easier. I was finding that e.g making certain values in maps conform to a namespaced keyword (datomic ident form an enum for example) ...

mgrbyte 2018-01-15T10:46:24.000025Z

was a lot more code to write in order to have a single spec to conform to.

mgrbyte 2018-01-15T10:47:03.000367Z

Perhaps I'm "doing it wrong"? 🙂

mgrbyte 2018-01-15T10:47:43.000267Z

I'm making good progress with my authz stuff, will try and extract an example repo when I'm done and feedback to the project.

ikitommi 2018-01-15T15:34:26.000239Z

@mgrbyte is there still an issue spec + with namespaces keywords, could you paste an example? looking forward to the authz stuff 🙂

mgrbyte 2018-01-15T15:35:21.000234Z

No direct issue, other than JSON doesn't natively support keywords, so not sure there's a (direct) coercion path without writing custom code

mgrbyte 2018-01-15T15:36:12.000200Z

e.g clj: {:myms/scheama-attr :a-ns/some-ident} - a client supplying something that maps to this in json?

mgrbyte 2018-01-15T15:38:07.000506Z

In the clojure side of things, want to describe :myns/schema-attr with a spec. This needs to work for both the client and the app itself. could write two specs, but not sure that trumps making the client(s) use EDN.