feat(ux): add copy to clipboard to operation summary (#8094)

This commit is contained in:
Tomas Bruckner
2022-07-18 19:48:57 +02:00
committed by GitHub
parent 6707f247cc
commit 0d5227bb5d
6 changed files with 47 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ export default class OperationSummary extends PureComponent {
const OperationSummaryMethod = getComponent("OperationSummaryMethod")
const OperationSummaryPath = getComponent("OperationSummaryPath")
const JumpToPath = getComponent("JumpToPath", true)
const CopyToClipboardBtn = getComponent("CopyToClipboardBtn", true)
const hasSecurity = security && !!security.count()
const securityIsOptional = hasSecurity && security.size === 1 && security.first().isEmpty()
@@ -96,6 +97,7 @@ export default class OperationSummary extends PureComponent {
}}
/>
}
<CopyToClipboardBtn textToCopy={`${specPath.get(1)}`} />
<JumpToPath path={specPath} />{/* TODO: use wrapComponents here, swagger-ui doesn't care about jumpToPath */}
</div>
)