I am using swagger-autogen to generate Swagger documentation for my Node.js Express.js project. While writing the Swagger comments directly in my code, I am facing challenges ensuring there are no issues or missing columns.
Is there a VS Code extension or a method to validate the Swagger comments in my code? Ideally, I would like an extension that can:
Highlight errors in Swagger comments.
Notify me of any missing fields or issues with the Swagger schema.
Provide suggestions or autofill for Swagger documentation.
Here is an example of how my comments look:
javascript
Copy code
`/**`your text`
* @swagger
* /api/users:
* get:
* summary: Retrieve a list of users
* responses:
* 200:
* description: A list of users
* content:
* application/json:
* schema:
* type: array
* items:
* type: object
* properties:
* id:
* type: integer
* name:
* type: string
*/
app.get('/api/users', (req, res) => {
// ...
});`
I want to ensure that the comments are correct and complete as per Swagger standards.
Any recommendations for VS Code extensions or tools that can help with this?
Thanks in advance!
i tried to find the extension on the vs code but didn’t find one.
so looking for the extension for the problem
jatin udasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.