Skip to content

Commit 35013d0

Browse files
committed
Merge branch 'master' of github.com:swagger-api/swagger-ui
2 parents 31bf1d3 + 26cab61 commit 35013d0

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

src/core/components/response.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ export default class Response extends React.Component {
122122

123123

124124
</td>
125-
{specSelectors.isOAS3() ? <td>
125+
{specSelectors.isOAS3() ? <td className="col response-col_links">
126126
{ links ?
127127
links.toSeq().map((link, key) => {
128-
return <OperationLink key={key} name={key} link={ link }/>
128+
return <OperationLink key={key} name={key} link={ link } getComponent={getComponent}/>
129129
})
130130
: <i>No links</i>}
131131
</td> : null}

src/core/components/responses.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default class Responses extends React.Component {
6868
<tr className="responses-header">
6969
<td className="col col_header response-col_status">Code</td>
7070
<td className="col col_header response-col_description">Description</td>
71-
{ specSelectors.isOAS3() ? <td className="col col_header response-col_description">Links</td> : null }
71+
{ specSelectors.isOAS3() ? <td className="col col_header response-col_links">Links</td> : null }
7272
</tr>
7373
</thead>
7474
<tbody>

src/core/plugins/oas3/components/operation-link.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import ImPropTypes from "react-immutable-proptypes"
44

55
class OperationLink extends Component {
66
render() {
7-
const { link, name } = this.props
7+
const { link, name, getComponent } = this.props
8+
9+
const Markdown = getComponent("Markdown")
810

911
let targetOp = link.get("operationId") || link.get("operationRef")
1012
let parameters = link.get("parameters") && link.get("parameters").toJS()
@@ -33,6 +35,7 @@ function padString(n, string) {
3335
}
3436

3537
OperationLink.propTypes = {
38+
getComponent: PropTypes.func.isRequired,
3639
link: ImPropTypes.orderedMap.isRequired,
3740
name: PropTypes.String
3841
}

src/style/_layout.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,22 @@
522522
}
523523
}
524524

525+
.response-col_links
526+
{
527+
padding-left: 2em;
528+
max-width: 40em;
529+
font-size: 14px;
530+
531+
@include text_body();
532+
533+
.response-undocumented
534+
{
535+
font-size: 11px;
536+
537+
@include text_code(#999);
538+
}
539+
}
540+
525541
.response-col_description__inner
526542
{
527543
span

src/style/_table.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ table
5252

5353
&:first-of-type
5454
{
55-
width: 20%;
55+
max-width: 20%;
56+
min-width: 6em;
5657
padding: 10px 0;
5758
}
5859
}

0 commit comments

Comments
 (0)