|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +## [0.1.2] - 2024-12-31 |
| 11 | + |
| 12 | +### Added |
| 13 | +- `skip_paths` method for JwtLayer to exclude paths from JWT validation |
| 14 | +- `docs_with_auth` method for Basic Auth protected Swagger UI |
| 15 | +- `docs_with_auth_and_info` method for customized protected docs |
| 16 | + |
| 17 | +### Changed |
| 18 | +- auth-api example now demonstrates protected docs with Basic Auth |
| 19 | +- JWT middleware can now skip validation for public endpoints |
| 20 | + |
| 21 | +## [0.1.1] - 2024-12-31 |
| 22 | + |
| 23 | +### Added |
| 24 | + |
| 25 | +#### Phase 4: Ergonomics & v1.0 Preparation |
| 26 | +- Body size limit middleware with configurable limits |
| 27 | +- `.body_limit(size)` builder method on RustApi (default: 1MB) |
| 28 | +- 413 Payload Too Large response for oversized requests |
| 29 | +- Production error masking (`RUSTAPI_ENV=production`) |
| 30 | +- Development error details (`RUSTAPI_ENV=development`) |
| 31 | +- Unique error IDs (`err_{uuid}`) for log correlation |
| 32 | +- Enhanced tracing layer with request_id, status, and duration |
| 33 | +- Custom span field support via `.with_field(key, value)` |
| 34 | +- Prometheus metrics middleware (feature-gated) |
| 35 | +- `http_requests_total` counter with method, path, status labels |
| 36 | +- `http_request_duration_seconds` histogram |
| 37 | +- `rustapi_info` gauge with version information |
| 38 | +- `/metrics` endpoint handler |
| 39 | +- TestClient for integration testing without network binding |
| 40 | +- TestRequest builder with method, header, and body support |
| 41 | +- TestResponse with assertion helpers |
| 42 | +- `RUSTAPI_DEBUG=1` macro expansion output support |
| 43 | +- Improved route path validation at compile time |
| 44 | +- Enhanced route conflict detection messages |
| 45 | + |
| 46 | +### Changed |
| 47 | +- Error responses now include `error_id` field |
| 48 | +- TracingLayer enhanced with additional span fields |
| 49 | + |
| 50 | +## [0.1.0] - 2024-12-01 |
| 51 | + |
| 52 | +### Added |
| 53 | + |
| 54 | +#### Phase 1: MVP Core |
| 55 | +- Core HTTP server built on tokio and hyper 1.0 |
| 56 | +- Radix-tree based routing with matchit |
| 57 | +- Request extractors: `Json<T>`, `Query<T>`, `Path<T>` |
| 58 | +- Response types with automatic serialization |
| 59 | +- Async handler support |
| 60 | +- Basic error handling with `ApiError` |
| 61 | +- `#[rustapi::get]`, `#[rustapi::post]` route macros |
| 62 | +- `#[rustapi::main]` async main macro |
| 63 | + |
| 64 | +#### Phase 2: Validation & OpenAPI |
| 65 | +- Automatic OpenAPI spec generation |
| 66 | +- Swagger UI at `/docs` endpoint |
| 67 | +- Request validation with validator crate |
| 68 | +- `#[validate]` attribute support |
| 69 | +- 422 Unprocessable Entity for validation errors |
| 70 | +- `#[rustapi::tag]` and `#[rustapi::summary]` macros |
| 71 | +- Schema derivation for request/response types |
| 72 | + |
| 73 | +#### Phase 3: Batteries Included |
| 74 | +- JWT authentication middleware (`jwt` feature) |
| 75 | +- `AuthUser<T>` extractor for authenticated routes |
| 76 | +- CORS middleware with builder pattern (`cors` feature) |
| 77 | +- IP-based rate limiting (`rate-limit` feature) |
| 78 | +- Configuration management with `.env` support (`config` feature) |
| 79 | +- Cookie parsing extractor (`cookies` feature) |
| 80 | +- SQLx error conversion (`sqlx` feature) |
| 81 | +- Request ID middleware |
| 82 | +- Middleware layer trait for custom middleware |
| 83 | +- `extras` meta-feature for common optional features |
| 84 | +- `full` feature for all optional features |
| 85 | + |
| 86 | +[Unreleased]: https://github.com/Tuntii/RustAPI/compare/v0.1.2...HEAD |
| 87 | +[0.1.2]: https://github.com/Tuntii/RustAPI/compare/v0.1.1...v0.1.2 |
| 88 | +[0.1.1]: https://github.com/Tuntii/RustAPI/compare/v0.1.0...v0.1.1 |
| 89 | +[0.1.0]: https://github.com/Tuntii/RustAPI/releases/tag/v0.1.0 |
0 commit comments