-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
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
Breaking change in signature for resolver function #952
Comments
mdmower-csnw
added a commit
to CSNW/express-openapi-validator
that referenced
this issue
Aug 30, 2024
In cdimascio#921, a stronger type applied to OperationHandlerOptions['resolver'] so that end users would have an idea of what the parameters are for their custom resolvers. It went too far in stipulating a return type. Set the return type to unknown and let users decide how much type safety they need in their resolver. Fixes cdimascio#952
cdimascio
pushed a commit
that referenced
this issue
Aug 31, 2024
In #921, a stronger type applied to OperationHandlerOptions['resolver'] so that end users would have an idea of what the parameters are for their custom resolvers. It went too far in stipulating a return type. Set the return type to unknown and let users decide how much type safety they need in their resolver. Fixes #952
This was referenced Nov 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
#921 changed the signature of the resolver function from
to
This breaks backwards-compatibility as Express request handlers can also be arrays of request handlers.
I believe the signature should instead be
Unfortunately more tweaks seem to be required which I haven't found the time to investigate.
The text was updated successfully, but these errors were encountered: