import React, { Component } from "react" import PropTypes from "prop-types" import ImPropTypes from "react-immutable-proptypes" class OperationLink extends Component { render() { const { link, name, getComponent } = this.props const Markdown = getComponent("Markdown", true) let targetOp = link.get("operationId") || link.get("operationRef") let parameters = link.get("parameters") && link.get("parameters").toJS() let description = link.get("description") return
{name}
{ description ? Operation `{targetOp}`
Parameters {padString(0, JSON.stringify(parameters, null, 2)) || "{}"}