File tree 1 file changed +13
-13
lines changed
1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -155,19 +155,6 @@ export class OpenApiValidator {
155
155
. catch ( next ) ;
156
156
} ) ;
157
157
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
-
171
158
// security middlware
172
159
let scmw ;
173
160
middlewares . push ( function securityMiddleware ( req , res , next ) {
@@ -184,6 +171,19 @@ export class OpenApiValidator {
184
171
. catch ( next ) ;
185
172
} ) ;
186
173
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
+
187
187
// request middlweare
188
188
if ( this . options . validateRequests ) {
189
189
let reqmw ;
You can’t perform that action at this time.
0 commit comments