DEV Community

Discussion on: How to use the Open API and Swagger Validator plugin for Chai and Jest to keep your API documentation up to date

Collapse
 
hggonzalezdev profile image
Gabriel Gonzalez

In my case I'm using OpenAPI 2 Spec but no matter how I try to make the GET or POST request I always get a 404 error instead of 200 or 201, I use swagger online editor and postman and the problem doesn't seen to be the services or endpoints. Not sure if it has to do with the fact that I'm using OpenAPI 2 instead of 3

Collapse
 
jameswallis profile image
James Wallis

Hi, the plugin should support OpenAPI 2 Spec. Here is a valid v2 spec that they use to test. It's possible that you've found a bug so I'd recommend raising it on GitHub.

Collapse
 
hggonzalezdev profile image
Gabriel Gonzalez

In that example they specify the path in the json file, but in my case I'm doing it using express-openapi and I define the paths on each controller I create, could that be an issue at the moment of testing?