Improvement: Hash-keyed Try-It-Out parameter value storage (#4670)

* allow param update by identity + hashed value storage

* add specActions.changeParamByIdentity

* add identity-based lookup support in spec selectors

* migrate `changeParam` usage to `changeParamByIdentity`

* migrate usage of `parameterWithMeta` to `parameterWithMetaByIdentity`

* update invocations of `changeParamByIdentity` to match fn signature

* use OrderedMap throughout hash-based selectors for consistency

* normalize usage of ParameterRow `onChange`

* migrate bug 4557 tests to reflect new ParameterRow interface

* remove exclusive test blocks

* linter fixes

* copy Parameters changes into OAS3 wrapper

* use rawParam for meta lookups in ParameterRow
This commit is contained in:
kyle
2018-06-21 21:36:38 -07:00
committed by GitHub
parent 634615346d
commit 8e295c23a4
11 changed files with 410 additions and 45 deletions

View File

@@ -47,11 +47,11 @@ class Parameters extends Component {
onChange = ( param, value, isXml ) => {
let {
specActions: { changeParam },
specActions: { changeParamByIdentity },
onChangeKey,
} = this.props
changeParam( onChangeKey, param.get("name"), param.get("in"), value, isXml)
changeParamByIdentity( onChangeKey, param, value, isXml)
}
onChangeConsumesWrapper = ( val ) => {
@@ -145,7 +145,8 @@ class Parameters extends Component {
getComponent={ getComponent }
specPath={specPath.push(i)}
getConfigs={ getConfigs }
param={ parameter }
rawParam={ parameter }
param={ specSelectors.parameterWithMetaByIdentity(pathMethod, parameter) }
key={ parameter.get( "name" ) }
onChange={ this.onChange }
onChangeConsumes={this.onChangeConsumesWrapper}