Skip to content

Commit

Permalink
Merge branch 'master' into bug/3256-example-value-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shockey committed Jun 27, 2017
2 parents de3046e + dbd7606 commit a2e6619
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 80 deletions.
80 changes: 40 additions & 40 deletions dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions dist/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-standalone-preset.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions dist/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions src/core/components/operation.jsx
@@ -1,11 +1,10 @@
import React, { PropTypes } from "react"
import shallowCompare from "react-addons-shallow-compare"
import React, { PureComponent, PropTypes } from "react"
import { getList } from "core/utils"
import * as CustomPropTypes from "core/proptypes"

//import "less/opblock"

export default class Operation extends React.Component {
export default class Operation extends PureComponent {
static propTypes = {
path: PropTypes.string.isRequired,
method: PropTypes.string.isRequired,
Expand Down Expand Up @@ -70,10 +69,6 @@ export default class Operation extends React.Component {
}
}

shouldComponentUpdate(props, state) {
return shallowCompare(this, props, state)
}

toggleShown =() => {
let { layoutActions, isShownKey } = this.props
layoutActions.show(isShownKey, !this.isShown())
Expand Down
9 changes: 2 additions & 7 deletions src/core/components/param-body.jsx
@@ -1,11 +1,10 @@
import React, { Component, PropTypes } from "react"
import shallowCompare from "react-addons-shallow-compare"
import React, { PureComponent, PropTypes } from "react"
import { fromJS, List } from "immutable"
import { getSampleSchema } from "core/utils"

const NOOP = Function.prototype

export default class ParamBody extends Component {
export default class ParamBody extends PureComponent {

static propTypes = {
param: PropTypes.object,
Expand Down Expand Up @@ -41,10 +40,6 @@ export default class ParamBody extends Component {
this.updateValues.call(this, this.props)
}

shouldComponentUpdate(props, state) {
return shallowCompare(this, props, state)
}

componentWillReceiveProps(nextProps) {
this.updateValues.call(this, nextProps)
}
Expand Down
9 changes: 2 additions & 7 deletions src/core/json-schema-components.js
@@ -1,5 +1,4 @@
import React, { PropTypes, Component } from "react"
import shallowCompare from "react-addons-shallow-compare"
import React, { PropTypes, PureComponent, Component } from "react"
import { List, fromJS } from "immutable"
//import "less/json-schema-form"

Expand Down Expand Up @@ -74,7 +73,7 @@ export class JsonSchema_string extends Component {
}
}

export class JsonSchema_array extends Component {
export class JsonSchema_array extends PureComponent {

static propTypes = JsonSchemaPropShape
static defaultProps = JsonSchemaDefaultProps
Expand All @@ -89,10 +88,6 @@ export class JsonSchema_array extends Component {
this.setState({value: props.value})
}

shouldComponentUpdate(props, state) {
return shallowCompare(this, props, state)
}

onChange = () => this.props.onChange(this.state.value)

onItemChange = (itemVal, i) => {
Expand Down
4 changes: 4 additions & 0 deletions src/core/plugins/samples/fn.js
Expand Up @@ -74,6 +74,10 @@ export const sampleFromSchema = (schema, config={}) => {
return normalizeArray(schema["enum"])[0]
}

if (type === "file") {
return
}

return primitive(schema)
}

Expand Down

0 comments on commit a2e6619

Please sign in to comment.