-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty field for group parameters' name with type hash or Array #91
Comments
👍 had the same problem yesterday. It only occurs when I'm using grape master from github. On the official gem version 0.6.1 everything is fine. |
On last version no worker? |
Yes this is the problem I had. |
I'm using the gem now to build my api and I see the same. Using grape-swagger (0.7.2) and grape-swagger-ui (0.0.4) and grape (0.7.0) :-( |
Can someone please retest this against Grape 0.8.0 and maybe add specs around the issue here? |
@dblock coming right up. |
I've tracked this back to a change in grape between 0.6.0 and 0.8.0. |
Okay, I've got a good conversation going with @dblock on that thread, where we've established that it was a regression (at least in the sense that the behavior change isn't fully understood / documented). We'll figure it out there. |
Hi there ! Any news on this ? |
Uh oh, since #47 got fixed (specifically since 04566fc went in), this is even more hilariously wrong. To demonstrate it, I extended the test API with the relevant part of the specs, and ran it through http://petstore.swagger.wordnik.com/ to demonstrate: Note that the 'empty field' is now a file selector 😆 |
@dukedave Indeed. Care to PR some specs to start? |
@dblock okay, so 791943c demonstrates the problem shown in the image above. Since the new file selector problem is only visible as a result of this issue, I just fixed this issue solely in 47168a4. For reference the spec to cover this fix went in on c18719f. It's not the prettiest solution, but I don't see that grape is going to stop sending us these 'parent of a nested param' params any time soon (since it doesn't break anything in grape). |
Fixed in tim-vandecasteele@15604b0. |
It's not really fixed. It doesn't work for the first example: optional :preferences, type: Array do
requires :key
requires :value
end Swagger-ui uses this to generate |
@nono, can you please reopen a bug, hopefully with a failing spec? Thanks. |
Take the following example:
In swagger-ui, there would be an empty text field for
preferences
andname
. Is this suppoed to be this way ? Tested using the github version ofgrape
andgrape-swagger
.Thanks
The text was updated successfully, but these errors were encountered: