diff --git a/src/core/components/response.jsx b/src/core/components/response.jsx index 95602c64d215962f271fe80c0ffc7874b4ea3c15..9d30849d8a7bd5b3cabfe80f6b0196fe4b4b8ae4 100644 --- a/src/core/components/response.jsx +++ b/src/core/components/response.jsx @@ -122,10 +122,10 @@ export default class Response extends React.Component { - {specSelectors.isOAS3() ? + {specSelectors.isOAS3() ? { links ? links.toSeq().map((link, key) => { - return + return }) : No links} : null} diff --git a/src/core/components/responses.jsx b/src/core/components/responses.jsx index 1c00ff1aa8eaa3cd97cd9ace81c5a10e7790231b..88ab0c92b3420a302e214bd3fb3b9612b140ab0f 100644 --- a/src/core/components/responses.jsx +++ b/src/core/components/responses.jsx @@ -68,7 +68,7 @@ export default class Responses extends React.Component { Code Description - { specSelectors.isOAS3() ? Links : null } + { specSelectors.isOAS3() ? Links : null } diff --git a/src/core/plugins/oas3/components/operation-link.jsx b/src/core/plugins/oas3/components/operation-link.jsx index 6f9eef0aa43662d98762d5bd77c5903cd06e4a7c..f6fe3ac35ef081df517dd1bad47011847af7f114 100644 --- a/src/core/plugins/oas3/components/operation-link.jsx +++ b/src/core/plugins/oas3/components/operation-link.jsx @@ -4,14 +4,19 @@ import ImPropTypes from "react-immutable-proptypes" class OperationLink extends Component { render() { - const { link, name } = this.props + const { link, name, getComponent } = this.props + + const Markdown = getComponent("Markdown") let targetOp = link.get("operationId") || link.get("operationRef") let parameters = link.get("parameters") && link.get("parameters").toJS() let description = link.get("description") return -
{name}{description ? `: ${description}` : ""}
+
+ {name} + { description ? : null } +
         Operation `{targetOp}`

Parameters {padString(0, JSON.stringify(parameters, null, 2)) || "{}"}
@@ -30,6 +35,7 @@ function padString(n, string) { } OperationLink.propTypes = { + getComponent: PropTypes.func.isRequired, link: ImPropTypes.orderedMap.isRequired, name: PropTypes.String } diff --git a/src/style/_layout.scss b/src/style/_layout.scss index b99064d1acde9610b0b31678775abbfb43967fea..9ee357f0d2e818112ab07e75110cf02d155e1861 100644 --- a/src/style/_layout.scss +++ b/src/style/_layout.scss @@ -522,6 +522,22 @@ } } +.response-col_links +{ + padding-left: 2em; + max-width: 40em; + font-size: 14px; + + @include text_body(); + + .response-undocumented + { + font-size: 11px; + + @include text_code(#999); + } +} + .response-col_description__inner { span diff --git a/src/style/_table.scss b/src/style/_table.scss index cfec861ae59d1bf8319bd757e96d7c8645c61792..7f0655292b6182e3b282852819f1b7e54c2314a8 100644 --- a/src/style/_table.scss +++ b/src/style/_table.scss @@ -52,7 +52,8 @@ table &:first-of-type { - width: 20%; + max-width: 20%; + min-width: 6em; padding: 10px 0; } }