Fork me on GitHub
#yada
<
2016-06-22
>
imre08:06:14

@malcolmsparks: I noticed yesterday that PUT seems to not be producing 200 responses

imre08:06:38

unless of course you explicitly state that you want that

imre08:06:50

is there a reason for this?

shaun-mahood15:06:20

@malcolmsparks: I just ran into the same problem as discussed at https://groups.google.com/forum/#!topic/yada-discuss/_ftenyL5nh0 The explanation in that post cleared up a couple misconceptions and confusion I had from looking at the various examples and docs, including trying to understand what edge was doing differently with the routing. Could that type of detail be added to the manual as part of the Hello Swagger section?

malcolmsparks16:06:40

I'm currently working on that section, rewritten around edge. Will push soon.

malcolmsparks16:06:48

@imre it says 204 or 200. What do you think the default should be? I went with 204.

imre16:06:32

@malcolmsparks I would make it conditional - if the response has a body already, 200. if not, 204

imre16:06:48

at least that's the logic I put on top of it for my usecase

malcolmsparks16:06:50

Ah, great idea!

malcolmsparks16:06:09

How simple. How could I have missed that.

jsyrjala21:06:28

@malcolmsparks: I tried the phonebook via swagger: no matter what I do, the response is { "error": "no response from server" }

jsyrjala21:06:15

and my google Chrome complains this to console:

jsyrjala21:06:17

index.js:24 Mixed Content: The page at 'https://yada.juxt.pro/swagger-ui/phonebook-swagger.html?url=/phonebook-api/swagger.json' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://yada-phonebook.juxt.pro/phonebook?q=1'. This request has been blocked; the content must be served over HTTPS.

malcolmsparks23:06:47

@jsyrjala: thanks - i'm currently migrating the phonebook over to https://github.com/juxt/edge

malcolmsparks23:06:09

I'll make sure it works with http (it might need to disable the security headers)