Use operationIds from swagger-js if available, in layout triggers

This commit is contained in:
Kyle Shockey
2017-07-13 22:48:12 -07:00
parent 0eeb52b4b5
commit c051952081

View File

@@ -80,8 +80,9 @@ export default class Operations extends React.Component {
<Collapse isOpened={showTag}>
{
operations.map( op => {
const isShownKey = ["operations", op.get("id"), tag]
const operationId =
op.getIn(["operation", "__originalOperationId"]) || op.getIn(["operation", "operationId"]) || op.get("id")
const isShownKey = ["operations", operationId, tag]
const path = op.get("path", "")
const method = op.get("method", "")
const jumpToKey = `paths.${path}.${method}`