File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -155,19 +155,6 @@ export class OpenApiValidator {
155155 . catch ( next ) ;
156156 } ) ;
157157
158- if ( this . options . fileUploader ) {
159- // multipart middleware
160- let fumw ;
161- middlewares . push ( function multipartMiddleware ( req , res , next ) {
162- return pContext
163- . then ( ( { context : { apiDoc } } ) => {
164- fumw = fumw || self . multipartMiddleware ( apiDoc ) ;
165- return fumw ( req , res , next ) ;
166- } )
167- . catch ( next ) ;
168- } ) ;
169- }
170-
171158 // security middlware
172159 let scmw ;
173160 middlewares . push ( function securityMiddleware ( req , res , next ) {
@@ -184,6 +171,19 @@ export class OpenApiValidator {
184171 . catch ( next ) ;
185172 } ) ;
186173
174+ if ( this . options . fileUploader ) {
175+ // multipart middleware
176+ let fumw ;
177+ middlewares . push ( function multipartMiddleware ( req , res , next ) {
178+ return pContext
179+ . then ( ( { context : { apiDoc } } ) => {
180+ fumw = fumw || self . multipartMiddleware ( apiDoc ) ;
181+ return fumw ( req , res , next ) ;
182+ } )
183+ . catch ( next ) ;
184+ } ) ;
185+ }
186+
187187 // request middlweare
188188 if ( this . options . validateRequests ) {
189189 let reqmw ;
You can’t perform that action at this time.
0 commit comments