require swagger-jsdoc under version 7 code example Example: install swagger jsdoc npm install swagger-jsdoc --save