File tree Expand file tree Collapse file tree 11 files changed +81
-15
lines changed Expand file tree Collapse file tree 11 files changed +81
-15
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ We love contributions from our community of users! This document explains our gu
44
55#### Environment setup
66
7- 0 . Install Node.js (4 or newer) and npm (3 or newer).
7+ 0 . Install Node.js (6 or newer) and npm (3 or newer).
881 . Make a fork of Swagger-UI on GitHub, then clone your fork to your machine.
992 . Run ` npm install ` in your Swagger-UI directory.
10103 . Run ` npm run dev ` . ` localhost:3200 ` should open automatically.
Original file line number Diff line number Diff line change 6161 "react-addons-perf" : " ^15.4.0" ,
6262 "react-addons-shallow-compare" : " 0.14.8" ,
6363 "react-addons-test-utils" : " ^15.6.2" ,
64- "react-collapse" : " 2.3.1 " ,
64+ "react-collapse" : " ^4.0.3 " ,
6565 "react-dom" : " ^15.6.2" ,
6666 "react-height" : " ^2.0.0" ,
6767 "react-hot-loader" : " 1.3.1" ,
6868 "react-immutable-proptypes" : " 2.1.0" ,
6969 "react-markdown" : " ^2.5.0" ,
70- "react-motion" : " 0.4.4 " ,
70+ "react-motion" : " ^0.5.2 " ,
7171 "react-object-inspector" : " 0.2.1" ,
7272 "react-redux" : " ^4.x.x" ,
7373 "react-split-pane" : " 0.1.57" ,
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export default class ContentType extends React.Component {
3737
3838 return (
3939 < div className = { "content-type-wrapper " + ( className || "" ) } >
40- < select className = "content-type" value = { value } onChange = { this . onChangeWrapper } >
40+ < select className = "content-type" value = { value || "" } onChange = { this . onChangeWrapper } >
4141 { contentTypes . map ( ( val ) => {
4242 return < option key = { val } value = { val } > { val } </ option >
4343 } ) . toArray ( ) }
Original file line number Diff line number Diff line change 11import React from "react"
22import PropTypes from "prop-types"
3- import Collapse from "react-collapse"
3+ import { Collapse } from "react-collapse"
44import { presets } from "react-motion"
55import ObjectInspector from "react-object-inspector"
66import Perf from "react-addons-perf"
Original file line number Diff line number Diff line change 11import React from "react"
22import PropTypes from "prop-types"
33import { List } from "immutable"
4- import Collapse from "react-collapse"
4+ import { Collapse } from "react-collapse"
55
66export default class Errors extends React . Component {
77
Original file line number Diff line number Diff line change 11import React from "react"
22import PropTypes from "prop-types"
3- import OriCollapse from "react-collapse"
3+ import { Collapse as OriCollapse } from "react-collapse"
44
55function xclass ( ...args ) {
66 return args . filter ( a => ! ! a ) . join ( " " ) . trim ( )
Original file line number Diff line number Diff line change 1- import React , { Component } from "react"
1+ import React , { PureComponent } from "react"
22import PropTypes from "prop-types"
33
4- export default class Model extends Component {
4+ export default class Model extends PureComponent {
55 static propTypes = {
66 schema : PropTypes . object . isRequired ,
77 getComponent : PropTypes . func . isRequired ,
@@ -35,7 +35,7 @@ export default class Model extends Component {
3535 const PrimitiveModel = getComponent ( "PrimitiveModel" )
3636 let type = "object"
3737 let $$ref = schema && schema . get ( "$$ref" )
38-
38+
3939 // If we weren't passed a `name` but have a ref, grab the name from the ref
4040 if ( ! name && $$ref ) {
4141 name = this . getModelName ( $$ref )
@@ -44,11 +44,11 @@ export default class Model extends Component {
4444 if ( ! schema && $$ref ) {
4545 schema = this . getRefSchema ( name )
4646 }
47-
47+
4848 const deprecated = specSelectors . isOAS3 ( ) && schema . get ( "deprecated" )
4949 isRef = isRef !== undefined ? isRef : ! ! $$ref
5050 type = schema && schema . get ( "type" ) || type
51-
51+
5252 switch ( type ) {
5353 case "object" :
5454 return < ObjectModel
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ RequestBody.propTypes = {
5050 getComponent : PropTypes . func . isRequired ,
5151 getConfigs : PropTypes . func . isRequired ,
5252 specSelectors : PropTypes . object . isRequired ,
53- contentType : PropTypes . string . isRequired ,
53+ contentType : PropTypes . string ,
5454 isExecute : PropTypes . bool . isRequired ,
5555 onChange : PropTypes . func . isRequired
5656}
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class Parameters extends Component {
2222 specActions : PropTypes . object . isRequired ,
2323 operation : PropTypes . object . isRequired ,
2424 getComponent : PropTypes . func . isRequired ,
25+ getConfigs : PropTypes . func . isRequired ,
2526 specSelectors : PropTypes . object . isRequired ,
2627 oas3Actions : PropTypes . object . isRequired ,
2728 oas3Selectors : PropTypes . object . isRequired ,
@@ -86,6 +87,7 @@ class Parameters extends Component {
8687
8788 fn,
8889 getComponent,
90+ getConfigs,
8991 specSelectors,
9092 oas3Actions,
9193 oas3Selectors,
@@ -137,6 +139,7 @@ class Parameters extends Component {
137139 eachMap ( parameters , ( parameter ) => (
138140 < ParameterRow fn = { fn }
139141 getComponent = { getComponent }
142+ getConfigs = { getConfigs }
140143 param = { parameter }
141144 key = { parameter . get ( "name" ) }
142145 onChange = { this . onChange }
Original file line number Diff line number Diff line change 1- import React from "react"
1+ import React , { cloneElement } from "react"
22import PropTypes from "prop-types"
33
44//import "./topbar.less"
@@ -134,7 +134,7 @@ export default class Topbar extends React.Component {
134134 < span > swagger</ span >
135135 </ Link >
136136 < form className = "download-url-wrapper" onSubmit = { formOnSubmit } >
137- { control }
137+ { control . map ( ( el , i ) => cloneElement ( el , { key : i } ) ) }
138138 </ form >
139139 </ div >
140140 </ div >
You can’t perform that action at this time.
0 commit comments