Models

In MockAPI, a model is a blueprint outlining the structure and type of data your API should handle, similar to how Data Transfer Objects (DTOs) work in API frameworks.

By defining a model, you instruct MockAPI to generate realistic, structured data, like user profiles in a social media app, with specified attributes or properties such as names, email and date of birth.

Defining a model enables MockAPI to generate realistic data based on the properties of that model and will return the data based on that structure.

Let's discuss how to create a model next.

Last updated