Linter & test harness fixes

This commit is contained in:
Kyle Shockey
2017-12-07 17:07:30 -08:00
parent bfb4c7a8d7
commit 60ee667688
3 changed files with 6 additions and 2 deletions

View File

@@ -22,6 +22,8 @@ export default class ObjectModel extends Component {
let { schema, name, isRef, getComponent, getConfigs, depth, specPath, expandDepth, ...otherProps } = this.props let { schema, name, isRef, getComponent, getConfigs, depth, specPath, expandDepth, ...otherProps } = this.props
let { specSelectors } = otherProps let { specSelectors } = otherProps
const { isOAS3 } = specSelectors
if(!schema) { if(!schema) {
return null return null
} }

View File

@@ -59,7 +59,6 @@ export default class Operation extends PureComponent {
let { let {
isShown, isShown,
isAuthorized, isAuthorized,
jumpToKey,
path, path,
method, method,
op, op,
@@ -114,8 +113,10 @@ export default class Operation extends PureComponent {
let onChangeKey = [ path, method ] // Used to add values to _this_ operation ( indexed by path and method ) let onChangeKey = [ path, method ] // Used to add values to _this_ operation ( indexed by path and method )
return ( return (
<div className={`opblock-summary opblock-summary-${method}`} onClick={toggleShown} >
{/*TODO: convert this into a component, that can be wrapped
and pulled in with getComponent */}
<div className={deprecated ? "opblock opblock-deprecated" : isShown ? `opblock opblock-${method} is-open` : `opblock opblock-${method}`} id={isShownKey.join("-")} > <div className={deprecated ? "opblock opblock-deprecated" : isShown ? `opblock opblock-${method} is-open` : `opblock opblock-${method}`} id={isShownKey.join("-")} >
<div className={`opblock-summary opblock-summary-${method}`} onClick={toggleShown} > /*TODO: convert this into a component, that can be wrapped and pulled in with getComponent */}
<span className="opblock-summary-method">{method.toUpperCase()}</span> <span className="opblock-summary-method">{method.toUpperCase()}</span>
<span className={ deprecated ? "opblock-summary-path__deprecated" : "opblock-summary-path" } > <span className={ deprecated ? "opblock-summary-path__deprecated" : "opblock-summary-path" } >
<a <a

View File

@@ -25,6 +25,7 @@ describe("<ObjectModel />", function() {
} }
}, },
isRef : false, isRef : false,
specPath: [],
schema: Immutable.fromJS( schema: Immutable.fromJS(
{ {
"properties": { "properties": {