简体   繁体   中英

Using OpenAPI 3 with Node.JS

I would like to integrate OpenAPI 3 into my node.js project and take advantage of the Swagger tools that are available.

I noticed that the swagger npm module hasn't been updated in five years. There are other questions, such as this one ( How to use OpenAPI 3.0 in Node.js? ) which have basically gone unanswered.

A superficial web search yields me no results.

Does anyone have some ideas/suggestions on how to implement the OpenAPI 3.* standard into swagger apps in node? Even if you've found a tutorial or some description on how to do this manually, I would be most grateful for some direction and advice.

I tried just simply putting the OpenAPI 3 standard in the editor ( swagger project edit ) as you would the online editor, and it goes crazy with errors. I tried manually updating the swagger.yaml document, which also just leads to the node application crashing.

The updates from the new standard (3.* vs 2) are so much easier to read, implement and reuse, which is why I'm asking about this. Again, any direction or help would be greatly appreciated.

Swagger changed its name to OpenAPI starting with version 3.0 back in 2017. The company that originally created the Swagger standard (Smartbear) now uses the Swagger name for its own tooling, while the open standard goes by OpenAPI. This is why you're not seeing many tools that use the name Swagger.

Node.js is a very popular language, so there is an abundance of tooling available for OpenAPI 3.0. In the future, use the term "OpenAPI" when searching, and you'll get better results.

The popular site https://openapi.tools/ has a wide assortment of popular tools available that utilize OpenAPI, along with a list of what languages each tool uses. This is a great starting point, though there are many other tools out there.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM