diff --git a/.changeset/renovate-ccf3e66.md b/.changeset/renovate-ccf3e66.md new file mode 100644 index 0000000000..920da9b987 --- /dev/null +++ b/.changeset/renovate-ccf3e66.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-api-docs': patch +--- + +Updated dependency `@types/swagger-ui-react` to `^5.0.0`. diff --git a/.changeset/slow-clouds-tie.md b/.changeset/slow-clouds-tie.md new file mode 100644 index 0000000000..5528ddd4bd --- /dev/null +++ b/.changeset/slow-clouds-tie.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-api-docs': patch +--- + +Fix types with new bumped dependency diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index e905876902..a788f38959 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -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" diff --git a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.test.tsx b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.test.tsx index 78aae18b19..649b63ae3c 100644 --- a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.test.tsx +++ b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.test.tsx @@ -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( , ); diff --git a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx index 8fcc29b829..7279575842 100644 --- a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx +++ b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx @@ -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; +} & Omit, 'spec'>; export const OpenApiDefinition = ({ definition, diff --git a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx index 290c8808fd..b1dbd75b0d 100644 --- a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx +++ b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx @@ -43,7 +43,7 @@ export const OpenApiDefinitionWidget = ( }> ); diff --git a/yarn.lock b/yarn.lock index 82965a0a82..7d38fd9696 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4092,7 +4092,7 @@ __metadata: "@testing-library/user-event": "npm:^14.0.0" "@types/highlightjs": "npm:^10.1.0" "@types/react": "npm:^18.0.0" - "@types/swagger-ui-react": "npm:^4.18.0" + "@types/swagger-ui-react": "npm:^5.0.0" graphiql: "npm:3.1.1" graphql: "npm:^16.0.0" graphql-config: "npm:^5.0.2" @@ -22096,12 +22096,12 @@ __metadata: languageName: node linkType: hard -"@types/swagger-ui-react@npm:^4.18.0": - version: 4.18.3 - resolution: "@types/swagger-ui-react@npm:4.18.3" +"@types/swagger-ui-react@npm:^5.0.0": + version: 5.18.0 + resolution: "@types/swagger-ui-react@npm:5.18.0" dependencies: "@types/react": "npm:*" - checksum: 10/4927314f1b0d68edf200ef15bca7555f12ec1bb8cc699fa397ef2f4e1e1873d17880b663bbc6d70e30149e50c3e7055178c1e0aad110520dfb31d781ab326dcb + checksum: 10/002bb3e38eb5917f5da942affa357811ccb078816bf53ba9007e43603f9b9a839eb930380b08051b9cc9a95ca2ebec06599a825e4d0542e436ea2c2027fc3a0a languageName: node linkType: hard