grape-swagger: Uncaught TypeError: Cannot read property '$ref' of undefined
This happens when I make params like this:
params do
requires :participants, type: Array do
use :participant
end
end
When I define param as simple Array and write paramas inside of it.
This is most likely bug of Swagger itself, but is it possible to avoid it?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (7 by maintainers)
I think there is a similar problem with entities too
This throws the same error on the swagger-ui:
When i validated generated JSON, It seems to be missing required property
items. Or is there something i am missing? The responded array would be of string(['string1', 'string2'])So it should be generating the YAML as:
We need something like this to generate the YAML: