I'm using grape-swagger gem to produce swagger documentation for dredd.
I have such params:
params do
requires :id, type: Integer, documentation: { x: { example: 1 } }
end
Grape swagger ignores example param.
Instead of this:
{
"in": "path",
"name": "id",
"type": "integer",
"format": "int32",
"required": true,
"x-example": 1
}
I got this:
{
"in": "path",
"name": "id",
"type": "integer",
"format": "int32",
"required": true
}
How to send example values for test purposes?
I found this in dredd issues. This solves my problem. In a nutshell, the solution looks like this:
Now,I can proxy example value to params body with this: