Skip to content

Commit

Permalink
fix: pass swagger options to html/js builders
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jun 19, 2023
1 parent 75dc033 commit f1434e7
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions lib/swagger-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class SwaggerModule {
}

if (!swaggerInitJS) {
swaggerInitJS = buildSwaggerInitJS(document, options);
swaggerInitJS = buildSwaggerInitJS(document, options.swaggerOptions);
}

res.send(swaggerInitJS);
Expand All @@ -129,7 +129,10 @@ export class SwaggerModule {
}

if (!swaggerInitJS) {
swaggerInitJS = buildSwaggerInitJS(document, options);
swaggerInitJS = buildSwaggerInitJS(
document,
options.swaggerOptions
);
}

res.send(swaggerInitJS);
Expand All @@ -150,7 +153,11 @@ export class SwaggerModule {
}

if (!html) {
html = buildSwaggerHTML(baseUrlForSwaggerUI, document, options);
html = buildSwaggerHTML(
baseUrlForSwaggerUI,
document,
options.swaggerOptions
);
}

res.send(html);
Expand All @@ -166,7 +173,11 @@ export class SwaggerModule {
}

if (!html) {
html = buildSwaggerHTML(baseUrlForSwaggerUI, document, options);
html = buildSwaggerHTML(
baseUrlForSwaggerUI,
document,
options.swaggerOptions
);
}

res.send(html);
Expand Down

0 comments on commit f1434e7

Please sign in to comment.