diff --git a/src/core/components/auth/auth-item.jsx b/src/core/components/auth/auth-item.jsx index cffc8147539..ab58b00124d 100644 --- a/src/core/components/auth/auth-item.jsx +++ b/src/core/components/auth/auth-item.jsx @@ -4,10 +4,12 @@ import ImPropTypes from "react-immutable-proptypes" export default class Auths extends React.Component { static propTypes = { + authorized: ImPropTypes.orderedMap.isRequired, schema: ImPropTypes.orderedMap.isRequired, name: PropTypes.string.isRequired, + getComponent: PropTypes.func.isRequired, onAuthChange: PropTypes.func.isRequired, - authorized: ImPropTypes.orderedMap.isRequired + errSelectors: PropTypes.object.isRequired, } render() { @@ -51,12 +53,4 @@ export default class Auths extends React.Component { ) } - static propTypes = { - errSelectors: PropTypes.object.isRequired, - getComponent: PropTypes.func.isRequired, - authSelectors: PropTypes.object.isRequired, - specSelectors: PropTypes.object.isRequired, - authActions: PropTypes.object.isRequired, - definitions: ImPropTypes.iterable.isRequired - } } diff --git a/src/core/components/auth/auths.jsx b/src/core/components/auth/auths.jsx index 62a9bd61e9d..c2a51ead9c1 100644 --- a/src/core/components/auth/auths.jsx +++ b/src/core/components/auth/auths.jsx @@ -4,10 +4,11 @@ import ImPropTypes from "react-immutable-proptypes" export default class Auths extends React.Component { static propTypes = { - definitions: PropTypes.object.isRequired, + definitions: ImPropTypes.iterable.isRequired, getComponent: PropTypes.func.isRequired, authSelectors: PropTypes.object.isRequired, authActions: PropTypes.object.isRequired, + errSelectors: PropTypes.object.isRequired, specSelectors: PropTypes.object.isRequired } @@ -119,12 +120,4 @@ export default class Auths extends React.Component { ) } - static propTypes = { - errSelectors: PropTypes.object.isRequired, - getComponent: PropTypes.func.isRequired, - authSelectors: PropTypes.object.isRequired, - specSelectors: PropTypes.object.isRequired, - authActions: PropTypes.object.isRequired, - definitions: ImPropTypes.iterable.isRequired - } } diff --git a/src/core/components/auth/basic-auth.jsx b/src/core/components/auth/basic-auth.jsx index 26cd5c7f2c7..baa5268ffc9 100644 --- a/src/core/components/auth/basic-auth.jsx +++ b/src/core/components/auth/basic-auth.jsx @@ -4,10 +4,12 @@ import ImPropTypes from "react-immutable-proptypes" export default class BasicAuth extends React.Component { static propTypes = { - authorized: PropTypes.object, + authorized: ImPropTypes.map, + schema: ImPropTypes.map, getComponent: PropTypes.func.isRequired, - schema: PropTypes.object.isRequired, - onChange: PropTypes.func.isRequired + onChange: PropTypes.func.isRequired, + name: PropTypes.string.isRequired, + errSelectors: PropTypes.object.isRequired, } constructor(props, context) { @@ -89,12 +91,4 @@ export default class BasicAuth extends React.Component { ) } - static propTypes = { - name: PropTypes.string.isRequired, - errSelectors: PropTypes.object.isRequired, - getComponent: PropTypes.func.isRequired, - onChange: PropTypes.func, - schema: ImPropTypes.map, - authorized: ImPropTypes.map - } } diff --git a/src/core/components/headers.jsx b/src/core/components/headers.jsx index 36c94dc5dcd..c717b61e571 100644 --- a/src/core/components/headers.jsx +++ b/src/core/components/headers.jsx @@ -8,7 +8,7 @@ export default class Headers extends React.Component { static propTypes = { headers: PropTypes.object.isRequired, getComponent: PropTypes.func.isRequired - }; + } render() { let { headers, getComponent } = this.props diff --git a/src/core/components/live-response.jsx b/src/core/components/live-response.jsx index afcc5bfb2e6..dc85f535396 100644 --- a/src/core/components/live-response.jsx +++ b/src/core/components/live-response.jsx @@ -1,7 +1,6 @@ import React from "react" import PropTypes from "prop-types" import ImPropTypes from "react-immutable-proptypes" -import { Iterable } from "immutable" const Headers = ( { headers } )=>{ return ( @@ -29,7 +28,7 @@ Duration.propTypes = { export default class LiveResponse extends React.Component { static propTypes = { - response: PropTypes.instanceOf(Iterable).isRequired, + response: ImPropTypes.map, path: PropTypes.string.isRequired, method: PropTypes.string.isRequired, displayRequestDuration: PropTypes.bool.isRequired, @@ -130,9 +129,4 @@ export default class LiveResponse extends React.Component { ) } - - static propTypes = { - getComponent: PropTypes.func.isRequired, - response: ImPropTypes.map - } } diff --git a/src/core/components/operations.jsx b/src/core/components/operations.jsx index 0b0836a6af6..d5de287d201 100644 --- a/src/core/components/operations.jsx +++ b/src/core/components/operations.jsx @@ -23,7 +23,7 @@ export default class Operations extends React.Component { authSelectors: PropTypes.object.isRequired, getConfigs: PropTypes.func.isRequired, fn: PropTypes.func.isRequired - }; + } render() { let { diff --git a/src/core/components/param-body.jsx b/src/core/components/param-body.jsx index af70f9234bd..f96c75b9a40 100644 --- a/src/core/components/param-body.jsx +++ b/src/core/components/param-body.jsx @@ -20,14 +20,14 @@ export default class ParamBody extends PureComponent { isExecute: PropTypes.bool, specSelectors: PropTypes.object.isRequired, pathMethod: PropTypes.array.isRequired - }; + } static defaultProp = { consumes: fromJS(["application/json"]), param: fromJS({}), onChange: NOOP, onChangeConsumes: NOOP, - }; + } constructor(props, context) { super(props, context) diff --git a/src/core/components/response.jsx b/src/core/components/response.jsx index 767382a6abe..dbf2bfc00a9 100644 --- a/src/core/components/response.jsx +++ b/src/core/components/response.jsx @@ -54,7 +54,7 @@ export default class Response extends React.Component { static defaultProps = { response: fromJS({}), onContentTypeChange: () => {} - }; + } _onContentTypeChange = (value) => { const { onContentTypeChange, controlsAcceptHeader } = this.props diff --git a/src/core/components/try-it-out-button.jsx b/src/core/components/try-it-out-button.jsx index 029cf5b12e6..176ce314c81 100644 --- a/src/core/components/try-it-out-button.jsx +++ b/src/core/components/try-it-out-button.jsx @@ -10,7 +10,7 @@ export default class TryItOutButton extends React.Component { enabled: PropTypes.bool, // Try it out is enabled, ie: the user has access to the form hasUserEditedBody: PropTypes.bool, // Try it out is enabled, ie: the user has access to the form isOAS3: PropTypes.bool, // Try it out is enabled, ie: the user has access to the form - }; + } static defaultProps = { onTryoutClick: Function.prototype, @@ -19,7 +19,7 @@ export default class TryItOutButton extends React.Component { enabled: false, hasUserEditedBody: false, isOAS3: false, - }; + } render() { const { onTryoutClick, onCancelClick, onResetClick, enabled, hasUserEditedBody, isOAS3 } = this.props diff --git a/src/core/plugins/oas3/components/request-body-editor.jsx b/src/core/plugins/oas3/components/request-body-editor.jsx index 6331c1c0592..dd82aeb036e 100644 --- a/src/core/plugins/oas3/components/request-body-editor.jsx +++ b/src/core/plugins/oas3/components/request-body-editor.jsx @@ -13,12 +13,12 @@ export default class RequestBodyEditor extends PureComponent { value: PropTypes.string, defaultValue: PropTypes.string, errors: PropTypes.array, - }; + } static defaultProps = { onChange: NOOP, userHasEditedBody: false, - }; + } constructor(props, context) { super(props, context)