Skip to content

General description

Omar Abdelhafith edited this page Jul 2, 2015 · 1 revision

Mockpy matches the request received with the list of YAML files stored in the provided inout directory. When a request is received, it gets matched with a specific YAML configuration. This YAML file can either contain the response to return, or it could define the name of a json/image/html to return, this file is located inside the res directory.

The normal directory structure looks like the following:

Current Directory
    inout\
        YAML files
    res\
        Static files

The inout location and res locations can be changed by passing the correct command line arguments, check mockpy command line configurations for more details.

inout directory

This directory, as stated above, contains a list of YAML files, each file defines the matching parameter to be used on the received response.

Check YAML request response file format for more information about the YAML configuration format.

Res directory

res directory includes all the static files that we want to serve in the response. When we specify a body_image or body_file, the file specified must exist in the res directory