Skip to main content

spec v0.4.0 — Fiber v3, Echo v5, and Cleaner Response Specs

· 2 min read
Oaswrap Maintainer

Today we're shipping spec v0.4.0. This release focuses on expanding framework support with two new adapters, tightening up the generated spec output, and picking up the spec-ui v0.2.0 upgrade.

Two new framework adapters

The adapter roster keeps growing. v0.4.0 adds support for two major framework versions that have been frequently requested.

Fiber v3 gets its own dedicated adapter (fiberv3openapi), separate from the existing Fiber v2 adapter. If you're already on the v3 migration path, you can now generate your OpenAPI spec without any workarounds.

Echo v5 follows the same pattern — a new echov5openapi adapter alongside the existing v4 one. A big thank you to @oscarbc96 for contributing this as their first PR to the project!

Smarter response handling

Previously, if you registered the same status code twice on a route — intentionally or not — both ended up in the spec as separate entries. That's technically invalid OpenAPI. Starting in v0.4.0, duplicate status-code responses are automatically merged into a single oneOf entry, so the generated spec stays clean and valid without you needing to think about it.

spec-ui upgraded to v0.2.0

This release also bumps the bundled spec-ui dependency to v0.2.0, which redesigns how UI providers are selected and adds embedded asset support for offline deployments. If you use spec-ui alongside spec, that upgrade comes with a few breaking changes worth reviewing — head over to the spec-ui v0.2.0 post for the full migration guide.

Bug fixes

A bug in the embedded UI asset-handler registration has been resolved. Embedded mode users who ran into handler setup issues should find things working correctly after upgrading.

Upgrade

go get github.com/oaswrap/spec@v0.4.0

Thanks again to @oscarbc96 for the Echo v5 adapter contribution. As always, feedback and issues are welcome on GitHub.