Merge branch 'master' into bug/3447-write-only

This commit is contained in:
Kyle
2017-08-10 17:16:51 -07:00
committed by GitHub
41 changed files with 2607 additions and 111 deletions

View File

@@ -4,19 +4,24 @@ import ImPropTypes from "react-immutable-proptypes"
class OperationLink extends Component {
render() {
const { link, name } = this.props
const { link, name, getComponent } = this.props
const Markdown = getComponent("Markdown")
let targetOp = link.get("operationId") || link.get("operationRef")
let parameters = link.get("parameters") && link.get("parameters").toJS()
let description = link.get("description")
return <span>
<div style={{ padding: "5px 2px" }}>{name}{description ? `: ${description}` : ""}</div>
return <div style={{ marginBottom: "1.5em" }}>
<div style={{ marginBottom: ".5em" }}>
<b><code>{name}</code></b>
{ description ? <Markdown source={description}></Markdown> : null }
</div>
<pre>
Operation `{targetOp}`<br /><br />
Parameters {padString(0, JSON.stringify(parameters, null, 2)) || "{}"}<br />
</pre>
</span>
</div>
}
}
@@ -30,6 +35,7 @@ function padString(n, string) {
}
OperationLink.propTypes = {
getComponent: PropTypes.func.isRequired,
link: ImPropTypes.orderedMap.isRequired,
name: PropTypes.String
}

View File

@@ -3,7 +3,6 @@ import PropTypes from "prop-types"
import { OAS3ComponentWrapFactory } from "../helpers"
import { Model } from "core/components/model"
class ModelComponent extends Component {
static propTypes = {
schema: PropTypes.object.isRequired,