Skip to content

Commit 3a61ad9

Browse files
authored
Merge pull request #530 from marle3003/develop
Develop
2 parents 91a364d + 6c52c42 commit 3a61ad9

File tree

3 files changed

+122
-19
lines changed

3 files changed

+122
-19
lines changed

.goreleaser.windows.yml

Lines changed: 112 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,24 @@ chocolateys:
3838
tags: "cross-platform testing devops api mock http kafka rest smtp ldap contract openapi asyncapi"
3939
summary: Your API Mocking Tool for Agile Development using Go and Javascript
4040
description: |
41-
**Mokapi** is an open-source tool that allows Agile, DevOps and Continuous Deployment teams
42-
to create and test API designs before actually building them.
41+
<p align="center">
42+
<a href="https://mokapi.io">
43+
<img src="https://raw.githubusercontent.com/marle3003/mokapi/refs/heads/main/logo.svg" alt="Mokapi" title="Mokapi" width="300" />
44+
</a>
45+
</p>
4346
44-
With Mokapi you can quickly and easily test various
45-
scenarios, such as delayed or failed responses without
46-
having to rely on a fully functional API.
47+
<h3 align="center">Your API Mocking Tool for Agile Development</h3>
4748
48-
Mokapi helps you improve the quality of APIs and
49-
reduces the risk of bugs or errors in production.
49+
# 🚀 Overview
5050
51-
Its core feature are:
51+
Mokapi is an open-source tool that helps Agile, DevOps, and Continuous
52+
Deployment teams design, test, and validate APIs before implementation.
53+
It enables rapid prototyping of scenarios—like delayed responses,
54+
failures, or edge cases—without needing a live backend. By simulating
55+
real-world conditions early, Mokapi improves API quality and reduces
56+
the risk of bugs in production.
57+
58+
# ✨ Features
5259
5360
- **Multiple Protocol support**: HTTP, HTTPS, Apache Kafka, SMTP, LDAP
5461
- **Everything as Code**: Reusing, version control, consistency and integrate mocks with your CI/CD.
@@ -57,10 +64,106 @@ chocolateys:
5764
- **Multiple Provider support**: File, HTTP, GIT, NPM to gather configurations and scripts.
5865
- **Dashboard** to see what's going on.
5966
60-
**Usage:***
67+
## 🔧 Spin Up Mokapi
68+
69+
Install and start Mokapi using one of the following methods.
70+
Replace the URL with your own OpenAPI or AsyncAPI specification.
71+
72+
Windows
73+
```shell
74+
choco install mokapi
75+
mokapi https://petstore31.swagger.io/api/v31/openapi.json
6176
```
77+
78+
MacOS
79+
```shell
80+
brew tap marle3003/tap
81+
brew install mokapi
6282
mokapi https://petstore31.swagger.io/api/v31/openapi.json
6383
```
84+
85+
Docker
86+
```shell
87+
docker run -p 80:80 -p 8080:8080 mokapi/mokapi:latest https://petstore31.swagger.io/api/v31/openapi.json
88+
```
89+
90+
# 🎯 Hit Your First Mock
91+
Once Mokapi is running, you can make requests to your mocked API like so:
92+
```shell
93+
curl http://localhost/api/v31/pet/2 -H 'Accept: application/json'
94+
```
95+
96+
# 🧩 Customize Your Mock with JavaScript
97+
98+
Mokapi makes it simple to control responses using embedded JavaScript.
99+
100+
For example, you can dynamically change the response based on query parameters:
101+
102+
```typescript
103+
import { on } from 'mokapi';
104+
105+
export default function() {
106+
on('http', (request, response): boolean => {
107+
switch (request.path.petId) {
108+
case 2:
109+
response.data.name = 'Betty';
110+
return true;
111+
case 9:
112+
response.statusCode = 404;
113+
}
114+
return false;
115+
});
116+
}
117+
```
118+
119+
# 🖥️ Dashboard
120+
121+
Mokapi’s dashboard lets you visualize your mock APIs. View requests and responses in real-time, generate and validate sample data for testing.
122+
123+
<img src="https://raw.githubusercontent.com/marle3003/mokapi/refs/heads/main/webui.png" alt="Mokapi Web UI" title="Mokapi Web UI" />
124+
125+
# 🧪 Learn by Example
126+
127+
Explore tutorials that walk you through mocking different protocols and scenarios:
128+
129+
- 🌍 [Get started with REST API](https://mokapi.io/docs/resources/tutorials/get-started-with-rest-api)\
130+
This tutorial will show you how to mock a REST API using an OpenAPI specification.
131+
132+
- ⚡ [Mocking Kafka with AsyncAPI](https://mokapi.io/docs/resources/tutorials/get-started-with-kafka)\
133+
Mocking a Kafka topic using Mokapi and verifying that a producer generates valid messages.
134+
135+
- 👨‍💻 [Mocking LDAP Authentication](https://mokapi.io/docs/resources/tutorials/mock-ldap-authentication-in-node)\
136+
Simulate LDAP-based login flows, including group-based permissions.
137+
138+
- 📧 [Mocking SMTP Mail Servers](https://mokapi.io/docs/resources/tutorials/mock-smtp-server-send-mail-using-node)\
139+
Use Mokapi to simulate sending and receiving emails in Node.js apps.
140+
141+
- 🖥️ [End-to-End Testing with Jest and GitHub Actions](https://mokapi.io/docs/resources/tutorials/running-mokapi-in-a-ci-cd-pipeline)\
142+
Integrate Mokapi into your CI pipeline for full-stack E2E testing.
143+
144+
> More examples are available on [mokapi.io/docs/resources](https://mokapi.io/docs/resources)
145+
146+
# 📚 Documentation
147+
148+
- [Get Started](https://mokapi.io/docs/guides/welcome)
149+
- [HTTP](https://mokapi.io/docs/guides/http)
150+
- [Kafka](https://mokapi.io/docs/guides/kafka/overview)
151+
- [LDAP](https://mokapi.io/docs/guides/ldap/overview)
152+
- [SMTP](https://mokapi.io/docs/guides/smtp/overview)
153+
- [Javascript API](https://mokapi.io/docs/javascript-api)
154+
- [Examples & Tutorials](https://mokapi.io/docs/resources)
155+
- [Blogs](https://mokapi.io/docs/blogs)
156+
157+
# ☕ Support
158+
159+
If you find Mokapi helpful, consider supporting the project:
160+
161+
<a href="https://www.buymeacoffee.com/mokapi" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
162+
163+
# 📄 License
164+
165+
This project is licensed under the MIT License. See the [LICENSE](https://github.com/marle3003/mokapi/blob/main/LICENSE) file for details.
166+
```
64167
release_notes: "https://github.com/marle3003/mokapi/releases/tag/v{{ .Version }}"
65168

66169
url_template: "https://github.com/marle3003/mokapi/releases/download/{{ .Tag }}/{{ .ArtifactName }}"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,20 @@ Mokapi’s dashboard lets you visualize your mock APIs. View requests and respon
9797

9898
Explore tutorials that walk you through mocking different protocols and scenarios:
9999

100-
- 🔐 [Mocking Authentication with OpenAPI](https://mokapi.io/docs/resources/tutorials/mock-openapi-authentication-api-key-&-bearer-token)\
101-
Use API key and Bearer token authentication in a mocked API.
100+
- 🌍 [Get started with REST API](https://mokapi.io/docs/resources/tutorials/get-started-with-rest-api)\
101+
This tutorial will show you how to mock a REST API using an OpenAPI specification.
102102

103103
-[Mocking Kafka with AsyncAPI](https://mokapi.io/docs/resources/tutorials/get-started-with-kafka)\
104-
mocking a Kafka topic using Mokapi and verifying that a producer generates valid messages.
104+
Mocking a Kafka topic using Mokapi and verifying that a producer generates valid messages.
105105

106106
- 👨‍💻 [Mocking LDAP Authentication](https://mokapi.io/docs/resources/tutorials/mock-ldap-authentication-in-node)\
107-
Simulate LDAP-based login flows, including group-based permissions.
107+
Simulate LDAP-based login flows, including group-based permissions.
108108

109109
- 📧 [Mocking SMTP Mail Servers](https://mokapi.io/docs/resources/tutorials/mock-smtp-server-send-mail-using-node)\
110-
Use Mokapi to simulate sending and receiving emails in Node.js apps.
110+
Use Mokapi to simulate sending and receiving emails in Node.js apps.
111111

112112
- 🖥️ [End-to-End Testing with Jest and GitHub Actions](https://mokapi.io/docs/resources/tutorials/running-mokapi-in-a-ci-cd-pipeline)\
113-
Integrate Mokapi into your CI pipeline for full-stack E2E testing.
113+
Integrate Mokapi into your CI pipeline for full-stack E2E testing.
114114

115115
> More examples are available on [mokapi.io/docs/resources](https://mokapi.io/docs/resources)
116116

npm/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<a href="https://mokapi.io">
3-
<img src="logo.svg" alt="Mokapi" title="Mokapi" width="300" />
3+
<img src="https://raw.githubusercontent.com/marle3003/mokapi/refs/heads/main/logo.svg" alt="Mokapi" title="Mokapi" width="300" />
44
</a>
55
</p>
66

@@ -80,14 +80,14 @@ export default function() {
8080

8181
Mokapi’s dashboard lets you visualize your mock APIs. View requests and responses in real-time, generate and validate sample data for testing.
8282

83-
<img src="webui.png" alt="Mokapi Web UI" title="Mokapi Web UI" />
83+
<img src="https://raw.githubusercontent.com/marle3003/mokapi/refs/heads/main/webui.png" alt="Mokapi Web UI" title="Mokapi Web UI" />
8484

8585
# 🧪 Learn by Example
8686

8787
Explore tutorials that walk you through mocking different protocols and scenarios:
8888

89-
- 🔐 [Mocking Authentication with OpenAPI](https://mokapi.io/docs/resources/tutorials/mock-openapi-authentication-api-key-&-bearer-token)\
90-
Use API key and Bearer token authentication in a mocked API.
89+
- 🌍 [Get started with REST API](https://mokapi.io/docs/resources/tutorials/get-started-with-rest-api)\
90+
This tutorial will show you how to mock a REST API using an OpenAPI specification.
9191

9292
-[Mocking Kafka with AsyncAPI](https://mokapi.io/docs/resources/tutorials/get-started-with-kafka)\
9393
mocking a Kafka topic using Mokapi and verifying that a producer generates valid messages.

0 commit comments

Comments
 (0)