Django Swagger Tester

A Django test utility for validating Swagger documentation

Package version Documentation status Code coverage Supported Python versions Supported Django versions

Code style Black Checked with mypy Pre-commit enabled


Documentation: https://django-swagger-tester.readthedocs.io

Repository: https://github.com/snok/django-swagger-tester


Django Swagger Tester

Django Swagger Tester is a simple test utility for validating your Django Swagger documentation.

Its aim is to make it easy for developers to catch and correct documentation errors in their Swagger/OpenAPI docs.

Features

The package has two primary features:

Support for other use cases could be added in the future, and contributions made are appreciated.

Implementations

This package currently supports:

  • Testing of dynamically rendered OpenAPI schemas using drf-yasg
  • Testing of dynamically rendered OpenAPI schemas using drf-spectacular
  • Testing any implementation which generates a static yaml or json file (e.g., like DRF)

If you’re using another method to generate your documentation and would like to use this package, feel free to add an issue, or create a PR. Adding a new implementation is as easy as adding the required logic needed to load the OpenAPI schema.