This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-15
Channels
- # aws (1)
- # beginners (6)
- # boot (25)
- # cider (30)
- # cljs-dev (50)
- # cljsrn (45)
- # clojure (98)
- # clojure-austin (5)
- # clojure-czech (1)
- # clojure-dev (21)
- # clojure-dusseldorf (29)
- # clojure-germany (2)
- # clojure-greece (117)
- # clojure-italy (2)
- # clojure-nl (4)
- # clojure-russia (26)
- # clojure-serbia (10)
- # clojure-spec (123)
- # clojure-turkiye (1)
- # clojure-uk (27)
- # clojured (13)
- # clojurescript (57)
- # core-async (18)
- # cursive (13)
- # datomic (20)
- # defnpodcast (16)
- # emacs (8)
- # events (2)
- # figwheel (3)
- # instaparse (1)
- # jobs (3)
- # jobs-discuss (39)
- # klipse (9)
- # lumo (100)
- # mount (1)
- # numerical-computing (1)
- # off-topic (22)
- # om (34)
- # onyx (17)
- # pedestal (1)
- # perun (29)
- # re-frame (60)
- # reagent (16)
- # remote-jobs (8)
- # rethinkdb (6)
- # ring-swagger (19)
- # rum (1)
- # slack-help (1)
- # specter (3)
- # untangled (1)
- # yada (17)
I recently added swagger to an existing project and many (but perhaps not all?) responses which had been JSON strings are now #object[java.io.ByteArrayInputStream ...]
— is this expected behavior? I'm delving into muuntaja to figure out how to configure it back to the old behavior, but this feels like middleware injection where I didn't expect it.
...that may have been due to :disable-api-middleware?
being configured at the top level rather than under :api
@daveliepmann you can slurp
the response to get the string out.
I thought r-m-f also returned always streams? anyway, the ring-spec allows both strings and streams - the adapter streams the response in both cases.
there is no configuration for “return strings” currently. But if you really want it, please write an issue out of it.
It ended up being my error (misplacing :disable-api-middleware?
). I was primarily concerned with unexpected middleware.
ok. I think there is a room for improvement for the mw-bundling - would be nice to have a new (just collecting the routing info for reverse-routing & swagger) top-level route, and the current “batteries included” api
would be optional. would help in using with existing compojure apps.
that would be perfect for my use case, yes
(root
(api {:swagger {:data {:info {:title “api1"}}}} ...)
(api {:swagger {:data {:info {:title “api2"}}}} ...)
my-existing-routes
(resources “/” …)))
no, there is not. but PRs welcome 😉 planned for 1.2 both the ring-async & intial spec-support.
ok thanks. it would be cool to contribute assuming there is time. i'll at least look into it.
lot’s of stuff to do with spec-tools. just bit busy with the customer projects.. but here’s the proposal, minor tweaks to Schema-side and make sweet transition from schema to spec (for those who want to do it): https://gist.github.com/ikitommi/fb3e0200504dd8b635ed7edd0cdbc768
@daveliepmann could you write an issue out of the root
-thing? would like to collect the requirements, and remember that one.
On ring-swagger, correct? Not compojure-api?