Fork me on GitHub
#yada
<
2016-07-06
>
maleghast08:07:51

Really enjoyed the article, @malcolmsparks 🙂

stijn09:07:32

is there a way to extend the edn reader in yada?

stijn13:07:08

@malcolmsparks: trying to read the body of a Content-Type application/edn request that contains tagged literals that are not standard

stijn13:07:14

so, would need (edn/read-string {:readers ...} ...)

stijn13:07:31

I guess I should override (defmethod process-request-body "application/edn"

stijn13:07:42

or would it be better to have an extension point for the reader itself? otherwise I'm duplicating the with-400-maybe and schema logic for reading the body

malcolmsparks14:07:55

I think you should override the defmethod in this case. It's not hard.

malcolmsparks14:07:25

A great example of when this makes sense.

malcolmsparks14:07:11

Possibly the existing implementation could be extended in some way, but it's more work

stijn17:07:04

@malcolmsparks: I'll overwrite the process-request-body defmethod, seems simple enough yes

stijn18:07:09

that works 🙂

stijn18:07:44

I just reduced around 50 API endpoints to just one by plugging an Om Next parser into a yada resource. winning

severed-infinity20:07:28

hey I was wondering if there is a completed in full resource map out there, I know https://juxt.pro/yada/manual/resources.html contains an example of one but throughout the examples used it appears in many different forms with resources nested in different ways and again just curious if one exists with everything that can be contained in the resource map