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
- Host: GitHub
- URL: https://github.com/guardrail-dev/guardrail-sample-sbt-http4s
- Owner: guardrail-dev
- License: mit
- Created: 2021-03-17T01:02:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-04T16:22:24.000Z (almost 2 years ago)
- Last Synced: 2025-05-01T17:32:09.664Z (about 1 year ago)
- Topics: guardrail-sample
- Language: Scala
- Homepage:
- Size: 61.5 KB
- Stars: 4
- Watchers: 2
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
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 .
```