dino-express
Version:
DinO enabled REST framework based on express
25 lines (24 loc) • 1.21 kB
TypeScript
interface Prototype {
constructor: {
name: string;
[key: string]: any;
};
[key: string]: any;
}
type MethodDecoratorFcn = (target: Prototype, property: string, descriptor: PropertyDescriptor) => void;
export declare const Path: <T extends new (...args: any[]) => object>(pathId: string) => (target: T) => void;
/**
* Allows to define the method that will handle the defined OpenAPI operation
* @param operationId the identifier of the operation as defined on the OpenAPI specification
* @param fcn the method that will handle the operation, if undefined the operationId will be used as a mapping
* @returns the method decorator handler function
*/
export declare const Operation: (operationId: string) => MethodDecoratorFcn;
/**
* Allows to define the HTTP method that will be handled by the function for the defined OpenAPI operation
* @param httpMethod the identifier of the operation as defined on the OpenAPI specification
* @param fcn the method that will handle the operation, if undefined the operationId will be used as a mapping
* @returns the method decorator handler function
*/
export declare const Method: (httpMethod: string) => MethodDecoratorFcn;
export {};