Skip to content

Conversation

@simonbs
Copy link
Contributor

@simonbs simonbs commented Apr 29, 2025

Removes swagger-ui-react and depends on Swagger UI using Unpkg instead, similar to what we do with Stoplight.

Description

This removes the dependency on the swagger-ui-react package, enabling us to update to React 19.1.0 and resolve a (minor) security warning.

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Copilot AI review requested due to automatic review settings April 29, 2025 08:18
@simonbs simonbs requested a review from ulrikandersen as a code owner April 29, 2025 08:18
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 replaces the swagger-ui-react dependency with a direct reference to Swagger UI via Unpkg, enabling an upgrade to React 19.1.0 and addressing a minor security warning.

  • Removed swagger-ui-react and its associated styling
  • Implemented fetching and YAML parsing of the API spec
  • Dynamically loads Swagger UI scripts and styles from Unpkg
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

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

  • Consider renaming the variable 'unkpgUrl' to 'unpkgUrl' for clarity and consistency with the Unpkg service name.
const unkpgUrl = "https://unpkg.com/[email protected]"

@simonbs simonbs enabled auto-merge April 29, 2025 08:24
@simonbs simonbs mentioned this pull request Jun 3, 2025
@simonbs simonbs merged commit 9f535a0 into develop Jun 3, 2025
8 checks passed
@simonbs simonbs deleted the enhancement/replaces-swagger-ui-react branch June 3, 2025 13:02
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.

3 participants