I have the below route:
/myroute: x-swagger-router-controller: myroute post: operationId: createSomething parameters: - name: payload in: body required: true schema: type: object properties: somedefault: type: string default: teststring and in my createSomething function I try to console log the values:
console.log(req.swagger.params.payload.value) and I expect to see
{somedefault: 'teststring'}
But I see nothing for somedefault. Am I misunderstanding where the default parameters should show up in swagger-node?
1 Answers
Answers 1
According to this, default is ignored if required is true.
0 comments:
Post a Comment