mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
fix: allow joi object to be passed directly to response.schema
This commit is contained in:
1
types/hapi/index.d.ts
vendored
1
types/hapi/index.d.ts
vendored
@@ -1381,6 +1381,7 @@ export interface ValidationObject {
|
||||
export type RouteOptionsResponseSchema =
|
||||
boolean
|
||||
| ValidationObject
|
||||
| AnySchema
|
||||
| ((value: object | Buffer | string, options: ValidationOptions) => Promise<any>);
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,9 @@ const routeOptions: RouteOptions = {
|
||||
params: {
|
||||
name: Joi.string().min(3).max(10)
|
||||
}
|
||||
},
|
||||
response: {
|
||||
schema: Joi.string()
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user