We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
while working with your router, I came up with the following type declaration:
declare module "koa-router-ajv-swaggergen" { import KoaRouter from "@koa/router" import { JSONSchemaType } from "ajv" // type SchemaRouterMethod = "del" | "get" | "post" | "put" type Handler = | (( this: Router, path: string, schema: JSONSchemaType<any>, ...handlers: KoaRouter.Middleware[] ) => ReturnType<KoaRouter.Middleware>) // | (( // this: Router, // path: string, // config: { schema?: object; pre?: KoaRouter.Middleware[] }, // ...handlers: KoaRouter.Middleware[] // ) => ReturnType<KoaRouter.Middleware>) export default class Router { rootDoc: { openapi: string info: { title: string description: string version: string } tags: string[] servers: string[] } constructor(router: KoaRouter, prefix: string) routes: KoaRouter["routes"] use: KoaRouter["use"] prefix: KoaRouter["prefix"] param: KoaRouter["param"] allowedMethods: KoaRouter["allowedMethods"] get( path: string, schema: JSONSchemaType<any>, ...handlers: KoaRouter.Middleware[] ): ReturnType<KoaRouter.Middleware> // get: Handler post: Handler put: Handler del: Handler } export function setupJsonErrors(app: any): void }
Maybe, this is useful for you. ;)
The text was updated successfully, but these errors were encountered:
I really appreciate your help. I hope to integrate this soon and perhaps add some documentation.
Sorry, something went wrong.
No branches or pull requests
Hi,
while working with your router, I came up with the following type declaration:
Maybe, this is useful for you. ;)
The text was updated successfully, but these errors were encountered: