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
- Add OpenAPIVersion config field (default: "3.1.0", supports "3.0.0")
- Update all tests to use 3.1.0 by default
- Add 4 new tests for version selection and validation
- Update documentation to reflect 3.1.0 support
- Maintain backward compatibility with 3.0.0 specification
- Test coverage maintained at 92.3%
Agent-Logs-Url: https://github.com/gofiber/fiber/sessions/3a6cd1cb-b7f6-4d50-9508-f6a456ffe195
Co-authored-by: gaby <835733+gaby@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/middleware/openapi.md
+19-14Lines changed: 19 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ id: openapi
6
6
7
7
OpenAPI middleware for [Fiber](https://github.com/gofiber/fiber) that generates an OpenAPI specification based on the routes registered in your application.
8
8
9
+
This middleware supports both OpenAPI 3.0.0 and 3.1.0 specifications.
Copy file name to clipboardExpand all lines: docs/whats_new.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1647,7 +1647,7 @@ Monitor middleware is migrated to the [Contrib package](https://github.com/gofib
1647
1647
1648
1648
### OpenAPI
1649
1649
1650
-
Introduces an `openapi` middleware that inspects registered routes and serves a generated OpenAPI 3.0 specification. 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.
1650
+
Introduces an `openapi` middleware that inspects registered routes and serves a generated OpenAPI specification. 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.
0 commit comments