This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-04
Channels
- # architecture (20)
- # aws (8)
- # beginners (13)
- # boot (9)
- # cider (80)
- # cljs-dev (69)
- # cljsrn (7)
- # clojure (243)
- # clojure-dusseldorf (8)
- # clojure-italy (5)
- # clojure-norway (3)
- # clojure-poland (57)
- # clojure-russia (10)
- # clojure-shanghai (2)
- # clojure-spec (11)
- # clojure-uk (50)
- # clojurescript (198)
- # core-async (11)
- # crypto (2)
- # cursive (14)
- # datomic (17)
- # figwheel (8)
- # garden (7)
- # hoplon (8)
- # incanter (4)
- # jobs (1)
- # leiningen (1)
- # liberator (38)
- # lumo (28)
- # om (55)
- # onyx (10)
- # pedestal (13)
- # perun (20)
- # re-frame (1)
- # reagent (16)
- # ring-swagger (9)
- # spacemacs (11)
- # test-check (9)
- # unrepl (43)
- # untangled (163)
- # yada (8)
@borkdude, defroutes
has been deprecated. You shouldn’t call route/expand-routes
if Pedestal’s default-interceptors
are being applied since it will expand routes for you. I also recommend using the table route syntax as described here: http://pedestal.io/guides/defining-routes#_a_note_about_routing_syntax
Hrm, I don’t know of a recommended way. There’s the Validation action but that doesn’t involve sharing schema.
You could share specs between Clojure Clojurescript code but there are some caveats to that. I can’t comment on the practicalities of it since I’ve not done it.
The validation action is server-side validation. Often, I'll want some preliminary validation on the client-side too. Even the most basic client needs to know, e.g., whether an input field should be text, password, or numeric. It makes sense to me that this should be driven by the same DRY knowledge as the Vase schemas. But. this doesn't seem to be easy to do, at least not while following the conventions in the Vase samples I've seen.
@deg My vision for that is that Vase will be able to generate a Swagger spec to describe itself. Full disclosure though: it's on the roadmap but not being worked right now.
@mtnygard That sounds like a very good thing, but I think it may be both too much and too little. Too little: Swagger's syntax is richer than Vase's, so I guess you are talking about a one-time tool to generate an initial Swagger spec. Too much: I envision something simpler - a natural way to compose the Vase .edn file from smaller pieces, some of which would be natural to share with the client code. (My use case is a server and client evolving simultaneously and owned by the same team).
Yeah, I'd also want to pass some values to the Vase edn - datomic-uri
, for instance. I'm wrapping my whole application in integrant (same with Component, doesn't matter) and would like to pass this config to my server component
@ddeaguiar I was actually using Pedestal-API which adds another layer of macros to be confused by 🙂