https://github.com/ahmed-ibrahim-30/go-openapi-user-crud
A Go REST API built with OpenAPI (oapi-codegen) and Chi, demonstrating full CRUD operations on users. Includes OpenAPI specification (.yaml) for documentation and testing with Swagger.
https://github.com/ahmed-ibrahim-30/go-openapi-user-crud
go golang openai swagger
Last synced: about 1 month ago
JSON representation
A Go REST API built with OpenAPI (oapi-codegen) and Chi, demonstrating full CRUD operations on users. Includes OpenAPI specification (.yaml) for documentation and testing with Swagger.
- Host: GitHub
- URL: https://github.com/ahmed-ibrahim-30/go-openapi-user-crud
- Owner: Ahmed-Ibrahim-30
- Created: 2025-08-29T22:26:17.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-08-29T22:38:56.000Z (about 2 months ago)
- Last Synced: 2025-08-30T00:25:22.659Z (about 2 months ago)
- Topics: go, golang, openai, swagger
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
This project is a Go REST API example that uses OpenAPI (Swagger) to define endpoints and oapi-codegen to generate type-safe server code.
It demonstrates complete CRUD operations (Create, Read, Update, Delete) for managing users, with automatic validation and documentation support.Key features:
✅ API contract-first design using OpenAPI spec (openapi.yaml).
✅ Generated Go types and handlers with oapi-codegen.
✅ RESTful endpoints (GET, POST, PUT, DELETE).
✅ CORS enabled for Swagger Editor / UI testing.
✅ Uses Chi router for routing.
✅ Easy integration with Swagger UI.