-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.d.ts
37 lines (32 loc) · 1.09 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/// <reference types="node" />
import type {
FastifyPluginAsync,
FastifyReply,
FastifyRequest,
RouteOptions,
} from "fastify";
type OperationResolver = (
operationId: string,
method: string,
path: string,
) => ((req: FastifyRequest, res: FastifyReply) => void) | RouteOptions;
export interface FastifyOpenapiGlueOptions {
specification: object | string;
serviceHandlers?: object;
/** @deprecated use serviceHandlers field instead */
service?: object;
securityHandlers?: object;
operationResolver?: OperationResolver;
prefix?: string;
addEmptySchema?: boolean;
/**
* NOTE:
* This does not enable cookie validation (Fastify core does not support cookie validation).
* This is simply a flag which triggers the addition of cookie schema (from the OpenAPI specification), into the 'schema' property of Fastify Routes options.
* You can then hook Fastify's 'onRoute' event to make use of the schema as you wish.
*/
addCookieSchema?: boolean;
}
declare const fastifyOpenapiGlue: FastifyPluginAsync<FastifyOpenapiGlueOptions>;
export default fastifyOpenapiGlue;
export { fastifyOpenapiGlue };