@hirosystems/api-toolkit
Version:
API development toolkit
14 lines (13 loc) • 542 B
TypeScript
import { FastifyPluginAsync, FastifyPluginCallback } from 'fastify';
import { SwaggerOptions } from '@fastify/swagger';
export interface OpenApiGeneratorOptions {
apiDefinition: FastifyPluginAsync | FastifyPluginCallback;
swaggerOptions?: SwaggerOptions;
prefix?: string;
outputDirectory?: string;
}
/**
* Generates OpenAPI JSON and YAML spec documents based on a given Fastify API plugin with optional
* Swagger definitions.
*/
export declare function generateOpenApiSpec(options: OpenApiGeneratorOptions): Promise<void>;