From 9d80da4a6fb8a5220f490fc0ff5ebb836f433d19 Mon Sep 17 00:00:00 2001 From: Cameron Koegel Date: Fri, 9 Sep 2022 10:06:40 -0400 Subject: [PATCH] feature: add unique className for components --- src/components/Callbacks/CallbacksList.tsx | 2 +- src/components/Endpoint/Endpoint.tsx | 2 +- src/components/Operation/Operation.tsx | 7 ++++--- src/components/Parameters/ParametersGroup.tsx | 2 +- src/components/Responses/ResponsesList.tsx | 2 +- src/components/SecurityRequirement/SecurityRequirement.tsx | 2 +- .../__snapshots__/SecurityRequirement.test.tsx.snap | 4 ++-- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/Callbacks/CallbacksList.tsx b/src/components/Callbacks/CallbacksList.tsx index 8ef40654..6409d1c0 100644 --- a/src/components/Callbacks/CallbacksList.tsx +++ b/src/components/Callbacks/CallbacksList.tsx @@ -17,7 +17,7 @@ export class CallbacksList extends React.PureComponent { } return ( -
+
Callbacks {callbacks.map(callback => { return callback.operations.map((operation, index) => { diff --git a/src/components/Endpoint/Endpoint.tsx b/src/components/Endpoint/Endpoint.tsx index 9579eeca..946107aa 100644 --- a/src/components/Endpoint/Endpoint.tsx +++ b/src/components/Endpoint/Endpoint.tsx @@ -48,7 +48,7 @@ export class Endpoint extends React.Component { return ( {options => ( - + {operation.httpVerb} diff --git a/src/components/Operation/Operation.tsx b/src/components/Operation/Operation.tsx index b6904f62..c8031914 100644 --- a/src/components/Operation/Operation.tsx +++ b/src/components/Operation/Operation.tsx @@ -36,7 +36,7 @@ export const Operation = observer(({ operation }: OperationProps): JSX.Element = {options => ( -

+

{summary} {deprecated && Deprecated } {isWebhook && ( @@ -50,12 +50,13 @@ export const Operation = observer(({ operation }: OperationProps): JSX.Element = )} {hasDescription && ( - + {description !== undefined && } {externalDocs && } )} - + {' '} + {/*TODO: className="operation-extensions"*/} diff --git a/src/components/Parameters/ParametersGroup.tsx b/src/components/Parameters/ParametersGroup.tsx index 99cf32c1..68b3503f 100644 --- a/src/components/Parameters/ParametersGroup.tsx +++ b/src/components/Parameters/ParametersGroup.tsx @@ -21,7 +21,7 @@ export class ParametersGroup extends React.PureComponent +
{place} Parameters diff --git a/src/components/Responses/ResponsesList.tsx b/src/components/Responses/ResponsesList.tsx index e578a1cf..30447fd7 100644 --- a/src/components/Responses/ResponsesList.tsx +++ b/src/components/Responses/ResponsesList.tsx @@ -26,7 +26,7 @@ export class ResponsesList extends React.PureComponent { } return ( -
+
{isCallback ? l('callbackResponses') : l('responses')} {responses.map(response => { return ; diff --git a/src/components/SecurityRequirement/SecurityRequirement.tsx b/src/components/SecurityRequirement/SecurityRequirement.tsx index ca8e27a7..cbc39825 100644 --- a/src/components/SecurityRequirement/SecurityRequirement.tsx +++ b/src/components/SecurityRequirement/SecurityRequirement.tsx @@ -37,7 +37,7 @@ export function SecurityRequirements(props: SecurityRequirementsProps) { return ( <> - + setExpanded(!expanded)}> Authorizations: diff --git a/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap b/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap index 506b6dd9..df305f3c 100644 --- a/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap @@ -10,10 +10,10 @@ OAuth2 is also a safer and more secure way to give you access.

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