Published in


Handling complex JSON Schemas in Python

In a previous post we looked at how to test your Python API app with JSON Schema. In case you have to deal with complex and nested JSON data, schema definitions can get long and confusing. However, there are ways to clean up and reuse your schemas by using references. Let’s see what they are and how you can leverage them in your testing setup.

Internal References

Let’s take an example endpoint GET /recordings/:id which returns a JSON response for a recording of a classical music piece:




Grammofy is a streaming service for classical music.

Recommended from Medium

How to Make the Camera Shake Using Impulse Listener Extensions in Cinemachines Virtual Cameras

CSS animations

Angular Stagger Animation — Cards Cascading

How I managed to clean up my Activities and Fragments

How to Detect XXE Attacks from Text Input in JavaScript

Find the minimum number of swaps to sort unsorted array.

Why (new) Angular made me sad— first time experience

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Paul Götze

Paul Götze

Creator of & Authoring code. Comics addict and fan of bad jokes.

More from Medium

Why is multi-threaded Python so slow?

The `getattr` function in Python

An Introduction to Functions in Heap

Python Static Arrays, Dynamic Arrays, and Deques