Trax-air / swagger-tester

Automatically test your swagger API
MIT License
104 stars 36 forks source link

Test with custom parameters #47

Open lcofre opened 6 years ago

lcofre commented 6 years ago

Hi!

I was wondering if is there a way to specify values for parameters in path, query or body, for each of the expected responses in the swagger file.

Thanks in advance for your help!

cyprieng commented 6 years ago

Currently swagger tester only test that returned data match the definition in the swagger spec, and send request using example data. So that's not possible for now, but could be a nice improvement 👍

flavianh commented 6 years ago

@lcofre What interface do you have in mind?

lcofre commented 6 years ago

Hi @flavianh !

I was thinking on providing a dict similar to the one for authorize_error:

params = {
  'post': {
    '/pet': {'200': {'name': 'saoirse', 'age': 5}}
  }
}

Thanks for your interest!

flavianh commented 6 years ago

@cyprien-g Is there a quick way to do it?