Merge pull request #32070 from backstage/renovate/swagger-ui-react-5.x

chore(deps): update dependency @types/swagger-ui-react to v5
This commit is contained in:
Fredrik Adelöw
2026-01-08 17:02:06 +01:00
committed by GitHub
7 changed files with 21 additions and 11 deletions
+1 -1
View File
@@ -83,7 +83,7 @@
"@testing-library/user-event": "^14.0.0",
"@types/highlightjs": "^10.1.0",
"@types/react": "^18.0.0",
"@types/swagger-ui-react": "^4.18.0",
"@types/swagger-ui-react": "^5.0.0",
"react": "^18.0.2",
"react-dom": "^18.0.2",
"react-router-dom": "^6.3.0"
@@ -96,13 +96,13 @@ paths:
`;
const requestInterceptor = (req: any) => req;
const supportedSubmitMethods = ['get', 'post', 'put', 'delete'];
const supportedSubmitMethods = ['get', 'post', 'put', 'delete'] as const;
const { findByRole, getByRole, getByLabelText } = await renderInTestApp(
<OpenApiDefinition
definition={definition}
requestInterceptor={requestInterceptor}
supportedSubmitMethods={supportedSubmitMethods}
supportedSubmitMethods={supportedSubmitMethods as any}
/>,
);
@@ -16,7 +16,7 @@
import { makeStyles } from '@material-ui/core/styles';
import { useEffect, useState } from 'react';
import SwaggerUI, { SwaggerUIProps } from 'swagger-ui-react';
import SwaggerUI from 'swagger-ui-react';
import 'swagger-ui-react/swagger-ui.css';
const useStyles = makeStyles(theme => ({
@@ -179,7 +179,7 @@ const useStyles = makeStyles(theme => ({
export type OpenApiDefinitionProps = {
definition: string;
} & Omit<SwaggerUIProps, 'spec'>;
} & Omit<React.ComponentProps<typeof SwaggerUI>, 'spec'>;
export const OpenApiDefinition = ({
definition,
@@ -43,7 +43,7 @@ export const OpenApiDefinitionWidget = (
<Suspense fallback={<Progress />}>
<LazyOpenApiDefinition
{...props}
supportedSubmitMethods={validSubmitMethods}
supportedSubmitMethods={validSubmitMethods as any}
/>
</Suspense>
);