Skip to content

feat: add React 19 support to swagger-ui-react #10542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felix-ebert
Copy link

Description

This PR updates the peer dependency constraints for React and React-DOM to support React 19.x versions. The changes modify both the main package.json and the React flavor template to expand the accepted React version range from >=16.8.0 <19 to >=16.8.0 <20, enabling compatibility with React 19 while maintaining backward compatibility with all previously supported React versions.

Motivation and Context

Fixes #10243

How Has This Been Tested?

  • Ran the full unit test suite (npm run test:unit)
  • All 795 tests passed, 12 skipped (no failures)

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

- Updated peer dependencies to support React 19.x
- Changed React constraint from '>=16.8.0 <19' to '>=16.8.0 <20'
- Updated both main package.json and React flavor template
- All existing tests pass with React 19 support

Fixes swagger-api#10243
@felix-ebert felix-ebert marked this pull request as ready for review August 5, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React 19 Compatibility with swagger-ui-react
2 participants