This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-28
Channels
- # announcements (1)
- # beginners (183)
- # boot (2)
- # clara (4)
- # cljs-dev (20)
- # clojure (59)
- # clojure-dev (7)
- # clojure-nl (1)
- # clojure-serbia (1)
- # clojure-sg (1)
- # clojure-spec (4)
- # clojure-uk (15)
- # clojurescript (77)
- # clr (1)
- # data-science (9)
- # datomic (23)
- # docs (3)
- # duct (15)
- # emacs (8)
- # events (1)
- # fulcro (6)
- # instaparse (3)
- # juxt (1)
- # lumo (9)
- # off-topic (18)
- # perun (2)
- # portkey (13)
- # reagent (2)
- # reitit (11)
- # ring (10)
- # shadow-cljs (158)
- # tools-deps (34)
Hi there! I’m trying to adopt swagger(-ui) feature with reitit but looks like the generated swagger.json doesn’t conform with PathsObject specification. Especially pathTemplating part - https://github.com/reverb/swagger-spec/blob/master/versions/2.0.md#pathTemplating It expects curly braces instead of colon prefix notation.
@delaguardo oh, needs fixing then. Would you like to do a PR?
It seems like trailing slashes confuse reitit and don’t resolve properly. This works (reitit.core/match-by-path router "/dashboard") ;=> #reitit.core.Match{ ... }
but this doesn’t (reitit.core/match-by-path router "/dashboard/") ;=> nil
Is this the intended behaviour, and if so, what is the idiomatic way of matching both routes to the same route name?
@skammer currently, there is no way, but this should be resolved. I wrote https://github.com/metosin/reitit/issues/92 for this. Ideas welcome.
Independent of what strategy is chosen, there should be clear distinction between rerouting trailing-slash paths to non-trailing-slash paths, serving specific versions and allowing/disallowing extraneous slashes in between (is /some///silly////path//
same as /some/silly/path
?)
And especially for static resource resolution this might become quite important as /path/
indicates a directory while /path
indicates a file which ,may be abused to access eg. files in same root as intended resource directory itself.
This is one of those problems I've never found a good solution for that I'd be 100% happy but that doesn't mean there wouldn't be one 🙂