You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,29 @@
1
1
# Membrane Mock Server
2
2
3
-
## Prerequisites
3
+
A configurable mock server for your [OpenAPI Specification](https://spec.openapis.org/oas/v3.1.0.html),
4
4
5
-
@TODO can I turn this into a yellow warning?
5
+
> [!IMPORTANT]
6
+
> Every [operation](https://spec.openapis.org/oas/v3.1.0.html#operation-object) requires an [operationId](https://spec.openapis.org/oas/v3.1.0.html#fixed-fields-7),
7
+
> The mock server uses them to identify your endpoints.
6
8
7
-
### OperationIds Are Required
9
+
##Quickstart
8
10
9
-
The MockServer identifies your OpenAPI's endpoints by their [operationId](https://spec.openapis.org/oas/v3.1.0.html#fixed-fields-7).
11
+
To demonstrate we're going to use the classic: [petstore.yml](https://learn.openapis.org/examples/v3.0/petstore.html#yaml).
12
+
13
+
### Run the Mock Server
14
+
```sh
15
+
docker run ghcr.io/membrane-php/mock-server:base-182-gff6566 \
16
+
-v ~/myapp/api/petstore.yml:/api/api.yml \
17
+
-p 8081:8081 \
18
+
-p 8080:8080
19
+
```
20
+
21
+
Your API's mock server is exposed on port `8081`.
22
+
23
+
Membrane Mock Server's [API](docs/api.md) is exposed on port `8080`.
10
24
11
-
Ensure your OpenAPI spec defines operationIds for all operations, or the mock server will fail immediately.
0 commit comments