https://github.com/jkaninda/okapi-example
A simple example demonstrating Okapi API
https://github.com/jkaninda/okapi-example
go go-api-servers go-openapi go-server go-swagger go-web-framework golang rest-api
Last synced: 3 months ago
JSON representation
A simple example demonstrating Okapi API
- Host: GitHub
- URL: https://github.com/jkaninda/okapi-example
- Owner: jkaninda
- License: mit
- Created: 2025-05-30T04:21:11.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-07-13T12:25:12.000Z (3 months ago)
- Last Synced: 2025-07-13T13:18:56.623Z (3 months ago)
- Topics: go, go-api-servers, go-openapi, go-server, go-swagger, go-web-framework, golang, rest-api
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Okapi Example
A simple example demonstrating the Okapi API Framework
Okapi is a modern, minimalist HTTP web framework for Go, inspired by FastAPI's elegance. Designed for simplicity, performance, and developer happiness, it helps you build fast, scalable, and well-documented APIs with minimal boilerplate.
[Github: https://github.com/jkaninda/okapi](https://github.com/jkaninda/okapi)
## Prerequisites
- Go installed
- Git installed## Features
- Basic Okapi implementation example
- Okapi middlewares
- Okapi Route Definition
- Ready-to-run code structure## Getting Started
### Clone the Repository
```shell
git clone https://github.com/jkaninda/okapi-example
cd okapi-example
```### Install Dependencies
```shell
go mod tidy
```### Run the Application
```shell
go run .
```### Using Docker
```shell
docker run --rm --name okapi-example -p 8080:8080 jkaninda/okapi-example
```Visit [`http://localhost:8080`](http://localhost:8080) to see the response:
```json
{"message": "Welcome to the Okapi Web Framework!"}
```Visit [`http://localhost:8080/docs/`](http://localhost:8080/docs/) to see the documentation
## Project Structure
```
.
├── main.go # Main application file
├── middlewares # Middlewares package
├── controllers # Controllers package
├── routes # Routes package
├── models # Models package
└── README.md # Project documentation
```### Swagger UI Preview
Okapi automatically generates Swagger UI for all routes:

---
## License[MIT](LICENSE) - Feel free to use and modify this example.