File tree Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -180,21 +180,9 @@ export class SwaggerModule {
180180 document = lazyBuildDocument ( ) ;
181181 }
182182
183- if ( options . swaggerOptions . patchDocumentOnRequest ) {
184- const documentToSerialize =
185- options . swaggerOptions . patchDocumentOnRequest ( req , res , document ) ;
186- const htmlPerRequest = buildSwaggerHTML (
187- baseUrlForSwaggerUI ,
188- documentToSerialize ,
189- options . swaggerOptions
190- ) ;
191- return res . send ( htmlPerRequest ) ;
192- }
193-
194183 if ( ! html ) {
195184 html = buildSwaggerHTML (
196185 baseUrlForSwaggerUI ,
197- document ,
198186 options . swaggerOptions
199187 ) ;
200188 }
@@ -211,24 +199,13 @@ export class SwaggerModule {
211199 document = lazyBuildDocument ( ) ;
212200 }
213201
214- if ( options . swaggerOptions . patchDocumentOnRequest ) {
215- const documentToSerialize =
216- options . swaggerOptions . patchDocumentOnRequest ( req , res , document ) ;
217- const htmlPerRequest = buildSwaggerHTML (
218- baseUrlForSwaggerUI ,
219- documentToSerialize ,
220- options . swaggerOptions
221- ) ;
222- return res . send ( htmlPerRequest ) ;
223- }
224-
225202 if ( ! html ) {
226203 html = buildSwaggerHTML (
227204 baseUrlForSwaggerUI ,
228- document ,
229205 options . swaggerOptions
230206 ) ;
231207 }
208+
232209 res . send ( html ) ;
233210 } ) ;
234211 } catch ( err ) {
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ function toTags(
6666 */
6767export function buildSwaggerHTML (
6868 baseUrl : string ,
69- swaggerDoc : OpenAPIObject ,
7069 customOptions : SwaggerCustomOptions = { }
7170) {
7271 const {
You can’t perform that action at this time.
0 commit comments