1
0
Fork 0

Allow leaving idiomatic undefined

This commit is contained in:
Alan Plum 2019-10-31 16:05:08 +01:00
parent 5dddecc2b3
commit ceff28b9dc
No known key found for this signature in database
GPG Key ID: 8ED72A9A323B6EFD
2 changed files with 2 additions and 2 deletions

View File

@ -407,7 +407,7 @@ instanceRouter.post('/tests', (req, res) => {
})
.queryParam('filter', joi.string().allow("").optional())
.queryParam('reporter', joi.only(...Object.keys(reporters)).optional())
.queryParam('idiomatic', schemas.flag.default(false))
.queryParam('idiomatic', schemas.flag.optional())
.response(200, ['json', LDJSON, 'xml', 'text']);
instanceRouter.post('/download', (req, res) => {

View File

@ -7,7 +7,7 @@ exports.mount = joi.string().regex(/(?:\/[-_0-9a-z]+)+/i).required();
exports.flag = joi.alternatives().try(
joi.boolean(),
joi.number().integer().min(0).max(1)
).default(false);
);
exports.shortInfo = joi.object({
mount: exports.mount,