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