Trax-air/swagger-tester

Get 404 responses when testing local petstore APIs

Closed this issue · 2 comments

Hi! I'm trying to use swagger_tester to validate my swagger spec. But when i tested local petstore APIs(downloaded from http://petstore.swagger.io/v2/swagger.json), i got 404 responses. In the case of online petstore APIs i got 200 responses. What i mean is i got different responses when testing the same APIs online and locally. What's the problem? Any help is much appreciated.

My code:
swagger_test(swagger_yaml_path='./input/swagger-petstore.yaml')
in python 2.7 win10.

When you use swagger_test with a path to a swagger.yaml file you also need to have the implementation of the API (the python file used by connexion). See connexion doc for more details.

If you don't use connexion, you should start your api server and give the url to swagger_test.

Thank you for your response. I think i should understand how connexion works first, I will have a try!