fix(try-it-out): pass Parameter validation messages around in props for OAS3 (#4162)

* default to empty `ImmutableMap` when grabbing op metadata

* pass `errors` into JsonSchema components

* Account for Immutable data structure in JavaScriptonSchema...

...and create empty Lists instead of Maps by default.

* Pass ImmutableList through to JsonSchema child components
This commit is contained in:
kyle
2018-01-25 20:14:35 -08:00
committed by GitHub
parent 2f236982f8
commit 1e1b7f6063
3 changed files with 25 additions and 18 deletions

View File

@@ -158,7 +158,7 @@ export default class ParameterRow extends Component {
<Markdown source={
"<i>Available values</i>: " + paramItemsEnum.map(function(item) {
return item
}).toArray().join(", ")}/>
}).toArray().join(", ")}/>
: null
}
@@ -181,6 +181,7 @@ export default class ParameterRow extends Component {
required={ required }
description={param.get("description") ? `${param.get("name")} - ${param.get("description")}` : `${param.get("name")}`}
onChange={ this.onChangeWrapper }
errors={ param.get("errors") }
schema={ isOAS3 && isOAS3() ? param.get("schema") : param }/>
}