You can use the Fox Mockery Server for:
- Contract Testing
- API Documentation
- E2E Testing
- Generate Open API Specification
follow below steps to run a Mock Server on your local.
- Clone the repository
- Run this command on the Fox Mockery directory
make docker
- Now you can open it on your browser - localhost:8030 and then use Insomnia or Postman
If you create a new service in the mocks
directory, and you want to generate Open Api Specification, run this command:
make openapi
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 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!'
The Fox Mockery is an open-sourced software licensed under the MIT license.