I am having a problem with setting up the swagger into my node.js application. I am using swagger-jsdoc and swagger-ui-express for creating documentation. Here are the versions
"swagger-jsdoc": "3.5.0", "swagger-ui-express": "4.1.3"
Below is the configs, which I pass to swagger-jsdoc.
openapi: 3.0.0
info:
description: test
version: 3.0.0
title: U-CRM api documentation
termsOfService: http://swagger.io/terms/
servers:
- url: 'https://localhost:5000'
description: Local server
tags:
- name: U-CRM
description: CRM for university
components:
parameters:
$ref: 'components/parameters/index.yml'
schemas:
$ref: 'components/schemas/index.yml'
paths:
$ref: '#/paths/index.yml'
After all, I get an error
Cannot read property 'parameters' of undefined
Actually, it is surprising to me, as I read swagger docs carefully. What could be the problem?