import { Plugin } from 'koas-core';
declare module 'koas-core' {
    interface OpenAPIContext {
        /**
         * The URL on which the OpenAPI document is served.
         */
        specURL?: string;
    }
}
interface SpecHandlerOptions {
    /**
     * The URL on which to serve the OpenAPI document.
     */
    url?: string;
}
/**
 * Serve the Koas OpenAPI document as JSON.
 *
 * @param options - Options to configure how the OpenAPI document is served.
 * @returns A Koas plugin to serve the OpenAPI document.
 */
export declare function specHandler({ url }?: SpecHandlerOptions): Plugin;
export {};
