UNPKG

fastify-mongoose-rest

Version:

Rest API generator tools for fastify and mongoose

65 lines (64 loc) 1.59 kB
import { Model } from 'mongoose'; export interface FastifyMongooseRestOptions { validationSchema?: object; tags?: string[]; } export default function FastifyMongooseRest(name: string, model: Model<any>, options?: FastifyMongooseRestOptions): { create: { method: import("fastify").HTTPMethods; url: string; schema: { summary: string; tags: string[]; body: object; response: object; }; handler: any; }; details: { method: import("fastify").HTTPMethods; url: string; schema: { summary: string; tags: string[]; params: object; querystring: object; response: object; }; handler: any; }; modify: { method: import("fastify").HTTPMethods; url: string; schema: { summary: string; tags: string[]; params: object; body: object; response: object; }; handler: any; }; list: { method: import("fastify").HTTPMethods; url: string; schema: { summary: string; tags: string[]; querystring: object; response: object; }; handler: any; }; search: { method: import("fastify").HTTPMethods; url: string; schema: { summary: string; tags: string[]; body: object; response: object; }; handler: any; }; };