Skip to content

Commit ad8bad6

Browse files
author
Ron
authored
Merge pull request #3508 from shockey/ft/3397-tags-external-docs
Display tag externalDocs
2 parents ad4cec0 + 7c84676 commit ad8bad6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/core/components/operations.jsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ export default class Operations extends React.Component {
6666
taggedOps.map( (tagObj, tag) => {
6767
let operations = tagObj.get("operations")
6868
let tagDescription = tagObj.getIn(["tagDetails", "description"], null)
69+
let tagExternalDocsDescription = tagObj.getIn(["tagDetails", "externalDocs", "description"])
70+
let tagExternalDocsUrl = tagObj.getIn(["tagDetails", "externalDocs", "url"])
6971

7072
let isShownKey = ["operations-tag", tag]
7173
let showTag = layoutSelectors.isShown(isShownKey, docExpansion === "full" || docExpansion === "list")
@@ -89,6 +91,22 @@ export default class Operations extends React.Component {
8991
</small>
9092
}
9193

94+
<div>
95+
{ !tagExternalDocsDescription ? null :
96+
<small>
97+
{ tagExternalDocsDescription }
98+
{ tagExternalDocsUrl ? ": " : null }
99+
{ tagExternalDocsUrl ?
100+
<a
101+
href={tagExternalDocsUrl}
102+
onClick={(e) => e.stopPropagation()}
103+
target={"_blank"}
104+
>{tagExternalDocsUrl}</a> : null
105+
}
106+
</small>
107+
}
108+
</div>
109+
92110
<button className="expand-operation" title="Expand operation" onClick={() => layoutActions.show(isShownKey, !showTag)}>
93111
<svg className="arrow" width="20" height="20">
94112
<use xlinkHref={showTag ? "#large-arrow-down" : "#large-arrow"} />

0 commit comments

Comments
 (0)