This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-20
Channels
- # aleph (2)
- # boot (18)
- # cider (3)
- # cljs-dev (14)
- # cljsrn (28)
- # clojure (428)
- # clojure-austin (3)
- # clojure-hk (1)
- # clojure-ireland (5)
- # clojure-mexico (1)
- # clojure-quebec (2)
- # clojure-russia (49)
- # clojure-spec (138)
- # clojure-uk (45)
- # clojurescript (70)
- # core-async (1)
- # cursive (8)
- # datomic (13)
- # defnpodcast (3)
- # devops (1)
- # editors (4)
- # events (1)
- # funcool (14)
- # hoplon (17)
- # jobs-rus (1)
- # luminus (5)
- # mount (51)
- # off-topic (21)
- # om (9)
- # om-next (8)
- # onyx (43)
- # planck (6)
- # re-frame (13)
- # reagent (18)
- # ring-swagger (1)
- # spacemacs (17)
- # untangled (18)
- # vim (13)
- # yada (21)
@stijn: here is one https://github.com/juxt/edge/blob/master/src/edge/sources.clj#L19
@stijn: specifically, the phonebook example uses properties. Essentially properties are your resource's metadata. You tend to grab them from a data source, so you might elect to grab a resource's state too and keep it in the context for the method response function to access. But the resource's state might be large so you might revisit the data source a second time.
Query about :parameters. I'm using a schema to validate the body, and it works fine - if there is a body! If I omit the body, no validation. Is this by design or a bug? I would expect an empty body to result in an error, as (s/validate SomeSchema nil) does
I think this is counts as a bug: https://github.com/juxt/yada/issues/110
One more query: I'm implementing a resource with a POST method:
(yada/resource {
:produces "application/json"
:methods {
:post {:consumes "application/json"
:response {}
}
}})
Even this minimal definition is returning a 200 status, not 201. Is this right?
(I've replaced a function that returns a map with {} to simplify the example - the real function saves a new document to ArangoDB, so I want to return 201 to indicate the resource has been created)https://github.com/juxt/yada/blob/master/doc/responses.adoc has some relevant details
I think it should return a 201 @ijbriscoe