Y81Kakaei / Fox.Mockery.Server

Dockerise Fox Mockery and creating a clean Mock Server for several services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fox Mockery

Fox Mockery Server

Fox Mockery Documentation

You can use the Fox Mockery Server for:

  • Contract Testing
  • API Documentation
  • E2E Testing
  • Generate Open API Specification

Install on your local

follow below steps to run a Mock Server on your local.

  1. Clone the repository
  2. Run this command on the Fox Mockery directory make docker
  3. Now you can open it on your browser - localhost:8030 and then use Insomnia or Postman

Fox Mockery Service Result

If you create a new service in the mocks directory, and you want to generate Open Api Specification, run this command:

make openapi 

Configuration

Fox Mockery has three config files:

  • fox_services: you can define your services here
  • fox_openapis: Open API Specification configuration
  • fox_settings: main config of the Fox Mockery

You can define different products or services as a service in fox_services config file, each service has a unique address.

OPEN API SPECIFICATION

Open API Specification files will generate according to the json files in the mock service directory.

// generate Open API Specification for all service
make openapi

// Example 
make openapi petstore
 
 // OUTPUT
 AFTER RUNNING THIS COMMAND index.oas.json, index.oas.yml and route.json FILES WILL CREATE IN THE SERVICE DIRECTORY!'

License

The Fox Mockery is an open-sourced software licensed under the MIT license.

About

Dockerise Fox Mockery and creating a clean Mock Server for several services

License:MIT License


Languages

Language:PHP 69.2%Language:Dockerfile 15.5%Language:Makefile 15.4%