Fork me on GitHub

@ikitommi I supply the routes in the order you mentioned and use :conflicts nil as config. Will this result in a router which offers he maximum performance possible? I have about 150 groups of routes. Besides Patient I have 150 other paths. Each β€œgroup” has 6 routes. So there will be about 900 routes.


would love to hear about the perf of matching with that.


Ok I’ll do if it runs. I currently refactor at this location.


the best performance is if the routes don't conflict


@ikitommi i have parameters spec'd as (coll-of pos-int?), but this displays in swagger-ui's example as [0] which is obviously not a valid value. spec generators can make correct example sequences out of the spec. any idea what could be causing this?


@akiel only the conflicting routes are served with linear router, other with best possible algo. There is one extra method call in the stack, so maybe a few ns penalty.


@vale does the swagger json contain :min value? Should be 1 for pos-int? I believe...


you're right, it sure does.

so i figure this is an issue with swagger-ui then?


could you point me to where does reitit include/load that? then i could debug which side the problem is


the swagger-ui module?


I would browse the swagger-ui repo for related issues. You can also try updating the swagger-ui deps to latest


1.0.0 will use Openapi, might work differently


oh it's a git submodule of ring-swagger-ui? got it. gonna put up a PR if i find a bug

πŸ‘ 1
Jon Walch20:10:59

Is it possible to have nested routes that have gets on them?

Jon Walch20:10:54

    {:get  {:summary    "get a user"
            :middleware [middleware/wrap-restricted]
            :handler    (fn [req]
                          (user/get-user req))}}
      :post {:summary    "login as user"
             :parameters {:body {:screen_name    string?
                                 :password string?}}
             :handler    (fn [req]
                           (user/login req))}}]

Jon Walch20:10:57

I'm getting a 404 for /user

Toni Vanhala05:10:59

I've started to work on this.

partywombat 3
Toni Vanhala08:10:46

Made a PR for publishing intermediate paths by default

πŸ‘ 2
Jon Walch21:10:22

thanks! Perfectly fine using the existing syntax

πŸ‘ 1