README.md in fakeit-0.2.1 vs README.md in fakeit-0.3.0

- old
+ new

@@ -7,10 +7,29 @@ [![Docker Pulls](https://img.shields.io/docker/pulls/realfengjia/fakeit.svg)](https://hub.docker.com/r/realfengjia/fakeit) [![GitHub](https://img.shields.io/github/license/JustinFeng/fakeit.svg)](https://opensource.org/licenses/MIT) Create mock server from Openapi specification +## Motivation + +Openapi mock server is one of core components to support contract based development and testing. As part of our journal, several key requirements for such mock server have been identified: + +* Control response generation in non intrusive manner. i.e. without modifying example in contract +* Randomly generated response to support property based testing +* Fulfill property reference in response generation to support development against contract. i.e. regarding the following response, guarantee the `selectedId` property is always a valid `id` in the items +```json +{ + "selectedId": 1, + "items": [ + { "id": 1 }, + { "id": 2 } + ] +} +``` + +After tried several existing options, we cannot find a best solution to meet all the requirements. So we decide to __'Fakeit till you make it'__. + ## Features * Randomly or statically generated response * Request validation * Load specification from local or remote @@ -32,17 +51,17 @@ Command line options: $ fakeit --help usage: - --spec spec file uri (required) - -p, --port custom port - -q, --quiet mute request and response log - --permissive log validation error as warning instead of denying request - --use-example use example provided in spec if exists - - trial options: - --static generate static response + --spec spec file uri (required) + -p, --port custom port + -q, --quiet mute request and response log + --permissive log validation error as warning instead of denying request + --use-example use example provided in spec if exists + --static generate static response + --static-types generate static value for specified types, e.g. --static-types integer,string + --static-properties generate static value for specified properties, e.g. --static-types id,uuid other options: -v, --version -h, --help