Fork me on GitHub
#ring-swagger
<
2018-03-14
>
ikitommi11:03:12

@jmckitrick the docs are really lame at the moment. Would need a full rewrite. Sadly, too busy to do that atm. If someone has good idea (and time :)) how to rewrite a good docs site, we are all ears.

ikitommi11:03:03

@jmckitrick what errors do you get from Luminus? Could you publish a small example site to github?

ikitommi11:03:13

back from vacation, could check what’s up with that.

ikitommi11:03:58

and the alpha-19 is out for compojure-api, few merged PRs for async coercion, spec-tools integration etc.

jmckitrick11:03:44

@ikitommi Good to hear from you! Let me try my branch again with alpha-19

jmckitrick11:03:03

So I’m starting with a Luminus base with services declared. But to get everything to compile, I’m commenting out most of that namespace.

jmckitrick11:03:17

If I understand correctly, I should not use defapi anymore, correct?

ikitommi11:03:52

yes, that’s removed. Just functions + support for the current Compojure macros.

jmckitrick12:03:47

I’m coming from plain-vanilla compojure, and I want to get to compojure-api with spec validation. So I need to skip a step, I think.

ikitommi12:03:19

ping @miikka for the migration docs

miikka12:03:21

Ah, they should be approximately correct, but I should go through them and check that they're up to date. I'll try to do it later today/tomorrow.

jmckitrick13:03:51

Specifically, there are broken links in the Wiki for ‘Apis & Options’ and ‘Authentication and authorization’

jmckitrick13:03:01

The migration docs seem ok so far.

jmckitrick13:03:44

Basically, I want a platform for Clojure web services and apps for a new Clojure team, and I’d like it to work with spec. Which it does now. When would I need the more advanced features, like Muuntaja offers?

ikitommi13:03:50

If you need to transfer data via request & response body, you need some soft of transformer. Muuntaja is just one of those, a fast one and pre-integrated with c-api.

ikitommi13:03:41

I think https://github.com/metosin/c2 is kind of bare-bones sample with spec.

jmckitrick13:03:59

So with plain compojure, this has all been handled by ring middleware, I assume?

ikitommi14:03:15

yes, usually. Unless you encode & deocode the body manually in each route.

ikitommi14:03:58

c-api bundles a set of middleware by default: body-encoding&decoding (via Muuntaja) and generic exception handling.

ikitommi14:03:41

btw, there is a example for spec also in the reitit-repo: https://github.com/metosin/reitit/blob/master/examples/ring-example/src/example/spec.clj. Where compojure-api builds on top of Compojure and has lot of “easy” helpers, reitit is just a naked data-driven router without surpises (with coercion). Most likely c-api will internally use reitit for 2.0.0 final (soon). But reitit can be used on it’s own, for those who like to be in control of everything (and want to compose their own stuff).

ikitommi14:03:48

does not do swagger yet, need to port stuff to ClojureScript first.

jmckitrick16:03:55

So @ikitommi @miikka I’m willing to help with docs.

logistark16:03:39

umm, how stable is compojure-api 2 so far?