-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add multipart fix when does not exist any body #905
Conversation
@@ -13,19 +13,22 @@ export async function createApp( | |||
port = 3000, | |||
customRoutes = (app) => {}, | |||
useRoutes = true, | |||
apiRouter = undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter was not used
@@ -216,7 +220,6 @@ export class RequestValidator { | |||
} | |||
} | |||
}); | |||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant return 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function return it is not used
Hi @cdimascio, can you please review this? 🙂 |
Hi @cdimascio sorry for the inconvenience, do we have an ETA on when this fix will be released? |
Hey @cdimascio, any chance you have an ETA for when this fix will be released? Thanks! |
Context in our project we have endpoints in which there is no type of body parser involved, so req.body is always undefined for those requests. This happens because the body is not consumed on the server but is simply forwarded to another API (Our API is just a proxy to another API).
Therefore, we do not validate the content of the file in any way, we only check that the endpoint exists in the SPEC.
That said, we validate that the
multipartNested
function is only applied when the body exists so as not to generate an error ofTypeError: Cannot convert undefined or null to object
.