Wrong type definition for OperationHandlerArraySee original GitHub issue
When defining operations in typescript we can use the type
Operation which is either
OperationFunction | OperationHandlerArray.
The problem is that
OperationHandlerArray is an
OperationFunction. The apiDoc property becomes a property of every elements of the array instead of the whole array.
Here is the project
@types/express-openapi with the correct typing : https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/express-openapi/index.d.ts#L266
Is it possible to fix that typing issue ?
It prevents the use of
apiDoc on endpoints with middlewares.
- Created 4 years ago
- Comments:8 (5 by maintainers)