fix: allow joi object to be passed directly to response.schema

This commit is contained in:
Scott Cooper
2018-02-26 22:43:00 -08:00
parent 62c721de25
commit 81bd412152
2 changed files with 4 additions and 0 deletions

View File

@@ -1381,6 +1381,7 @@ export interface ValidationObject {
export type RouteOptionsResponseSchema =
boolean
| ValidationObject
| AnySchema
| ((value: object | Buffer | string, options: ValidationOptions) => Promise<any>);
/**

View File

@@ -11,6 +11,9 @@ const routeOptions: RouteOptions = {
params: {
name: Joi.string().min(3).max(10)
}
},
response: {
schema: Joi.string()
}
};