📝 docs: comprehensive Swagger documentation skill with hierarchical tagging

This commit is contained in:
2026-04-05 10:37:48 +02:00
parent 737e95f65f
commit 3e8c50d80a
8 changed files with 553 additions and 16 deletions

View File

@@ -351,16 +351,31 @@ http://localhost:8080
**Swagger UI:** `http://localhost:8080/swagger/`
**OpenAPI Spec:** `http://localhost:8080/swagger/doc.json`
The API provides interactive documentation using Swagger UI with complete OpenAPI 2.0 specification. All endpoints, request/response models, and validation rules are documented.
The API provides interactive documentation using Swagger UI with complete OpenAPI 2.0 specification. All endpoints, request/response models, and validation rules are documented using a **hierarchical tagging system**.
**Features:**
- Interactive API exploration
- Try-it-out functionality
- Interactive API exploration with hierarchical organization
- Try-it-out functionality for all endpoints
- Model schemas with examples
- Response examples
- Validation rules documentation
- Response examples with validation rules
- **Hierarchical tag structure** for better navigation
**Generation:** Documentation is auto-generated from code annotations using [swaggo/swag](https://github.com/swaggo/swag).
**Generation:** Documentation is auto-generated from code annotations using [swaggo/swag](https://github.com/swaggo/swag) with the command:
```bash
go generate ./pkg/server/
```
**Tag Organization:**
- `API/v1/Greeting` - Version 1 greeting endpoints
- `API/v2/Greeting` - Version 2 greeting endpoints
- `System/Health` - Health and readiness endpoints
**Hierarchical Benefits:**
- Clear separation between API domains (API vs System)
- Version organization within each domain
- Natural hierarchy in Swagger UI
- Scalable for future API growth
```bash
# Generate documentation