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
docs: golden path as canonical start (handler → OpenAPI → probes)
Wire README, docs hub, cookbook, and examples around docs/GOLDEN_PATH.md.
golden_path example uses route macros so /docs/openapi.json lists /api/v1/ping.
clippy: multipart parse_multipart_part use ? for optional header boundary.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Added
11
11
12
-
-**`golden_path` example** (`crates/rustapi-rs/examples/golden_path.rs`) — minimal production-shaped service with `production_defaults`, health probes, and graceful shutdown.
-**`golden_path` example** uses route macros + tags so `/docs/openapi.json` includes `/api/v1/ping` (not only `.route()` wiring).
13
14
14
15
### Changed
15
16
16
17
-**Production Readiness v0.2** ([#200](https://github.com/Tuntii/RustAPI/issues/200)): coverage CI publishes HTML + Cobertura artifacts with job summary; release-drafter publishes drafts on `v*` tags; README links [Production Checklist](docs/PRODUCTION_CHECKLIST.md) in the header.
18
+
- README Quick Start: golden path first; document OpenAPI at `/docs/openapi.json`; prefer macros for OpenAPI registration; `tracing-subscriber` + `production_defaults` in the hello snippet.
- Default `rustapi-rs` dependency tree slimmed from ~259 to ~158 transitive crates by removing always-on `tracing-subscriber` and gating `rust-i18n` behind the `i18n` feature (English fallbacks by default).
19
21
-`RustApi::new()` no longer auto-initializes `tracing-subscriber`; initialize tracing in `main` (CLI templates already do).
Full walkthrough: **[docs/GOLDEN_PATH.md](docs/GOLDEN_PATH.md)** · example: [`golden_path.rs`](crates/rustapi-rs/examples/golden_path.rs)
53
+
54
+
Everything else (JWT, jobs, WS, full extras) branches off this path.
55
+
56
+
---
57
+
41
58
## Overview
42
59
43
60
RustAPI is a Rust web framework built on **hyper 1.x** and **tokio**, designed for minimal boilerplate while retaining full control over performance. It uses a **facade architecture** (`rustapi-rs`) that shields user code from internal crate changes, keeping the public API stable as internals evolve.
@@ -190,11 +207,15 @@ Current benchmark methodology and canonical published performance claims live in
190
207
191
208
## Quick Start
192
209
193
-
**Recommended usage** (short and clean macro paths):
210
+
Prefer the **[Golden Path](docs/GOLDEN_PATH.md)** for the recommended service shape (`production_defaults` + probes + OpenAPI). Minimal hello:
211
+
212
+
**Recommended usage** (short macro paths via crate alias):
194
213
195
214
```toml
196
215
[dependencies]
197
216
api = { package = "rustapi-rs", version = "0.1.551" }
217
+
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
218
+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
`RustApi::auto()` collects all macro-annotated handlers, generates OpenAPI documentation (served at `/docs`), and starts a multi-threaded tokio runtime.
242
+
`RustApi::auto()` collects macro-annotated handlers, serves Swagger UI at `/docs`, OpenAPI at `/docs/openapi.json`, and starts a multi-threaded tokio runtime. Spec path is **`/docs/openapi.json`** (not `/openapi.json`).
243
+
244
+
Use **route macros** (`#[api::get]`) so OpenAPI includes your paths. Plain `.route(...)` alone does not register operations in the spec.
218
245
219
246
### MCP in 3 lines
220
247
@@ -223,48 +250,11 @@ let mcp = McpServer::from_rustapi(&app, McpConfig::new().allowed_tags(["public"]
> **Tip:** Alias the crate as `api` for clean `#[api::get]` macros.
266
256
267
-
`production_defaults()` enables request IDs, tracing spans, and standard probe endpoints in one call.
257
+
`production_defaults(name)` enables request IDs, tracing spans, and `/live``/ready``/health` in one call. Details: [Production Baseline](docs/PRODUCTION_BASELINE.md).
268
258
269
259
## Feature Flags
270
260
@@ -307,6 +297,7 @@ See [CHANGELOG.md](CHANGELOG.md) for full history. Highlights in **v0.1.551**:
| Getting started |[docs/GETTING_STARTED.md](docs/GETTING_STARTED.md)|
@@ -316,7 +307,7 @@ See [CHANGELOG.md](CHANGELOG.md) for full history. Highlights in **v0.1.551**:
316
307
| Community & contributing |[docs/COMMUNITY.md](docs/COMMUNITY.md)|
317
308
| API reference |[docs.rs/rustapi-rs](https://docs.rs/rustapi-rs)|
318
309
319
-
**Examples:**start with [`golden_path`](crates/rustapi-rs/examples/golden_path.rs)(`cargo run -p rustapi-rs --example golden_path`), then browse[`crates/rustapi-rs/examples/`](crates/rustapi-rs/examples/) and **[rustapi-rs-examples](https://github.com/Tuntii/rustapi-rs-examples)**.
310
+
**Examples:**[`golden_path`](crates/rustapi-rs/examples/golden_path.rs)first, then [`crates/rustapi-rs/examples/`](crates/rustapi-rs/examples/) and **[rustapi-rs-examples](https://github.com/Tuntii/rustapi-rs-examples)**.
0 commit comments