Skip to content

Data Models

Pradeep Singh edited this page Mar 8, 2020 · 2 revisions

Mockiato structures data according to 4 basic models: a service, a request/response pair, a group, and an owner.

Service

The service model is the primary entity, and the remaining 3 are sub-components of it. The service is comprised of a base path, type (e.g. SOAP, REST), name, owner, group, and a set of request/response pairs.

RR Pair

A request/response pair holds all information necessary for request matching (headers, status codes, HTTP methods, relative paths, request bodies, response bodies, etc.) At least one RR pair should be associated with a service for matching to occur, but many can run on a single service. For example, one service running on base path /v2/pets could have 2 RR pairs: one for creating a pet (e.g. a POST with some request data), and one for retrieving the pet (e.g. a GET with the pet ID as a relative path).

Group (SUT)

Formerly known as a "system under test", a group is a convenient way to organize services. Think of it like a tag; it's just a way to say "these services belong together". It has only 2 fields: a generated ID and a name. The name is prepended to the base path of your virtual service. For example, a service with basepath /v2/pets in the group "test" will run in Mockiato on the base path /virtual/test/v2/pets.


Back                                       Next