Is it possible to test a REST API against documentation in Django?
<p>I develop a RESTful API server using Django REST Framework, and while the app matures, entity signatures sometimes change.</p>

<p>While writing tests for this app, I began to wonder if there are tools to check that API returns data as stated in documentation, i.e. User entity contains all the required fields etc.</p>

<p>I know that there are API auto-documenting tools like django-rest-swagger and others, and maybe there is some tool that helps asserting that data returned to user has same signature as in documentation?</p>

<p>There are dedicated tools for API documentation (i.e. Swagger: <a href="http://swagger.io/" rel="nofollow">http://swagger.io/</a>). You can also google for "API contracting".</p>

<p>You can validate your server against API spec using DREDD (<a href="http://dredd.readthedocs.io/en/latest/" rel="nofollow">http://dredd.readthedocs.io/en/latest/</a>).</p>

<p>Bonus article: <a href="https://blog.codeship.com/api-documentation-when-preferences-matter/" rel="nofollow">https://blog.codeship.com/api-documentation-when-preferences-matter/</a></p>

python django rest testing