API Mock Templates
Our optimized API mock templates to create API mock servers.
- Create a new repository for API Mock Server by pressing the
Use this template
button in this repository. - Clone your repository.
- Configuration for fly.io and CD:
-
Run
fly launch --dockerfile Dockerfile
to create a new app on yourfly.io
account and answer these questions:Questions Answers Would you like to copy its configuration to the new app? Yes ( y
)Choose an app name Leaving blank ( api-mock-server
) or choose a new app nameWould you like to set up a Postgresql database now? No ( N
)Would you like to set up an Upstash Redis database now? No ( N
)Create .dockerignore from 1 .gitignore files? No ( N
)Would you like to deploy now? No ( N
) -
After launching a new app, to be able to deploy the application via GitHub Actions, developers need to create a
Deploy Token
for the project.
-
Configure for publishing wiki documentation:
Add these secrets to the repository:
GH_EMAIL
: The email address of the GitHub account that will be used to publish the wiki documentation.GH_TOKEN
: The personal access token of the GitHub account withrepo
scope enabled that will be used to publish the wiki documentation.
-
Install dependencies:
make install-dependencies
-
Generate the OpenAPI specification (public/openapi.yml):
make doc/generate
-
Start the dev server:
make dev
The applications are reachable at:
- OpenAPI Swagger UI for visualizing the API documentation: http://localhost:8080
- Mock server: http://localhost:4010
Note
Check more detail with the wiki page to understand the templates.
This project is Copyright (c) 2014 and onwards Nimble. It is free software and may be redistributed under the terms specified in the LICENSE file.
This project is maintained and funded by Nimble.
We love open source and do our part in sharing our work with the community! See our other projects or hire our team to help build your product.