Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
13380b1
Update middleware/openapi/openapi_test.go
gaby Apr 24, 2026
527701d
Update docs/whats_new.md
gaby Apr 24, 2026
f78bbc2
Update docs/middleware/openapi.md
gaby Apr 24, 2026
b354357
fix(openapi): only serve spec on get and head
Copilot Apr 24, 2026
88b88c0
refactor(openapi): simplify method guard
Copilot Apr 24, 2026
b8daedd
feat: add OpenAPI 3.1.0 support
Claude May 2, 2026
c225d3e
Potential fix for pull request finding
gaby May 16, 2026
6064772
Potential fix for pull request finding
gaby May 16, 2026
afa8a6d
fix: address openapi review feedback for route metadata and path gene…
Copilot May 16, 2026
a67ca3f
fix: address remaining openapi review comments on config docs and dee…
Copilot May 17, 2026
e74fe77
feat: add swagger ui page to openapi middleware
Copilot May 18, 2026
d126a02
fix: harden swagger ui template rendering
Copilot May 18, 2026
4744386
fix: update swagger default path and modernize version
Copilot May 18, 2026
302c61f
feat(openapi): add Components support, fix example/examples mutual ex…
Copilot May 22, 2026
25fcd89
feat(openapi): add SchemaOf for automatic Go struct to OpenAPI schema…
Copilot May 22, 2026
d3ea13e
feat(openapi): security schemes, richer spec metadata, robust UI and …
claude Jun 18, 2026
fe26c9b
style(openapi): satisfy golangci-lint (goconst, fieldalignment, unparam)
claude Jun 18, 2026
b99e502
refactor(openapi): use fiber utils for numeric parsing in schema.go
claude Jun 18, 2026
0a6b4c8
refactor(openapi): use fiber utils for TrimSpace and EqualFold
claude Jun 18, 2026
4bcc851
fix(openapi): correctness fixes from review (schema + spec generation)
claude Jun 19, 2026
c5d1cf5
feat(openapi): per-route Hidden + ResponseHeader; request-body/cache …
claude Jun 19, 2026
8982a3a
test(openapi): validate generated spec against OpenAPI structure
claude Jun 20, 2026
fb26f03
docs(openapi): split the examples into focused, titled sections
claude Jun 20, 2026
ab9bce2
feat(openapi): broaden OpenAPI object-model coverage
claude Jun 20, 2026
684d0cf
feat(openapi): OpenAPI 3.2.0 support and QUERY method
claude Jun 26, 2026
4f5dffe
test(openapi): raise coverage to ~99% with white-box helper tests
claude Jun 26, 2026
079c5f9
fix(openapi): address review findings in middleware and route metadat…
claude Jul 1, 2026
d8e886e
fix(openapi): address second-round review findings
claude Jul 2, 2026
aa2ef12
fix(openapi): address third-round review findings
claude Jul 2, 2026
f4120c0
fix(openapi): handle custom marshalers in SchemaOf and drop dead fall…
claude Jul 2, 2026
471a6e5
fix(openapi): refine SchemaOf marshaler mapping for json.Number and p…
claude Jul 2, 2026
574da74
fix(openapi): unique path parameter names and doc comment corrections
claude Jul 2, 2026
4444d3c
fix(router): route-metadata correctness and safety from code review
claude Jul 8, 2026
459004e
fix(openapi): race-free spec cache, honest defaults, and review cleanups
claude Jul 8, 2026
f107651
fix(core): route-lock deadlocks, scoped doc helpers, and clone fidelity
claude Jul 9, 2026
cfe3fd7
fix(openapi): per-app caches, mount-prefix token parsing, and unique …
claude Jul 9, 2026
28cff1d
docs: document scoped doc helpers, merge/domain semantics, and Name/H…
claude Jul 9, 2026
a75ddff
rebase: restore content clobbered by conflict resolution during replay
claude Jul 18, 2026
be34c4a
test: cover scoped OpenAPI documentation helpers on domain/group/rout…
claude Jul 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
698 changes: 670 additions & 28 deletions app.go

Large diffs are not rendered by default.

496 changes: 496 additions & 0 deletions docs/middleware/openapi.md

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion docs/whats_new.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Here's a quick overview of the changes in Fiber `v3`:
- [KeyAuth](#keyauth)
- [Logger](#logger)
- [Monitor](#monitor)
- [OpenAPI](#openapi)
- [Proxy](#proxy)
- [Recover](#recover)
- [Session](#session)
Expand Down Expand Up @@ -511,7 +512,11 @@ app := fiber.New(fiber.Config{DisableHeadAutoRegister: true})
app.Get("/health", handler) // HEAD /health now returns 405 unless you add it manually.
```

Auto-generated `HEAD` routes appear in tooling such as `app.Stack()` and cover the same routing scenarios as their `GET` counterparts, including groups, mounted apps, dynamic parameters, and static file handlers.
Auto-generated `HEAD` routes appear in tooling such as `app.Stack()` and cover the same routing scenarios as their `GET` counterparts, including groups, mounted apps, dynamic parameters, and static file handlers. They deliberately carry no name or documentation metadata of their own (filter them via `Route.IsAutoHead()`).

:::caution
`Name()` (and the documentation helpers) now target only the routes created by the most recent registration. Naming a `GET` route no longer also names an **explicitly registered** `HEAD` route on the same path — name that route in its own registration chain instead.
:::

### QUERY method (RFC 10008)

Expand Down Expand Up @@ -1728,6 +1733,10 @@ Deprecated fields `Duration`, `Store`, and `Key` have been removed in v3. Use `E

Monitor middleware is migrated to the [Contrib package](https://github.com/gofiber/contrib/tree/main/monitor) with [PR #1172](https://github.com/gofiber/contrib/pull/1172).

### OpenAPI

Introduces an `openapi` middleware that inspects registered routes and serves a generated OpenAPI specification plus a Swagger UI page backed by that spec. The middleware supports both **OpenAPI 3.0.0 and 3.1.0** (default). Each operation includes a summary and a default response (typically `200`, or `204 No Content` for `DELETE` and `HEAD` operations, matching the middleware's behavior). Routes may attach descriptions, parameters, request bodies, and custom responses—alongside request/response media types—directly to route definitions. New helpers allow parameters, request bodies, and responses to include schema references and examples (including `$ref` targets under `components/schemas`), enabling richer generated documentation.

### Proxy

The proxy middleware has been updated to improve consistency with Go naming conventions. The `TlsConfig` field in the configuration struct has been renamed to `TLSConfig`. Additionally, the `WithTlsConfig` method has been removed; you should now configure TLS directly via the `TLSConfig` property within the `Config` struct.
Expand Down
320 changes: 314 additions & 6 deletions domain.go

Large diffs are not rendered by default.

Loading