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