Swagger uses JSON Schema to describe the data formats.
https://swagger.io/docs/specification/data-models/keywords/
This is a easier write, easier to read, compatible with JSON Schema alternative. Spartan Schema could be used instead of JSON Schema to make the document easier for humans to work with.