Skip to content

Commit 89feb0a

Browse files
committed
Highlight prerequisites in README
1 parent 5ff6556 commit 89feb0a

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
# Membrane Mock Server
22

3-
## Prerequisites
3+
A configurable mock server for your [OpenAPI Specification](https://spec.openapis.org/oas/v3.1.0.html),
44

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.
68
7-
### OperationIds Are Required
9+
## Quickstart
810

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`.
1024

11-
Ensure your OpenAPI spec defines operationIds for all operations, or the mock server will fail immediately.
1225

13-
## Quickstart
1426

15-
```php
16-
docker run ghcr.io/blabla \
17-
-v /path/to/your/api:/api/api.yml \
18-
-p 8080:8080 \
19-
-p 8081:8081
20-
```
2127

2228
### Configure through API
2329

0 commit comments

Comments
 (0)