<commit_before>.. image:: https://travis-ci.org/Trax-air/swagger-tester.svg?branch=master
   :alt: Travis status
   :target: https://travis-ci.org/Trax-air/swagger-tester
.. image:: https://www.quantifiedcode.com/api/v1/project/8c8d73f7301242c2af0a8e12025bc4ce/badge.svg
  :target: https://www.quantifiedcode.com/app/project/8c8d73f7301242c2af0a8e12025bc4ce
  :alt: Code issues
.. image:: https://badges.gitter.im/Trax-air/swagger-tester.svg
  :alt: Join the chat at https://gitter.im/Trax-air/swagger-tester
  :target: https://gitter.im/Trax-air/swagger-tester?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

swagger-tester
==============

Swagger-tester will test automatically your swagger API. Swagger API made with connexion (https://github.com/zalando/connexion) are supported directly without running the API server. In the case you use connexion it will automatically run a test server from your swagger file.

To run the test, swagger-tester will detect every path and actions of your API. And for each, it will send a request and check if the response match the swagger file specification.

Example Usage
-------------

.. code:: python

 from swagger_tester import swagger_test

  # Define the error you authorize in your API
  # By default, every status_code over other than 1xx, 2xx or 3xx
  # will be considered as an error.
  authorize_error = {
    'get': {
      '/pet/': ['400', '404']
    }
  }
<commit_msg>DOC: Added versioneye badge<commit_after>.. image:: https://travis-ci.org/Trax-air/swagger-tester.svg?branch=master
   :alt: Travis status
   :target: https://travis-ci.org/Trax-air/swagger-tester
.. image:: https://www.quantifiedcode.com/api/v1/project/8c8d73f7301242c2af0a8e12025bc4ce/badge.svg
  :target: https://www.quantifiedcode.com/app/project/8c8d73f7301242c2af0a8e12025bc4ce
  :alt: Code issues
.. image:: https://badges.gitter.im/Trax-air/swagger-tester.svg
  :alt: Join the chat at https://gitter.im/Trax-air/swagger-tester
  :target: https://gitter.im/Trax-air/swagger-tester?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. image:: https://www.versioneye.com/user/projects/56b4a9340a0ff5003b97548a/badge.svg
  :alt: Dependency Status
  :target: https://www.versioneye.com/user/projects/56b4a9340a0ff5003b97548a  

swagger-tester
==============

Swagger-tester will test automatically your swagger API. Swagger API made with connexion (https://github.com/zalando/connexion) are supported directly without running the API server. In the case you use connexion it will automatically run a test server from your swagger file.

To run the test, swagger-tester will detect every path and actions of your API. And for each, it will send a request and check if the response match the swagger file specification.

Example Usage
-------------

.. code:: python

 from swagger_tester import swagger_test

  # Define the error you authorize in your API
  # By default, every status_code over other than 1xx, 2xx or 3xx
  # will be considered as an error.
  authorize_error = {
    'get': {
      '/pet/': ['400', '404']
    }
  }

{'fraction_non_alphanumeric': 0.1224293059125964, 'fraction_numerical': 0.043059125964010285, 'mean_word_length': 4.086601307189542, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3036546', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1066, 'n_words': 278}