Skip to content

Commit 66eca17

Browse files
committed
fix for #577, added extension for default value
1 parent 788e950 commit 66eca17

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/types/operation.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth
106106
param['enum'] = [true, false]; // use actual primitives
107107
}
108108

109+
if(param['x-examples']) {
110+
var d = param['x-examples'].default;
111+
if(typeof d !== 'undefined') {
112+
param.default = d;
113+
}
114+
}
115+
109116
if (typeof param['enum'] !== 'undefined') {
110117
var id;
111118

0 commit comments

Comments
 (0)