This is a custom formatter for mountebank that builds an imposter structure from an OpenAPI specification file when it is passed as a configuration file.
The formatter parses the OpenAPI structure and tries to build the stubs based on the definitions of the requests, responses and schemas found. It returns the built imposter object to mountebank and saves it on a json file as well so it can be more easily customized and optimized. The name of the created json file is the service title found in the OpenAPI specification file.
npm install
mb --configfile path/to/openapi.yaml --formatter ./src/formatter.js