Skip to content

Commit

Permalink
Merge f0c85e5 into be57132
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannMa committed Aug 2, 2018
2 parents be57132 + f0c85e5 commit 5181804
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
4 changes: 3 additions & 1 deletion lib/index.js
Expand Up @@ -462,7 +462,9 @@ internals.applyRouteDefaults = (defaults, options) => {
'options.validate.params',
'config.validate.params',
'options.validate.query',
'config.validate.query'
'config.validate.query',
'options.response.schema',
'config.response.schema'
]);
};

Expand Down
30 changes: 24 additions & 6 deletions test/index.js
Expand Up @@ -143,7 +143,10 @@ describe('Toys', () => {
headers: { defaults: true },
params: { defaults: true }
},
bind: { defaults: true }
bind: { defaults: true },
response: {
schema : { defaults: true }
}
},
options: {
anything: { x: 1 },
Expand All @@ -153,7 +156,10 @@ describe('Toys', () => {
headers: { defaults: true },
params: { defaults: true }
},
bind: { defaults: true }
bind: { defaults: true },
response: {
schema : { defaults: true }
}
}
};

Expand All @@ -166,7 +172,10 @@ describe('Toys', () => {
headers: {},
params: {}
},
bind: {}
bind: {},
response: {
schema: {}
}
},
options: {
anything: { y: 2 },
Expand All @@ -176,7 +185,10 @@ describe('Toys', () => {
headers: {},
params: {}
},
bind: {}
bind: {},
response: {
schema: {}
}
}
};

Expand All @@ -191,7 +203,10 @@ describe('Toys', () => {
headers: {},
params: {}
},
bind: {}
bind: {},
response: {
schema: {}
}
},
options: {
anything: { x:1, y: 2 },
Expand All @@ -201,7 +216,10 @@ describe('Toys', () => {
headers: {},
params: {}
},
bind: {}
bind: {},
response: {
schema: {}
}
}
});
});
Expand Down

0 comments on commit 5181804

Please sign in to comment.