-
Notifications
You must be signed in to change notification settings - Fork 58
Body parameter #118
Comments
Yeah, I agree it looks a bit funny. ATM we are building the ability to include request-data during test generation, so you don't have to see the 'DATA GOES HERE' anymore ;-) |
Point was that |
check, I think we should fix that. @noahdietz do you have any thought about this? I think we should do #117 first before doing anymore work on the templates, right now it's very frustrating to work on them |
@bgaluszka - I believe that this has been resolved in #140 . Can you confirm? |
@baynezy unfortunately I don't have that code/spec anymore since we changed our toolkit and moved to swagger 3.0 :/ I've looked on that part of code and it still there https://github.com/apigee-127/swagger-test-templates/blob/master/templates/request/post/post.handlebars#L29-L31, so unless it's not used it's not fixed :) |
Really, I think the request body should be prepared as an object and just dropped in to the template. Example in a rewrite I'm playing with (excuse the awkward formatting, whitespace in handlebars is annoying). |
Currently this code https://github.com/apigee-127/swagger-test-templates/blob/master/templates/request/post/post.handlebars#L24-L28
based on this description
generates body that looks like this
but I think it should look like this
{ 'DATA GOES HERE' }
this is because by http://swagger.io/specification/#parameterObject body is
The payload that's appended to the HTTP request. Since there can only be one payload, there can only be one body parameter. The name of the body parameter has no effect on the parameter itself and is used for documentation purposes only.
.The text was updated successfully, but these errors were encountered: