Fork me on GitHub
#reitit
<
2020-05-14
>
Tanel08:05:26

Hi, does reitit play well with a component library like https://github.com/stuartsierra/component ?

ikitommi10:05:32

Yes, it should.

šŸ‘ 4
oly09:05:18

is there a way to make the swagger select box have value attribute which is an id but shows text I am using spec, up until now i have been using a spec with a set of values but the text and value are the same so looking for a way to have separate values.

ikitommi10:05:47

@oliver.marks don't think so. You could ask from swagger-ui repo via GitHub issue

oly10:05:37

okay thanks @ikitommi will see what i can find out

oly10:05:34

sounds like it may be possible by giving the enums descriptions https://swagger.io/docs/specification/data-models/enums/ can wee do that in reitit swagger currently ?

oly10:05:13

actually think i am misunderstanding that

oly11:05:16

I did however come across this with a bit of a discussionĀ https://github.com/OAI/OpenAPI-Specification/issues/681

šŸ‘ 4
aratare12:05:19

Hey guys, new guy here so please bear with me. I'm trying to define top-level middleware via the :middleware keyword when creating the ring-handler but keep encountering errors when running the server. Here's what I tried:

(defn wrap-test [handler]
  (fn [req] (handler req)))

(mount/defstate app-routes
  :start
  (ring/ring-handler
    (ring/router
      [...])
    (ring/routes
      ...)
    {:middleware [#(wrap-test %)]))
and I keep getting errors telling me that wrong number of args are being passed into wrap-test. I'm currently using the latest reitit (0.4.2). I can simply wrap the entire ring-handler inside a wrapper and that works just fine, though I wanted to organise things a bit and hence this approach. I got the above code from going through the docs, but have I done something wrong here? Thanks in advance!