Title: JSON-schema for REST API tests
Slug: json-schema-for-rest-api-tests
Date: 2017-11-14 18:00:00
Author: Kartones
Lang: en
Tags: Development
og_image:
Description: How to use JSON-schema for building tests for REST API endpoints, providing examples for classless django views, pytest-django, and json-schema usage.


I wrote a blog post about using JSON-schema to build tests for REST API endpoints that output json at *ticketea's engineering blog*. 
**Update:** Blog no longer accessible but you can download the article in PDF from here: [Using json-schema for REST API endpoint tests](https://kartones.net/downloads/json-schema-for-rest-api-tests.pdf)


It's a small yet interesting example, and will probably serve me as a quickstart for any future django project as it contains useful bits like:

  - classless django views
  - an example of pytest-django and two useful features it provides (the `settings` and `client` fixtures). I'm loving the concept of not needing to write scaffolding code
  - a small usage example of json-schema :)
