This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-11
Channels
- # aws (2)
- # beginners (38)
- # boot (21)
- # boot-dev (8)
- # cider (51)
- # cljsrn (3)
- # clojars (23)
- # clojure (99)
- # clojure-austin (7)
- # clojure-brasil (1)
- # clojure-dev (8)
- # clojure-dusseldorf (1)
- # clojure-estonia (20)
- # clojure-greece (4)
- # clojure-italy (3)
- # clojure-russia (1)
- # clojure-spec (28)
- # clojure-uk (47)
- # clojurescript (47)
- # core-logic (3)
- # cursive (9)
- # data-science (1)
- # datomic (50)
- # docs (12)
- # emacs (5)
- # fulcro (60)
- # graphql (33)
- # hoplon (8)
- # jobs-discuss (1)
- # keechma (31)
- # lein-figwheel (10)
- # leiningen (4)
- # off-topic (70)
- # om (1)
- # onyx (15)
- # pedestal (5)
- # re-frame (185)
- # reagent (14)
- # remote-jobs (8)
- # ring-swagger (7)
- # rum (17)
- # shadow-cljs (193)
- # specter (6)
- # sql (51)
- # unrepl (8)
Hello! I'm at my first attempt at using swagger and compojure-api. Is there a (simple) way to get swagger UI to present different documents for different contexts?
It depends. You can have multiple apis next to each other with different route trees - and those route trees can share same routes. Also, you can mount multiple swagger-spec endpoints manually and mofidy the resulting specs via a response middleware. But thats not trivial I guess.
I see... well, it was mostly about making the documentation page tidier. In the meantime I learned about :tags in the contexts, so now at least I have a title for each context and I can hide/show its functions independently.
Hello, is there a way to define a context/resource in compojure-api/swagger with clojure.spec as coercion for URIs of the form /balance-sheet/aggregation1/aggregation2.../aggregationN/value, where the depth N of aggregations is not known in advance?
I know how to do it with the fixed parts of the URI (balance-sheet and value), but no idea if it even possible in the context above without resorting to a custom path definition like /balance-sheet/aggregation1aggregation2aggregationN/value. The problem is that in that scheme, the aggregation path can be parsed independent of compojure-api/spec/swagger, but it is a hack in every possible dimension.
@plamen swagger if for static documentation, so I don’t think it can present such for documentation. I think you can do such a thing with compojure thou. There is an example of dynamic routing in https://github.com/metosin/compojure-api/tree/master/examples/reusable-resources. Should be streightforward to port it to spec.