Fork me on GitHub
#yada
<
2016-05-26
>
malcolmsparks08:05:09

@mark.melling: I'll investigate upload to see why it isn't working

malcolmsparks08:05:44

That example is quite old and experimental but even so, it should work

mccraigmccraig15:05:02

@malcolmsparks: i did a PR which stops some errors during yada swagger generation completely blowing up the process... https://github.com/juxt/yada/pull/96

malcolmsparks16:05:46

@mccraigmccraig: merged that second one - was much nicer!

mccraigmccraig16:05:22

yeah, i know - sometimes i'm just too pragmatic 😬

mccraigmccraig18:05:28

@malcolmsparks: can you think of any straightforward way i can set CORS headers on my swagger.json ?

malcolmsparks19:05:33

Did you read the docs? I believe it's done but I did run in to some issues recently on http://yada.juxt.pro.

malcolmsparks19:05:51

If you can expand I can help more

mccraigmccraig19:05:00

i had a look at the code... couldn't see how to pass anything to swaggered which was where i presumed it needed to go... np, i served the swagger-ui html from resources for the moment

richiardiandrea23:05:09

Is a resource representation generated a "request time" usually? I don't see how I can coordinate a :properties change with a :response change

richiardiandrea23:05:24

it looks they can be two promises

richiardiandrea23:05:33

but when are the two executed?

richiardiandrea23:05:21

because for :exists? to be true it needs to happen before I return from the :response function

richiardiandrea23:05:00

or should I wrap the whole resource declaration in a function that goes to db maybe?

richiardiandrea23:05:06

and return the whole thing?

richiardiandrea23:05:51

but I cannot do it because I need the request context from somewhere

richiardiandrea23:05:58

ah ok :response has a :properties subkey...let me try that

richiardiandrea23:05:26

no, not really working

richiardiandrea23:05:43

it looks like the :properties in the :response don't ovverride the ones in the resource "declaration"