@busy-hour/blaze
Version:
<h1 align='center'>🔥 Blaze</h1> <div align='center'> An event driven framework for 🔥 Hono.js </div>
18 lines (17 loc) • 1.4 kB
TypeScript
import type { OpenAPIRegistry, OpenApiGeneratorV3, OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
import type { OpenAPIObjectConfig } from '@asteasolutions/zod-to-openapi/dist/v3.0/openapi-generator';
import type { Env, Schema } from 'hono';
import { Hono } from 'hono';
import type { MergePath, MergeSchemaPath } from 'hono/types';
import type { BlazeOpenAPIOption, CreateBlazeOption } from '../types/router';
export declare class BlazeRouter<E extends Env = Env, S extends Schema = NonNullable<unknown>, BasePath extends string = '/'> extends Hono<E, S, BasePath> {
readonly openAPIRegistry: OpenAPIRegistry | null;
private zodApi;
constructor(options?: Pick<CreateBlazeOption, 'router'>);
openapi(route: BlazeOpenAPIOption): void;
getOpenAPIDocument(config: OpenAPIObjectConfig): ReturnType<OpenApiGeneratorV3['generateDocument']>;
getOpenAPI31Document(config: OpenAPIObjectConfig): ReturnType<OpenApiGeneratorV31['generateDocument']>;
doc(path: string, config: OpenAPIObjectConfig): void;
doc31(path: string, config: OpenAPIObjectConfig): void;
route<SubPath extends string, SubEnv extends Env, SubSchema extends Schema, SubBasePath extends string>(path: SubPath, app?: Hono<SubEnv, SubSchema, SubBasePath> | BlazeRouter<SubEnv, SubSchema, SubBasePath>): BlazeRouter<E, MergeSchemaPath<SubSchema, MergePath<BasePath, SubPath>> & S, BasePath>;
}