From 2eff85a26118d8ff8ace7ef9ab879cc620009cc8 Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Thu, 31 Aug 2023 10:43:53 +0300 Subject: [PATCH 1/5] chore: add tests for cover field default crash (#2389) --- demo/openapi-3-1.yaml | 1 + demo/openapi.yaml | 2 + demo/swagger.yaml | 1 + src/components/Markdown/SanitizedMdBlock.tsx | 2 +- .../__tests__/FieldDetails.test.tsx | 47 +++++++++++++ .../__snapshots__/FieldDetails.test.tsx.snap | 69 +++++++++++++++++++ .../SecurityRequirement.test.tsx.snap | 8 +-- .../loadAndBundleSpec.test.ts.snap | 4 ++ 8 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 src/components/__tests__/FieldDetails.test.tsx create mode 100644 src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap diff --git a/demo/openapi-3-1.yaml b/demo/openapi-3-1.yaml index 7cd6178f9e..f50af26c48 100644 --- a/demo/openapi-3-1.yaml +++ b/demo/openapi-3-1.yaml @@ -1139,6 +1139,7 @@ components: type: [string, integer, 'null'] minItems: 1 maxItems: 10 + default: [] xml: name: photoUrl wrapped: true diff --git a/demo/openapi.yaml b/demo/openapi.yaml index 8cecfd5aba..be7cb578b6 100644 --- a/demo/openapi.yaml +++ b/demo/openapi.yaml @@ -1047,6 +1047,7 @@ components: photoUrls: description: The list of URL to a cute photos featuring pet type: array + default: [] maxItems: 20 xml: name: photoUrl @@ -1176,6 +1177,7 @@ components: name: type: string description: hooray + default: [] description: Pet object that needs to be added to the store required: true UserArray: diff --git a/demo/swagger.yaml b/demo/swagger.yaml index a7552d59f0..5aaa19b60a 100644 --- a/demo/swagger.yaml +++ b/demo/swagger.yaml @@ -780,6 +780,7 @@ definitions: photoUrls: description: The list of URL to a cute photos featuring pet type: array + default: [] xml: name: photoUrl wrapped: true diff --git a/src/components/Markdown/SanitizedMdBlock.tsx b/src/components/Markdown/SanitizedMdBlock.tsx index 44b1d8d4d6..33a54bd01d 100644 --- a/src/components/Markdown/SanitizedMdBlock.tsx +++ b/src/components/Markdown/SanitizedMdBlock.tsx @@ -6,7 +6,7 @@ import { StylingMarkdownProps } from './Markdown'; import { StyledMarkdownBlock } from './styled.elements'; import styled from 'styled-components'; -const StyledMarkdownSpan = styled(StyledMarkdownBlock)` +const StyledMarkdownSpan = styled(props => )` display: inline; `; diff --git a/src/components/__tests__/FieldDetails.test.tsx b/src/components/__tests__/FieldDetails.test.tsx new file mode 100644 index 0000000000..703dc3eabb --- /dev/null +++ b/src/components/__tests__/FieldDetails.test.tsx @@ -0,0 +1,47 @@ +import * as React from 'react'; +import { shallow } from 'enzyme'; + +import { FieldDetails } from '../Fields/FieldDetails'; +import { SchemaModel } from '../../services/models/Schema'; +import { withTheme } from '../testProviders'; + +jest.mock('../ExternalDocumentation/ExternalDocumentation', () => ({ + ExternalDocumentation: () => { + return
; + }, +})); + +describe('FieldDetailsComponent', () => { + it('renders correctly', () => { + const mockFieldProps = { + showExamples: true, + field: { + schema: { + type: 'array', + default: [], + typePrefix: 'test type prefix', + displayType: 'array', + title: 'test title', + externalDocs: undefined, + constraints: [''], + } as SchemaModel, + example: 'example', + name: 'name', + expanded: false, + required: false, + kind: '', + deprecated: false, + collapse: jest.fn(), + toggle: jest.fn(), + explode: false, + expand: jest.fn(), + description: 'test description', + }, + renderDiscriminatorSwitch: jest.fn(), + }; + + const wrapper = shallow(withTheme()); + + expect(wrapper.render()).toMatchSnapshot(); + }); +}); diff --git a/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap b/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap new file mode 100644 index 0000000000..828cdc8410 --- /dev/null +++ b/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap @@ -0,0 +1,69 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`FieldDetailsComponent renders correctly 1`] = ` +
+
+ + test type prefix + + + array + + + (test title) + + + + + + + +
+
+ + Default: + + + + "" + +
+ +
+ + Example: + + + + "example" + +
+
+
+

+ test description +

+ + +
+
+
+`; diff --git a/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap b/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap index 05c900d8ba..b8e1db5037 100644 --- a/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap @@ -3,8 +3,8 @@ exports[`SecurityRequirement should render SecurityDefs 1`] = ` "

petstore_auth

Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access.

-
Security Scheme Type: OAuth2
Flow type: implicit
Scopes:
  • write:pets -

    modify pets in your account

    -
  • read:pets -

    read your pets

    +
    Security Scheme Type: OAuth2
    Flow type: implicit
    Scopes:
    • write:pets -

      modify pets in your account

      +
    • read:pets -

      read your pets

GitLab_PersonalAccessToken

GitLab Personal Access Token description

Security Scheme Type: API Key
Header parameter name: PRIVATE-TOKEN

GitLab_OpenIdConnect

GitLab OpenIdConnect description

Security Scheme Type: OpenID Connect

basicAuth

Security Scheme Type: HTTP
HTTP Authorization Scheme: basic
" @@ -15,8 +15,8 @@ exports[`SecurityRequirement should render authDefinition 1`] = `"
Authorizations:
(API Key: GitLab_PersonalAccessTokenOpenID Connect: GitLab_OpenIdConnectHTTP: basicAuth) OAuth2: petstore_auth (write:petsread:pets)
OAuth2: petstore_auth

Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access.

-
Flow type: implicit
Required scopes: write:pets read:pets
Scopes:
  • write:pets -

    modify pets in your account

    -
  • read:pets -

    read your pets

    +
    Flow type: implicit
    Required scopes: write:pets read:pets
    Scopes:
    • write:pets -

      modify pets in your account

      +
    • read:pets -

      read your pets

API Key: GitLab_PersonalAccessToken

GitLab Personal Access Token description

Header parameter name: PRIVATE-TOKEN
OpenID Connect: GitLab_OpenIdConnect

GitLab OpenIdConnect description

HTTP: basicAuth
HTTP Authorization Scheme: basic
," diff --git a/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap b/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap index fce41b1777..1b74faa3a8 100644 --- a/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap +++ b/src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap @@ -33,6 +33,7 @@ Object { "schema": Object { "properties": Object { "name": Object { + "default": Array [], "description": "hooray", "type": "string", }, @@ -289,6 +290,7 @@ Object { "type": "string", }, "photoUrls": Object { + "default": Array [], "description": "The list of URL to a cute photos featuring pet", "items": Object { "format": "url", @@ -2195,6 +2197,7 @@ Object { "type": "string", }, "photoUrls": Object { + "default": Array [], "description": "The list of URL to a cute photos featuring pet", "else": Object { "maxItems": 20, @@ -4085,6 +4088,7 @@ Object { "type": "string", }, "photoUrls": Object { + "default": Array [], "description": "The list of URL to a cute photos featuring pet", "items": Object { "format": "url", From 76edc159399150778b384be87ee958a93e5c491c Mon Sep 17 00:00:00 2001 From: Oprysk Viacheslav Date: Fri, 8 Sep 2023 10:51:39 +0300 Subject: [PATCH 2/5] fix: react18 cli integration (#2404) * fix: react18 cli integration * fix: update unit tests snapshots --- package-lock.json | 35 +++++------------- package.json | 3 +- src/common-elements/panels.ts | 12 +++---- src/components/Callbacks/CallbackTitle.tsx | 6 ++-- src/components/ContentItems/ContentItems.tsx | 6 ++-- src/components/Endpoint/Endpoint.tsx | 6 ++-- src/components/Endpoint/styled.elements.ts | 33 ++++++++--------- .../ExternalDocumentation.tsx | 6 ++-- src/components/Markdown/SanitizedMdBlock.tsx | 20 ++++++----- src/components/Markdown/styled.elements.tsx | 12 +++---- .../SecurityRequirement/SecurityHeader.tsx | 4 +-- .../SecurityRequirement.tsx | 4 +-- .../SecurityRequirement/styled.elements.ts | 14 ++++---- src/components/SeeMore/SeeMore.tsx | 8 ++--- src/components/SideMenu/MenuItem.tsx | 9 +++-- src/components/SideMenu/MenuItems.tsx | 2 +- src/components/SideMenu/styled.elements.ts | 36 +++++++++---------- .../__snapshots__/FieldDetails.test.tsx.snap | 2 +- .../__snapshots__/OneOfSchema.test.tsx.snap | 2 +- .../SecurityRequirement.test.tsx.snap | 24 ++++++------- 20 files changed, 117 insertions(+), 127 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2a7c860249..8860d2d591 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "polished": "^4.1.3", "prismjs": "^1.27.0", "prop-types": "^15.7.2", - "react-tabs": "^3.2.2", + "react-tabs": "^4.3.0", "slugify": "~1.4.7", "stickyfill": "^1.1.1", "swagger2openapi": "^7.0.6", @@ -49,7 +49,6 @@ "@types/prop-types": "^15.7.3", "@types/react": "^17.0.8", "@types/react-dom": "^17.0.5", - "@types/react-tabs": "^2.3.2", "@types/styled-components": "^5.1.1", "@types/tapable": "^2.2.2", "@types/webpack": "^5.28.0", @@ -3960,15 +3959,6 @@ "@types/react": "*" } }, - "node_modules/@types/react-tabs": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@types/react-tabs/-/react-tabs-2.3.2.tgz", - "integrity": "sha512-QfMelaJSdMcp+CenKhATp12XFFqqUcLXILgwpX3dgWfVYNZPtsLXZDDCRsVn+kwmBOWB+DFPKpQorxbUhnXINw==", - "dev": true, - "dependencies": { - "@types/react": "*" - } - }, "node_modules/@types/retry": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", @@ -15804,15 +15794,15 @@ } }, "node_modules/react-tabs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-3.2.2.tgz", - "integrity": "sha512-/o52eGKxFHRa+ssuTEgSM8qORnV4+k7ibW+aNQzKe+5gifeVz8nLxCrsI9xdRhfb0wCLdgIambIpb1qCxaMN+A==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-4.3.0.tgz", + "integrity": "sha512-2GfoG+f41kiBIIyd3gF+/GRCCYtamC8/2zlAcD8cqQmqI9Q+YVz7fJLHMmU9pXDVYYHpJeCgUSBJju85vu5q8Q==", "dependencies": { "clsx": "^1.1.0", "prop-types": "^15.5.0" }, "peerDependencies": { - "react": "^16.3.0 || ^17.0.0-0" + "react": "^16.8.0 || ^17.0.0-0 || ^18.0.0" } }, "node_modules/react-test-renderer": { @@ -22108,15 +22098,6 @@ "@types/react": "*" } }, - "@types/react-tabs": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@types/react-tabs/-/react-tabs-2.3.2.tgz", - "integrity": "sha512-QfMelaJSdMcp+CenKhATp12XFFqqUcLXILgwpX3dgWfVYNZPtsLXZDDCRsVn+kwmBOWB+DFPKpQorxbUhnXINw==", - "dev": true, - "requires": { - "@types/react": "*" - } - }, "@types/retry": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", @@ -30991,9 +30972,9 @@ } }, "react-tabs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-3.2.2.tgz", - "integrity": "sha512-/o52eGKxFHRa+ssuTEgSM8qORnV4+k7ibW+aNQzKe+5gifeVz8nLxCrsI9xdRhfb0wCLdgIambIpb1qCxaMN+A==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-4.3.0.tgz", + "integrity": "sha512-2GfoG+f41kiBIIyd3gF+/GRCCYtamC8/2zlAcD8cqQmqI9Q+YVz7fJLHMmU9pXDVYYHpJeCgUSBJju85vu5q8Q==", "requires": { "clsx": "^1.1.0", "prop-types": "^15.5.0" diff --git a/package.json b/package.json index 9f792c8ca3..701a2efc9f 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "@types/prop-types": "^15.7.3", "@types/react": "^17.0.8", "@types/react-dom": "^17.0.5", - "@types/react-tabs": "^2.3.2", "@types/styled-components": "^5.1.1", "@types/tapable": "^2.2.2", "@types/webpack": "^5.28.0", @@ -157,7 +156,7 @@ "polished": "^4.1.3", "prismjs": "^1.27.0", "prop-types": "^15.7.2", - "react-tabs": "^3.2.2", + "react-tabs": "^4.3.0", "slugify": "~1.4.7", "stickyfill": "^1.1.1", "swagger2openapi": "^7.0.6", diff --git a/src/common-elements/panels.ts b/src/common-elements/panels.ts index c434c503d2..cacdb685c5 100644 --- a/src/common-elements/panels.ts +++ b/src/common-elements/panels.ts @@ -1,14 +1,14 @@ import { SECTION_ATTR } from '../services/MenuStore'; import styled, { media } from '../styled-components'; -export const MiddlePanel = styled.div<{ compact?: boolean }>` +export const MiddlePanel = styled.div<{ $compact?: boolean }>` width: calc(100% - ${props => props.theme.rightPanel.width}); padding: 0 ${props => props.theme.spacing.sectionHorizontal}px; - ${({ compact, theme }) => + ${({ $compact, theme }) => media.lessThan('medium', true)` width: 100%; - padding: ${`${compact ? 0 : theme.spacing.sectionVertical}px ${ + padding: ${`${$compact ? 0 : theme.spacing.sectionVertical}px ${ theme.spacing.sectionHorizontal }px`}; `}; @@ -16,7 +16,7 @@ export const MiddlePanel = styled.div<{ compact?: boolean }>` export const Section = styled.div.attrs(props => ({ [SECTION_ATTR]: props.id, -}))<{ underlined?: boolean }>` +}))<{ $underlined?: boolean }>` padding: ${props => props.theme.spacing.sectionVertical}px 0; &:last-child { @@ -30,8 +30,8 @@ export const Section = styled.div.attrs(props => ({ ${media.lessThan('medium', true)` padding: 0; `} - ${(props: any) => - (props.underlined && + ${({ $underlined }) => + ($underlined && ` position: relative; diff --git a/src/components/Callbacks/CallbackTitle.tsx b/src/components/Callbacks/CallbackTitle.tsx index 4cd3066e9f..5b123ff8ca 100644 --- a/src/components/Callbacks/CallbackTitle.tsx +++ b/src/components/Callbacks/CallbackTitle.tsx @@ -24,7 +24,7 @@ export const CallbackTitle = (props: CallbackTitleProps) => { {shortenHTTPVerb(httpVerb)} - {name} + {name} {deprecated ? {l('deprecated')} : null} ); @@ -45,8 +45,8 @@ const CallbackTitleWrapper = styled.button` } `; -const CallbackName = styled.span<{ deprecated?: boolean }>` - text-decoration: ${props => (props.deprecated ? 'line-through' : 'none')}; +const CallbackName = styled.span<{ $deprecated?: boolean }>` + text-decoration: ${props => (props.$deprecated ? 'line-through' : 'none')}; margin-right: 8px; `; diff --git a/src/components/ContentItems/ContentItems.tsx b/src/components/ContentItems/ContentItems.tsx index 2be1fc64a1..38f4076799 100644 --- a/src/components/ContentItems/ContentItems.tsx +++ b/src/components/ContentItems/ContentItems.tsx @@ -51,7 +51,7 @@ export class ContentItem extends React.Component { return ( <> {content && ( -
+
{content}
)} @@ -61,7 +61,7 @@ export class ContentItem extends React.Component { } } -const middlePanelWrap = component => {component}; +const middlePanelWrap = component => {component}; @observer export class SectionItem extends React.Component { @@ -72,7 +72,7 @@ export class SectionItem extends React.Component { return ( <> - +
{name} diff --git a/src/components/Endpoint/Endpoint.tsx b/src/components/Endpoint/Endpoint.tsx index 9579eecab2..96eca64648 100644 --- a/src/components/Endpoint/Endpoint.tsx +++ b/src/components/Endpoint/Endpoint.tsx @@ -49,8 +49,8 @@ export class Endpoint extends React.Component { {options => ( - - + + {operation.httpVerb} {operation.path} @@ -62,7 +62,7 @@ export class Endpoint extends React.Component { style={{ marginRight: '-25px' }} /> - + {operation.servers.map(server => { const normalizedUrl = options.expandDefaultServerVariables ? expandDefaultServerVariables(server.url, server.variables) diff --git a/src/components/Endpoint/styled.elements.ts b/src/components/Endpoint/styled.elements.ts index d86b6d4340..01fbd4ae7e 100644 --- a/src/components/Endpoint/styled.elements.ts +++ b/src/components/Endpoint/styled.elements.ts @@ -14,61 +14,62 @@ export const ServerRelativeURL = styled.span` text-overflow: ellipsis; `; -export const EndpointInfo = styled.button<{ expanded?: boolean; inverted?: boolean }>` +export const EndpointInfo = styled.button<{ $expanded?: boolean; $inverted?: boolean }>` outline: 0; color: inherit; width: 100%; text-align: left; cursor: pointer; - padding: 10px 30px 10px ${props => (props.inverted ? '10px' : '20px')}; - border-radius: ${props => (props.inverted ? '0' : '4px 4px 0 0')}; + padding: 10px 30px 10px ${props => (props.$inverted ? '10px' : '20px')}; + border-radius: ${props => (props.$inverted ? '0' : '4px 4px 0 0')}; background-color: ${props => - props.inverted ? 'transparent' : props.theme.codeBlock.backgroundColor}; + props.$inverted ? 'transparent' : props.theme.codeBlock.backgroundColor}; display: flex; white-space: nowrap; align-items: center; - border: ${props => (props.inverted ? '0' : '1px solid transparent')}; - border-bottom: ${props => (props.inverted ? '1px solid #ccc' : '0')}; + border: ${props => (props.$inverted ? '0' : '1px solid transparent')}; + border-bottom: ${props => (props.$inverted ? '1px solid #ccc' : '0')}; transition: border-color 0.25s ease; ${props => - (props.expanded && !props.inverted && `border-color: ${props.theme.colors.border.dark};`) || ''} + (props.$expanded && !props.$inverted && `border-color: ${props.theme.colors.border.dark};`) || + ''} .${ServerRelativeURL} { - color: ${props => (props.inverted ? props.theme.colors.text.primary : '#ffffff')}; + color: ${props => (props.$inverted ? props.theme.colors.text.primary : '#ffffff')}; } &:focus { box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(128, 128, 128, 0.25); } `; -export const HttpVerb = styled.span.attrs((props: { type: string; compact?: boolean }) => ({ +export const HttpVerb = styled.span.attrs((props: { type: string; $compact?: boolean }) => ({ className: `http-verb ${props.type}`, -}))<{ type: string; compact?: boolean }>` - font-size: ${props => (props.compact ? '0.8em' : '0.929em')}; - line-height: ${props => (props.compact ? '18px' : '20px')}; +}))<{ type: string; $compact?: boolean }>` + font-size: ${props => (props.$compact ? '0.8em' : '0.929em')}; + line-height: ${props => (props.$compact ? '18px' : '20px')}; background-color: ${props => props.theme.colors.http[props.type] || '#999999'}; color: #ffffff; - padding: ${props => (props.compact ? '2px 8px' : '3px 10px')}; + padding: ${props => (props.$compact ? '2px 8px' : '3px 10px')}; text-transform: uppercase; font-family: ${props => props.theme.typography.headings.fontFamily}; margin: 0; `; -export const ServersOverlay = styled.div<{ expanded: boolean }>` +export const ServersOverlay = styled.div<{ $expanded: boolean }>` position: absolute; width: 100%; z-index: 100; background: ${props => props.theme.rightPanel.servers.overlay.backgroundColor}; color: ${props => props.theme.rightPanel.servers.overlay.textColor}; box-sizing: border-box; - box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.33); + box-shadow: 0 0 6px rgba(0, 0, 0, 0.33); overflow: hidden; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; transition: all 0.25s ease; visibility: hidden; - ${props => (props.expanded ? 'visibility: visible;' : 'transform: translateY(-50%) scaleY(0);')} + ${props => (props.$expanded ? 'visibility: visible;' : 'transform: translateY(-50%) scaleY(0);')} `; export const ServerItem = styled.div` diff --git a/src/components/ExternalDocumentation/ExternalDocumentation.tsx b/src/components/ExternalDocumentation/ExternalDocumentation.tsx index 589dd025ef..c73f5fbbb4 100644 --- a/src/components/ExternalDocumentation/ExternalDocumentation.tsx +++ b/src/components/ExternalDocumentation/ExternalDocumentation.tsx @@ -4,9 +4,9 @@ import styled from '../../styled-components'; import { OpenAPIExternalDocumentation } from '../../types'; import { linksCss } from '../Markdown/styled.elements'; -const LinkWrap = styled.div<{ compact?: boolean }>` +const LinkWrap = styled.div<{ $compact?: boolean }>` ${linksCss}; - ${({ compact }) => (!compact ? 'margin: 1em 0' : '')} + ${({ $compact }) => (!$compact ? 'margin: 1em 0' : '')} `; @observer @@ -21,7 +21,7 @@ export class ExternalDocumentation extends React.Component<{ } return ( - + {externalDocs.description || externalDocs.url} ); diff --git a/src/components/Markdown/SanitizedMdBlock.tsx b/src/components/Markdown/SanitizedMdBlock.tsx index 33a54bd01d..84f6318d3e 100644 --- a/src/components/Markdown/SanitizedMdBlock.tsx +++ b/src/components/Markdown/SanitizedMdBlock.tsx @@ -12,21 +12,25 @@ const StyledMarkdownSpan = styled(props => )` const sanitize = (untrustedSpec, html) => (untrustedSpec ? DOMPurify.sanitize(html) : html); -export function SanitizedMarkdownHTML( - props: StylingMarkdownProps & { html: string; className?: string; 'data-role'?: string }, -) { - const Wrap = props.inline ? StyledMarkdownSpan : StyledMarkdownBlock; +export function SanitizedMarkdownHTML({ + inline, + compact, + ...rest +}: StylingMarkdownProps & { html: string; className?: string; 'data-role'?: string }) { + const Wrap = inline ? StyledMarkdownSpan : StyledMarkdownBlock; return ( {options => ( )} diff --git a/src/components/Markdown/styled.elements.tsx b/src/components/Markdown/styled.elements.tsx index 7a67d31c51..b04a026148 100644 --- a/src/components/Markdown/styled.elements.tsx +++ b/src/components/Markdown/styled.elements.tsx @@ -24,7 +24,7 @@ export const StyledMarkdownBlock = styled( PrismDiv as StyledComponent< 'div', ResolvedThemeInterface, - { compact?: boolean; inline?: boolean } + { $compact?: boolean; $inline?: boolean } >, )` font-family: ${props => props.theme.typography.fontFamily}; @@ -37,8 +37,8 @@ export const StyledMarkdownBlock = styled( } } - ${({ compact }) => - compact && + ${({ $compact }) => + $compact && ` p:first-child { margin-top: 0; @@ -48,8 +48,8 @@ export const StyledMarkdownBlock = styled( } `} - ${({ inline }) => - inline && + ${({ $inline }) => + $inline && ` p { display: inline-block; }`} @@ -87,7 +87,7 @@ export const StyledMarkdownBlock = styled( padding: ${props => props.theme.spacing.unit * 4}px; overflow-x: auto; line-height: normal; - border-radius: 0px; + border-radius: 0; border: 1px solid rgba(38, 50, 56, 0.1); code { diff --git a/src/components/SecurityRequirement/SecurityHeader.tsx b/src/components/SecurityRequirement/SecurityHeader.tsx index 12047db1ee..4e2ffb04b9 100644 --- a/src/components/SecurityRequirement/SecurityHeader.tsx +++ b/src/components/SecurityRequirement/SecurityHeader.tsx @@ -18,9 +18,9 @@ export function SecurityHeader(props: SecurityRequirementProps) { const grouping = security.schemes.length > 1; if (security.schemes.length === 0) - return None; + return None; return ( - + {grouping && '('} {security.schemes.map(scheme => { return ( diff --git a/src/components/SecurityRequirement/SecurityRequirement.tsx b/src/components/SecurityRequirement/SecurityRequirement.tsx index ca8e27a7bb..046ef4edec 100644 --- a/src/components/SecurityRequirement/SecurityRequirement.tsx +++ b/src/components/SecurityRequirement/SecurityRequirement.tsx @@ -37,12 +37,12 @@ export function SecurityRequirements(props: SecurityRequirementsProps) { return ( <> - + setExpanded(!expanded)}> Authorizations: - + {securities.map((security, idx) => ( ` - ${p => !p.expanded && `white-space: nowrap;`} +export const SecurityRequirementOrWrap = styled.span<{ $expanded?: boolean }>` + ${p => !p.$expanded && `white-space: nowrap;`} &:after { content: ' or '; - ${p => p.expanded && `content: ' or \\a';`} + ${p => p.$expanded && `content: ' or \\a';`} white-space: pre; } @@ -76,13 +76,13 @@ export const AuthHeaderColumn = styled.div` cursor: pointer; `; -export const SecuritiesColumn = styled.div<{ expanded?: boolean }>` +export const SecuritiesColumn = styled.div<{ $expanded?: boolean }>` width: ${props => props.theme.schema.defaultDetailsWidth}; text-overflow: ellipsis; border-radius: 4px; overflow: hidden; ${p => - p.expanded && + p.$expanded && `background: ${p.theme.colors.gray['100']}; padding: 8px 9.6px; margin: 20px 0; @@ -98,11 +98,11 @@ export const AuthHeader = styled(UnderlinedHeader)` margin: 0; `; -export const Wrap = styled.div<{ expanded?: boolean }>` +export const Wrap = styled.div<{ $expanded?: boolean }>` width: 100%; display: flex; margin: 1em 0; - flex-direction: ${p => (p.expanded ? 'column' : 'row')}; + flex-direction: ${p => (p.$expanded ? 'column' : 'row')}; ${media.lessThan('small')` flex-direction: column; `} diff --git a/src/components/SeeMore/SeeMore.tsx b/src/components/SeeMore/SeeMore.tsx index 8e3dc2e707..1eacc3cc94 100644 --- a/src/components/SeeMore/SeeMore.tsx +++ b/src/components/SeeMore/SeeMore.tsx @@ -32,7 +32,7 @@ export function SeeMore({ children, height }: SeeMoreProps): JSX.Element { > {children} - + {showLink && ( {showMore ? 'See less' : 'See more'} @@ -47,11 +47,11 @@ const Container = styled.div` overflow-y: hidden; `; -const ButtonContainer = styled.div<{ dimmed?: boolean }>` +const ButtonContainer = styled.div<{ $dimmed?: boolean }>` text-align: center; line-height: 1.5em; - ${({ dimmed }) => - dimmed && + ${({ $dimmed }) => + $dimmed && `background-image: linear-gradient(to bottom, transparent,rgb(255 255 255)); position: relative; top: -0.5em; diff --git a/src/components/SideMenu/MenuItem.tsx b/src/components/SideMenu/MenuItem.tsx index 2b8407ebc4..e704b9d490 100644 --- a/src/components/SideMenu/MenuItem.tsx +++ b/src/components/SideMenu/MenuItem.tsx @@ -54,7 +54,7 @@ export class MenuItem extends React.Component { {item.type === 'operation' ? ( ) : ( - + {item.type === 'schema' && schema} {item.sidebarLabel} @@ -95,7 +95,12 @@ export const OperationMenuItemContent = observer((props: OperationMenuItemConten }, [props.item.active, ref]); return ( - + {item.isWebhook ? ( {showWebhookVerb ? item.httpVerb : l('webhook')} diff --git a/src/components/SideMenu/MenuItems.tsx b/src/components/SideMenu/MenuItems.tsx index ec9eef8e56..af9ab197a2 100644 --- a/src/components/SideMenu/MenuItems.tsx +++ b/src/components/SideMenu/MenuItems.tsx @@ -25,7 +25,7 @@ export class MenuItems extends React.Component { {items.map((item, idx) => ( diff --git a/src/components/SideMenu/styled.elements.ts b/src/components/SideMenu/styled.elements.ts index 9f13709526..0caf809eb3 100644 --- a/src/components/SideMenu/styled.elements.ts +++ b/src/components/SideMenu/styled.elements.ts @@ -84,7 +84,7 @@ function menuItemActive( } } -export const MenuItemUl = styled.ul<{ expanded: boolean }>` +export const MenuItemUl = styled.ul<{ $expanded: boolean }>` margin: 0; padding: 0; @@ -96,7 +96,7 @@ export const MenuItemUl = styled.ul<{ expanded: boolean }>` font-size: 0.929em; } - ${props => (props.expanded ? '' : 'display: none;')}; + ${props => (props.$expanded ? '' : 'display: none;')}; `; export const MenuItemLi = styled.li<{ depth: number }>` @@ -122,40 +122,40 @@ export const menuItemDepth = { }; export interface MenuItemLabelType { - depth: number; - active: boolean; - deprecated?: boolean; - type?: string; + $depth: number; + $active: boolean; + $deprecated?: boolean; + $type?: string; } export const MenuItemLabel = styled.label.attrs((props: MenuItemLabelType) => ({ - className: classnames('-depth' + props.depth, { - active: props.active, + className: classnames('-depth' + props.$depth, { + active: props.$active, }), }))` cursor: pointer; color: ${props => - props.active - ? menuItemActive(props.depth, props, 'activeTextColor') + props.$active + ? menuItemActive(props.$depth, props, 'activeTextColor') : props.theme.sidebar.textColor}; margin: 0; padding: 12.5px ${props => props.theme.spacing.unit * 4}px; - ${({ depth, type, theme }) => - (type === 'section' && depth > 1 && 'padding-left: ' + theme.spacing.unit * 8 + 'px;') || ''} + ${({ $depth, $type, theme }) => + ($type === 'section' && $depth > 1 && 'padding-left: ' + theme.spacing.unit * 8 + 'px;') || ''} display: flex; justify-content: space-between; font-family: ${props => props.theme.typography.headings.fontFamily}; - ${props => menuItemDepth[props.depth]}; + ${props => menuItemDepth[props.$depth]}; background-color: ${props => - props.active - ? menuItemActive(props.depth, props, 'activeBackgroundColor') + props.$active + ? menuItemActive(props.$depth, props, 'activeBackgroundColor') : props.theme.sidebar.backgroundColor}; - ${props => (props.deprecated && deprecatedCss) || ''}; + ${props => (props.$deprecated && deprecatedCss) || ''}; &:hover { - color: ${props => menuItemActive(props.depth, props, 'activeTextColor')}; - background-color: ${props => menuItemActive(props.depth, props, 'activeBackgroundColor')}; + color: ${props => menuItemActive(props.$depth, props, 'activeTextColor')}; + background-color: ${props => menuItemActive(props.$depth, props, 'activeBackgroundColor')}; } ${ShelfIcon} { diff --git a/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap b/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap index 828cdc8410..77ccf56695 100644 --- a/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap @@ -56,7 +56,7 @@ exports[`FieldDetailsComponent renders correctly 1`] = `

test description diff --git a/src/components/__tests__/__snapshots__/OneOfSchema.test.tsx.snap b/src/components/__tests__/__snapshots__/OneOfSchema.test.tsx.snap index 3985a50e33..3347a046af 100644 --- a/src/components/__tests__/__snapshots__/OneOfSchema.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/OneOfSchema.test.tsx.snap @@ -44,7 +44,7 @@ exports[`Components SchemaView OneOf deprecated should match snapshot 1`] = `

diff --git a/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap b/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap index b8e1db5037..1c3d7efc81 100644 --- a/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap @@ -1,23 +1,23 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SecurityRequirement should render SecurityDefs 1`] = ` -"

petstore_auth

Get access to data while protecting your account credentials. +"

petstore_auth

Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access.

-
Security Scheme Type: OAuth2
Flow type: implicit
Scopes:
  • write:pets -

    modify pets in your account

    -
  • read:pets -

    read your pets

    -

GitLab_PersonalAccessToken

GitLab Personal Access Token description

-
Security Scheme Type: API Key
Header parameter name: PRIVATE-TOKEN

GitLab_OpenIdConnect

GitLab OpenIdConnect description

-
Security Scheme Type: OpenID Connect

basicAuth

Security Scheme Type: HTTP
HTTP Authorization Scheme: basic
" +
Security Scheme Type: OAuth2
Flow type: implicit
Scopes:
  • write:pets -

    modify pets in your account

    +
  • read:pets -

    read your pets

    +

GitLab_PersonalAccessToken

GitLab Personal Access Token description

+
Security Scheme Type: API Key
Header parameter name: PRIVATE-TOKEN

GitLab_OpenIdConnect

GitLab OpenIdConnect description

+
Security Scheme Type: OpenID Connect

basicAuth

Security Scheme Type: HTTP
HTTP Authorization Scheme: basic
" `; exports[`SecurityRequirement should render authDefinition 1`] = `"
Authorizations:
(API Key: GitLab_PersonalAccessTokenOpenID Connect: GitLab_OpenIdConnectHTTP: basicAuth) OAuth2: petstore_auth
,"`; exports[`SecurityRequirement should render authDefinition 2`] = ` -"
Authorizations:
(API Key: GitLab_PersonalAccessTokenOpenID Connect: GitLab_OpenIdConnectHTTP: basicAuth) OAuth2: petstore_auth (write:petsread:pets)
OAuth2: petstore_auth

Get access to data while protecting your account credentials. +"

Authorizations:
(API Key: GitLab_PersonalAccessTokenOpenID Connect: GitLab_OpenIdConnectHTTP: basicAuth) OAuth2: petstore_auth (write:petsread:pets)
OAuth2: petstore_auth

Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access.

-
Flow type: implicit
Required scopes: write:pets read:pets
Scopes:
  • write:pets -

    modify pets in your account

    -
  • read:pets -

    read your pets

    -
API Key: GitLab_PersonalAccessToken

GitLab Personal Access Token description

-
Header parameter name: PRIVATE-TOKEN
OpenID Connect: GitLab_OpenIdConnect

GitLab OpenIdConnect description

-
HTTP: basicAuth
HTTP Authorization Scheme: basic
," +
Flow type: implicit
Required scopes: write:pets read:pets
Scopes:
  • write:pets -

    modify pets in your account

    +
  • read:pets -

    read your pets

    +
API Key: GitLab_PersonalAccessToken

GitLab Personal Access Token description

+
Header parameter name: PRIVATE-TOKEN
OpenID Connect: GitLab_OpenIdConnect

GitLab OpenIdConnect description

+
HTTP: basicAuth
HTTP Authorization Scheme: basic
," `; From 98813e687dd44768fe5d9dae24246c0a61b09a62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 11:08:57 +0300 Subject: [PATCH 3/5] chore(deps): bump @cypress/request and cypress (#2410) Bumps [@cypress/request](https://github.com/cypress-io/request) to 3.0.1 and updates ancestor dependency [cypress](https://github.com/cypress-io/cypress). These dependencies need to be updated together. Updates `@cypress/request` from 2.88.11 to 3.0.1 - [Release notes](https://github.com/cypress-io/request/releases) - [Changelog](https://github.com/cypress-io/request/blob/master/CHANGELOG.md) - [Commits](https://github.com/cypress-io/request/compare/v2.88.11...v3.0.1) Updates `cypress` from 12.17.1 to 13.1.0 - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md) - [Commits](https://github.com/cypress-io/cypress/compare/v12.17.1...v13.1.0) --- updated-dependencies: - dependency-name: "@cypress/request" dependency-type: indirect - dependency-name: cypress dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 100 +++++++++++++++++++++++++++++++++------------- package.json | 2 +- 2 files changed, 73 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8860d2d591..03fc878c0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "core-js": "^3.13.1", "coveralls": "^3.1.1", "css-loader": "^5.2.6", - "cypress": "^12.17.1", + "cypress": "^13.1.0", "enzyme": "^3.11.0", "enzyme-to-json": "^3.6.2", "esbuild-loader": "^3.0.1", @@ -1959,9 +1959,9 @@ } }, "node_modules/@cypress/request": { - "version": "2.88.11", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.11.tgz", - "integrity": "sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", "dev": true, "dependencies": { "aws-sign2": "~0.7.0", @@ -1977,9 +1977,9 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.10.3", + "qs": "6.10.4", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", + "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" }, @@ -2031,6 +2031,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/@cypress/request/node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@cypress/request/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@cypress/request/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -6634,15 +6658,15 @@ "dev": true }, "node_modules/cypress": { - "version": "12.17.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.1.tgz", - "integrity": "sha512-eKfBgO6t8waEyhegL4gxD7tcI6uTCGttu+ZU7y9Hq8BlpMztd7iLeIF4AJFAnbZH1xjX+wwgg4cRKFNSvv3VWQ==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.1.0.tgz", + "integrity": "sha512-LUKxCYlB973QBFls1Up4FAE9QIYobT+2I8NvvAwMfQS2YwsWbr6yx7y9hmsk97iqbHkKwZW3MRjoK1RToBFVdQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.11", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", + "@types/node": "^16.18.39", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -6675,6 +6699,7 @@ "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", "semver": "^7.5.3", @@ -6687,13 +6712,13 @@ "cypress": "bin/cypress" }, "engines": { - "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + "node": "^16.0.0 || ^18.0.0 || >=20.0.0" } }, "node_modules/cypress/node_modules/@types/node": { - "version": "14.18.53", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.53.tgz", - "integrity": "sha512-soGmOpVBUq+gaBMwom1M+krC/NNbWlosh4AtGA03SyWNDiqSKtwp7OulO1M6+mg8YkHMvJ/y0AkCeO8d1hNb7A==", + "version": "16.18.48", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.48.tgz", + "integrity": "sha512-mlaecDKQ7rIZrYD7iiKNdzFb6e/qD5I9U1rAhq+Fd+DWvYVs+G2kv74UFHmSOlg5+i/vF3XxuR522V4u8BqO+Q==", "dev": true }, "node_modules/cypress/node_modules/ansi-styles": { @@ -20564,9 +20589,9 @@ } }, "@cypress/request": { - "version": "2.88.11", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.11.tgz", - "integrity": "sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -20582,9 +20607,9 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.10.3", + "qs": "6.10.4", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", + "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" }, @@ -20621,6 +20646,24 @@ "side-channel": "^1.0.4" } }, + "tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + } + }, + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -24124,14 +24167,14 @@ "dev": true }, "cypress": { - "version": "12.17.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.1.tgz", - "integrity": "sha512-eKfBgO6t8waEyhegL4gxD7tcI6uTCGttu+ZU7y9Hq8BlpMztd7iLeIF4AJFAnbZH1xjX+wwgg4cRKFNSvv3VWQ==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.1.0.tgz", + "integrity": "sha512-LUKxCYlB973QBFls1Up4FAE9QIYobT+2I8NvvAwMfQS2YwsWbr6yx7y9hmsk97iqbHkKwZW3MRjoK1RToBFVdQ==", "dev": true, "requires": { - "@cypress/request": "^2.88.11", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", + "@types/node": "^16.18.39", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -24164,6 +24207,7 @@ "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", "semver": "^7.5.3", @@ -24174,9 +24218,9 @@ }, "dependencies": { "@types/node": { - "version": "14.18.53", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.53.tgz", - "integrity": "sha512-soGmOpVBUq+gaBMwom1M+krC/NNbWlosh4AtGA03SyWNDiqSKtwp7OulO1M6+mg8YkHMvJ/y0AkCeO8d1hNb7A==", + "version": "16.18.48", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.48.tgz", + "integrity": "sha512-mlaecDKQ7rIZrYD7iiKNdzFb6e/qD5I9U1rAhq+Fd+DWvYVs+G2kv74UFHmSOlg5+i/vF3XxuR522V4u8BqO+Q==", "dev": true }, "ansi-styles": { diff --git a/package.json b/package.json index 701a2efc9f..727b8f025e 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "core-js": "^3.13.1", "coveralls": "^3.1.1", "css-loader": "^5.2.6", - "cypress": "^12.17.1", + "cypress": "^13.1.0", "enzyme": "^3.11.0", "enzyme-to-json": "^3.6.2", "esbuild-loader": "^3.0.1", From 1d6100111a0f3b609dadbd706354ce6125947df2 Mon Sep 17 00:00:00 2001 From: ckszabi Date: Mon, 11 Sep 2023 13:22:18 +0300 Subject: [PATCH 4/5] fix: style RefreshToken URL as in the authorization section Co-authored-by: szaszeke --- src/components/SecurityRequirement/OAuthFlow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SecurityRequirement/OAuthFlow.tsx b/src/components/SecurityRequirement/OAuthFlow.tsx index 6197a30e05..1c261e34ca 100644 --- a/src/components/SecurityRequirement/OAuthFlow.tsx +++ b/src/components/SecurityRequirement/OAuthFlow.tsx @@ -39,7 +39,7 @@ export function OAuthFlowComponent(props: OAuthFlowProps) { {flow!.refreshUrl && ( Refresh URL: - {flow!.refreshUrl} + {flow!.refreshUrl} )} {!!scopesNames.length && ( From 0e380892046804a37d6716324db8bcbedf6d7d1d Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Mon, 11 Sep 2023 13:31:28 +0300 Subject: [PATCH 5/5] chore: v2.1.2 (#2413) --- CHANGELOG.md | 10 ++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a29c8c7924..6e6f8bda7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [2.1.2](https://github.com/Redocly/redoc/compare/v2.1.1...v2.1.2) (2023-09-11) + + +### Bug Fixes + +* react18 cli integration ([#2404](https://github.com/Redocly/redoc/issues/2404)) ([76edc15](https://github.com/Redocly/redoc/commit/76edc159399150778b384be87ee958a93e5c491c)) +* style RefreshToken URL as in the authorization section ([1d61001](https://github.com/Redocly/redoc/commit/1d6100111a0f3b609dadbd706354ce6125947df2)) + + + ## [2.1.1](https://github.com/Redocly/redoc/compare/v2.1.0...v2.1.1) (2023-08-17) diff --git a/package-lock.json b/package-lock.json index 03fc878c0b..0db13108c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "redoc", - "version": "2.1.1", + "version": "2.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "redoc", - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "dependencies": { "@redocly/openapi-core": "^1.0.0-rc.2", diff --git a/package.json b/package.json index 727b8f025e..72528cbad0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redoc", - "version": "2.1.1", + "version": "2.1.2", "description": "ReDoc", "repository": { "type": "git",