An open API service indexing awesome lists of open source software.

https://github.com/guardrail-dev/guardrail-sample-sbt-http4s


https://github.com/guardrail-dev/guardrail-sample-sbt-http4s

guardrail-sample

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# guardrail-sample-http4s - guardrail with Http4s

**Alumnus of the Davenverse**

A simple project to show what a guardrail+http4s service could look like.

Some sample curls:

#### getInventory
```bash
curl localhost:8080/api/v3/store/inventory | jq .
```

#### getOrderById
```bash
curl localhost:8080/api/v3/store/order/123 | jq .
curl localhost:8080/api/v3/store/order/124 # 404
```

#### placeOrder
```bash
curl localhost:8080/api/v3/store/order \
-H 'Content-Type: application/json' \
--data '{"id": 124, "petId": 44, "quantity": 10}' \
| jq .
```