Skip to content

Commit 35733b5

Browse files
committed
Indicate parameter deprecation
1 parent 2733205 commit 35733b5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/core/components/parameter-row.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export default class ParameterRow extends Component {
5858
render() {
5959
let {param, onChange, getComponent, isExecute, fn, onChangeConsumes, specSelectors, pathMethod} = this.props
6060

61+
let { isOAS3 } = specSelectors
62+
6163
// const onChangeWrapper = (value) => onChange(param, value)
6264
const JsonSchemaForm = getComponent("JsonSchemaForm")
6365
const ParamBody = getComponent("ParamBody")
@@ -95,6 +97,9 @@ export default class ParameterRow extends Component {
9597
{ !required ? null : <span style={{color: "red"}}>&nbsp;*</span> }
9698
</div>
9799
<div className="parameter__type">{ param.get("type") } { itemType && `[${itemType}]` }</div>
100+
<div className="parameter__deprecated">
101+
{ isOAS3 && isOAS3() && param.get("deprecated") ? "deprecated": null }
102+
</div>
98103
<div className="parameter__in">({ param.get("in") })</div>
99104
</td>
100105

src/style/_table.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ table
138138
@include text_code(#888);
139139
}
140140

141+
.parameter__deprecated
142+
{
143+
font-size: 12px;
144+
font-style: italic;
145+
146+
@include text_code(#f00);
147+
}
148+
141149

142150
.table-container
143151
{

0 commit comments

Comments
 (0)