mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
express-openapi: Add definition for path item module
This commit is contained in:
Vendored
+22
@@ -251,6 +251,28 @@ declare module "express-openapi" {
|
||||
routes: string
|
||||
}
|
||||
|
||||
export interface OperationFunction extends express.RequestHandler {
|
||||
apiDoc?: OpenApi.OperationObject;
|
||||
}
|
||||
|
||||
export interface OperationHandlerArray {
|
||||
apiDoc?: OpenApi.OperationObject;
|
||||
[index: number]: express.RequestHandler;
|
||||
}
|
||||
|
||||
export type Operation = OperationFunction | OperationHandlerArray;
|
||||
|
||||
export interface PathModule {
|
||||
parameters?: OpenApi.Parameters;
|
||||
get?: Operation;
|
||||
put?: Operation;
|
||||
post?: Operation;
|
||||
delete?: Operation;
|
||||
patch?: Operation;
|
||||
options?: Operation;
|
||||
head?: Operation;
|
||||
}
|
||||
|
||||
interface IJsonSchema {
|
||||
id?: string
|
||||
$schema?: string
|
||||
|
||||
Reference in New Issue
Block a user