fastify-mongoose-rest
Version:
Rest API generator tools for fastify and mongoose
15 lines (14 loc) • 490 B
TypeScript
import { FastifyReply, FastifyRequest } from 'fastify';
import { Model } from 'mongoose';
import { FastifyMongooseRestOptions } from '../types';
export declare function Create<T>(basePath: string, model: Model<T>, options: FastifyMongooseRestOptions): {
method: 'POST';
url: string;
schema: {
summary: string;
tags?: string[];
body: object;
response: object;
};
handler: (request: FastifyRequest, reply: FastifyReply) => Promise<any>;
};