{/*TODO: convert this into a component, that can be wrapped and pulled in with getComponent */}
{method.toUpperCase()}
{path}
-
+ {/*TODO: use wrapComponents here, swagger-ui doesn't care about jumpToPath */}
{ !showSummary ? null :
@@ -213,6 +213,7 @@ export default class Operation extends PureComponent {
}
}
diff --git a/src/core/components/operations.jsx b/src/core/components/operations.jsx
index 6d760d53..a250b5af 100644
--- a/src/core/components/operations.jsx
+++ b/src/core/components/operations.jsx
@@ -123,7 +123,7 @@ export default class Operations extends React.Component {
const path = op.get("path", "")
const method = op.get("method", "")
- const jumpToKey = `paths.${path}.${method}`
+ const specPath = ["paths", path, method]
const operationId =
op.getIn(["operation", "operationId"]) || op.getIn(["operation", "__originalOperationId"]) || opId(op.get("operation"), path, method) || op.get("id")
@@ -137,7 +137,7 @@ export default class Operations extends React.Component {
{...op.toObject()}
isShownKey={isShownKey}
- jumpToKey={jumpToKey}
+ specPath={specPath}
showSummary={showSummary}
key={isShownKey}
response={ response }
diff --git a/src/core/components/parameter-row.jsx b/src/core/components/parameter-row.jsx
index 71a2765a..9315c9cf 100644
--- a/src/core/components/parameter-row.jsx
+++ b/src/core/components/parameter-row.jsx
@@ -13,7 +13,8 @@ export default class ParameterRow extends Component {
onChangeConsumes: PropTypes.func.isRequired,
specSelectors: PropTypes.object.isRequired,
pathMethod: PropTypes.array.isRequired,
- getConfigs: PropTypes.func.isRequired
+ getConfigs: PropTypes.func.isRequired,
+ specPath: PropTypes.array.isRequired,
}
constructor(props, context) {
@@ -68,7 +69,7 @@ export default class ParameterRow extends Component {
}
render() {
- let {param, onChange, getComponent, getConfigs, isExecute, fn, onChangeConsumes, specSelectors, pathMethod} = this.props
+ let {param, onChange, getComponent, getConfigs, isExecute, fn, onChangeConsumes, specSelectors, pathMethod, specPath} = this.props
let { isOAS3 } = specSelectors
diff --git a/src/core/components/parameters.jsx b/src/core/components/parameters.jsx
index b09ece50..b6286787 100644
--- a/src/core/components/parameters.jsx
+++ b/src/core/components/parameters.jsx
@@ -20,7 +20,8 @@ export default class Parameters extends Component {
onCancelClick: PropTypes.func,
onChangeKey: PropTypes.array,
pathMethod: PropTypes.array.isRequired,
- getConfigs: PropTypes.func.isRequired
+ getConfigs: PropTypes.func.isRequired,
+ specPath: PropTypes.array.isRequired,
}
@@ -30,6 +31,7 @@ export default class Parameters extends Component {
tryItOutEnabled: false,
allowTryItOut: true,
onChangeKey: [],
+ specPath: [],
}
onChange = ( param, value, isXml ) => {
@@ -58,6 +60,7 @@ export default class Parameters extends Component {
parameters,
allowTryItOut,
tryItOutEnabled,
+ specPath,
fn,
getComponent,
@@ -92,8 +95,10 @@ export default class Parameters extends Component {
{
- eachMap(parameters, (parameter) => (
- (
+
{
responses.entrySeq().map( ([code, response]) => {
+
let className = tryItOutResponse && tryItOutResponse.get("status") == code ? "response_current" : ""
return (