Skip to content

Replaces swagger-ui-react with unpkg #587

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 3 commits into
base: develop
Choose a base branch
from

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 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 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
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.

1 participant