Skip to content

Conversation

@simonbs
Copy link
Contributor

@simonbs simonbs commented Apr 29, 2025

Requires #587 to be merged, as swagger-ui-react is not compatible with React 19.

@simonbs simonbs marked this pull request as ready for review June 3, 2025 05:08
Copilot AI review requested due to automatic review settings June 3, 2025 05:08
@simonbs simonbs requested a review from ulrikandersen as a code owner June 3, 2025 05:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the Swagger integration to React 19 by removing the swagger-ui-react dependency and dynamically loading the Swagger UI bundle from unpkg.

  • Replaces swagger-ui-react with a custom implementation using dynamic script and stylesheet injection.
  • Removes unused dependencies from package.json.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/features/docs/view/Swagger.tsx Implements dynamic loading of Swagger UI and removes deprecated imports.
package.json Removes swagger-ui-react and its corresponding type definitions.
Comments suppressed due to low confidence (1)

src/features/docs/view/Swagger.tsx:32

  • Verify that window.SwaggerUIBundle is defined before invoking it to prevent runtime errors if the script fails to load.
const SwaggerUI = window.SwaggerUIBundle

ulrikandersen
ulrikandersen previously approved these changes Jun 3, 2025
@simonbs
Copy link
Contributor Author

simonbs commented Jun 3, 2025

@ulrikandersen Thanks! Just fixed the merge conflict.

@simonbs simonbs marked this pull request as draft June 3, 2025 13:31
auto-merge was automatically disabled June 3, 2025 13:31

Pull request was converted to draft

@simonbs
Copy link
Contributor Author

simonbs commented Jun 3, 2025

@ulrikandersen I messed up the merge. Have addressed it in 4f9ae49.

@simonbs simonbs marked this pull request as ready for review June 3, 2025 13:35
@simonbs simonbs requested a review from ulrikandersen June 3, 2025 13:35
@simonbs simonbs enabled auto-merge June 3, 2025 13:36
@simonbs simonbs merged commit 1f1f118 into develop Jun 3, 2025
8 checks passed
@simonbs simonbs deleted the enhancement/upgrade-to-react-19 branch June 3, 2025 14:13
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.

2 participants