I've created a working REST API with Node.js Express that operates CRUD operations within SQL Server. Now, I am given task to document my API using Swagger. However, my API do not have Swagger modules installed during its creation.
I've tried to create a copy of my API using SwaggerHub and generate Node.js server from the API, but found no solution to get it work with SQL Server.
Can anyone please enlighten me on Swagger and how to connect my created Swagger API to SQL Server using Node.js Express?
Swagger is a set of open-source tools built around the OpenAPI Specification that can help you design, build, document and consume REST APIs
OpenAPI Specification (formerly Swagger Specification) is an API description format for REST APIs
If you already created a swagger definition file for your API then you can use following tools to generate what you need
Either ways you will have to create database connection and map your data into db table and javascript model. Like explained in here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.