We wanted to share a quick update on what the Swagger OSS team has been working, including the latest enhancements we’re excited about:
- We’ve started work on v4 release branches of SwaggerUI and SwaggerEditor
- Beta versions of SwaggerUI@v4 has already been released and SwaggerEditor@v4 will be released very soon
What’s new in SwaggerUI v4 and SwaggerEditor v4
Moving to v4 will allow us to further evolve SwaggerUI/SwaggerEditor in order to use the latest features from React (Hooks, Contexts, etc...) and prepare for OpenApi 3.1 adoption.
Both SwaggerUI v3 and SwaggerEditor v3 are currently running on an older branch of React@15, which was last updated 9 months ago. The same situation applies to Redux, where we are tied to an older version. With the v4 release, we can bring these libraries to the newest possible versions:
- react 15.7.0 -> 17.0.2
- react-dom 15.7.0 -> 17.0.2
- redux 3.7.2 -> 4.1.0
- react-redux 4.4.10 -> 7.2.4
We see this release as a breaking change, given that we’ll drop support for any older versions of React and Redux. The impact of this change will be most felt by organizations using SwaggerUI/SwaggerEditor as a library, using it to render their existing code. In some cases, you might have other libraries that also integrate with SwaggerUI/SwaggerEditor in this manner.
In both instances, the existing code must run on the same version of React as SwaggerUI/SwaggerEditor. Using v4 would either mean updating all React code used with existing code (in order to make it run in React@17), or run v4 using a different version of React. This is called a gradual upgrade and is documented here.
How You Can Explore Swagger v4 today
We will maintain v4 release branches where you can check out and build your own artifacts for testing purposes locally:
The NPM package for SwaggerUI@v4 is already available, SwaggerEditor@v4 NPM package will be available week of July 26, 2021.
Estimated release timeline
We expect the v4 beta will be available by July 7, 2021. It may take several more weeks until we have the first v4 RC (Release Candidate). During the time between the first v4 beta and the first RC, we will not be merging any PRs with new features implemented. We would like to keep merged PRs limited to bug fixes, and these bug fixes will be back-ported to v4 release branches.
You can find more information about v4 work, library updates, and anomalies we’ve detected in the following issues:
Lifespan of 3.x branches
We will continue to support the 3.x branches for a minimum maintenance period of 4-6 weeks after the stable v4.0.0 releases. During the 3.x maintenance period, we’ll automatically backport security and/or bug fixes to 3.x branches, and issuing v3 patch releases.