Skip to content

Commit

Permalink
Merge pull request #426 from seriousme/fix-operationResolver-typescri…
Browse files Browse the repository at this point in the history
…pt-definitions

fix: operationResolver Typescript definitions to match new parameters
  • Loading branch information
seriousme authored Oct 24, 2022
2 parents f05f94c + 7a2df1b commit a40a20c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

import { FastifyPluginAsync } from "fastify";

type OperationResolver = (operationId: string) => (req: any, res: any) => void;
type OperationResolver = (
operationId: string,
method: string,
path: string
) => (req: any, res: any) => void;

export interface FastifyOpenapiGlueOptions {
specification: object | string;
service?: object;
securityHandlers?: object;
operationResolver?: OperationResolver;
prefix?: string;
}
}

declare const fastifyOpenapiGlue: FastifyPluginAsync<FastifyOpenapiGlueOptions>;

Expand Down

0 comments on commit a40a20c

Please sign in to comment.