Forum Discussion
1. There are several different ways to generate OpenAPI documents based off of existing code/APIs. One option is to generate a document based off your code. These usually come in the form of annotations or something that integrates with your framework. I found one specifically for Typescript here: https://tsoa-community.github.io/docs/introduction.html
You can also use the Swagger Inspector tool. This tool will allow you to make API calls to your services, and record both the request as well as the response. Once you've got a few request and responses recorded, you can generate a simple OpenAPI file. This won't be a complete solution as there may be a lot of details missing, but at least it will give you a strong jumping off point: https://inspector.swagger.io/builder
2. I've looked into this a little bit and I came across this website a while back: https://openapi.tools/. I think what you would want to take a look at is the Data Validator tools on this site. I haven't tested out any personally.
Hope this helps!
- johnjennifer3 years agoOccasional Visitor
express-openapi-validator is an unopinionated library that integrates with new and existing API applications. express-openapi-validator lets you write code the way you want; it does not impose any coding convention or project layout. Simply, install the validator onto your express app, point it to your OpenAPI 3 specification, then define and implement routes the way you prefer.
Related Content
- 5 years ago
- 7 years ago
Recent Discussions
- 3 days ago
- 4 days ago
- 14 days ago
- 31 days ago