File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ const config = require('../config/config.json');
3
3
exports . options = {
4
4
routePrefix : '/swagger' ,
5
5
exposeRoute : true ,
6
+ staticCSP : true ,
7
+ transformStaticCSP : ( header ) => header ,
6
8
swagger : {
7
9
info : {
8
10
title : 'Encryption API with Node.js' ,
@@ -18,4 +20,8 @@ exports.options = {
18
20
consumes : [ 'application/json' ] ,
19
21
produces : [ 'application/json' ] ,
20
22
} ,
23
+ uiConfig : {
24
+ docExpansion : 'full' ,
25
+ deepLinking : false ,
26
+ } ,
21
27
} ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const config = require('../../src/config/config.json');
5
5
// Swagger
6
6
describe ( 'Swagger endpoint response' , ( ) => {
7
7
it ( 'should return 200' , ( done ) => {
8
- request . get ( `http://localhost:${ config . app . port } /swagger/index.html ` , ( err , res ) => {
8
+ request . get ( `http://localhost:${ config . app . port } /swagger/` , ( err , res ) => {
9
9
if ( err ) throw err ;
10
10
expect ( res . statusCode ) . to . equal ( 200 ) ;
11
11
done ( ) ;
You can’t perform that action at this time.
0 commit comments