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
+40-23Lines changed: 40 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Okapi
2
2
3
-
A modern, minimalist HTTP web framework for Go inspired by FastAPI's elegant design philosophy.
3
+
A **modern, minimalist HTTP web framework for Go** inspired by the elegant developer experience of FastAPI.
4
+
5
+
Okapi focuses on **clarity, strong typing, automatic validation, and built-in OpenAPI documentation**, making it easy to build production-ready APIs without boilerplate.
Named after the okapi, a rare and graceful mammal native to the rainforests of northeastern Democratic Republic of the Congo—Okapi blends simplicity and strength in a unique, powerful package.
17
+
Named after the **okapi**, a rare and graceful mammal native to the rainforests of northeastern Democratic Republic of the Congo — Okapi blends **simplicity, elegance, and strength** into a powerful framework for building Go web services.
18
+
19
+
---
20
+
21
+
# Why Okapi?
22
+
23
+
Go developers often combine multiple libraries for routing, validation, documentation, authentication, and testing.
24
+
25
+
**Okapi brings all these capabilities together in one cohesive framework** while remaining fully compatible with Go’s standard `net/http`.
26
+
27
+
Key goals:
28
+
29
+
***Developer experience similar to FastAPI**
30
+
***Minimal boilerplate**
31
+
***Strong typing**
32
+
***Built-in OpenAPI documentation**
33
+
***Production-ready features out of the box**
16
34
17
35
## Features
18
36
19
-
-**Intuitive API Design** – Clean, declarative syntax for routes and middleware
37
+
-**Intuitive API Design** – Clean, declarative syntax for routes and middleware.
20
38
-**Automatic Request Binding** – Parse JSON, XML, forms, query params, headers, and path variables into structs
21
-
-**Built-in Validation** – Struct tag-based validation with comprehensive error messages
22
-
-**Auto-Generated OpenAPI Docs** – Swagger UI and ReDoc automatically synced with your code
39
+
-**Built-in Validation** – Struct tag-based validation with comprehensive error messages.
40
+
-**Auto-Generated OpenAPI Docs** – Swagger UI and ReDoc automatically synced with your code.
23
41
-**Runtime Documentation Control** – Enable/disable OpenAPI docs at runtime without redeployment
24
-
-**Authentication Ready** – Native JWT, Basic Auth, and extensible middleware support
25
-
-**Standard Library Compatible** – Works seamlessly with Go's `net/http`
Okapi provides multiple approaches to bind and validate incoming requests, from simple binding to fully typed handler signatures.
95
+
Okapi supports **multiple binding styles**, from simple handlers to fully typed input/output patterns.
96
+
69
97
70
98
### Validation Tags
71
99
@@ -560,17 +588,6 @@ Both approaches generate OpenAPI documentation automatically.
560
588
-**Strict typed request/response contracts** as your primary design model
561
589
- A **minimal, API-only stack** without broader web framework concerns
562
590
563
-
---
564
-
565
-
### Community & Maturity
566
-
567
-
-**Huma**: More established with a larger community and extensive production usage
568
-
-**Okapi**: Newer and rapidly evolving, with a smaller but growing community
569
-
570
-
Both are actively maintained. Choose based on your architectural preferences and project needs rather than stability concerns alone.
571
-
572
-
> **Note**: If you're already using Huma with Chi or another router and it's working well for you, there's no urgent reason to switch. Okapi is ideal for new projects or when you want a more integrated, batteries-included framework experience.
0 commit comments