From 7cc9f9a4db7fda308f31d8c9006813b0cb7e0353 Mon Sep 17 00:00:00 2001 From: Owen Conti Date: Sun, 20 Aug 2017 07:57:07 -0600 Subject: [PATCH] Update Operations component to call OperationContainer instead of Operation.jsx --- src/core/components/operations.jsx | 33 ++++-------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/src/core/components/operations.jsx b/src/core/components/operations.jsx index ef1d4248..724c82f9 100644 --- a/src/core/components/operations.jsx +++ b/src/core/components/operations.jsx @@ -1,8 +1,5 @@ import React from "react" import PropTypes from "prop-types" -import { helpers } from "swagger-client" - -const { opId } = helpers export default class Operations extends React.Component { @@ -32,7 +29,7 @@ export default class Operations extends React.Component { let taggedOps = specSelectors.taggedOperations() - const Operation = getComponent("operation") + const Operation = getComponent("OperationContainer", true) const Collapse = getComponent("Collapse") let showSummary = layoutSelectors.showSummary() @@ -117,42 +114,20 @@ export default class Operations extends React.Component { { operations.map( op => { - - const path = op.get("path", "") - const method = op.get("method", "") - const jumpToKey = `paths.${path}.${method}` - - const operationId = - op.getIn(["operation", "operationId"]) || op.getIn(["operation", "__originalOperationId"]) || opId(op.get("operation"), path, method) || op.get("id") - const isShownKey = ["operations", tag, operationId] - - const allowTryItOut = specSelectors.allowTryItOutFor(op.get("path"), op.get("method")) - const response = specSelectors.responseFor(op.get("path"), op.get("method")) - const request = specSelectors.requestFor(op.get("path"), op.get("method")) - return