fix: path-item $ref produces/consumes inheritance (via #5049)
* implement a selector for consumes options * fix incorrect comment, test names * add `consumesOptionsFor` selector * use `consumesOptionsFor` and drop `operationConsumes`
This commit is contained in:
@@ -83,7 +83,6 @@ export default class Operation extends PureComponent {
|
||||
|
||||
let operation = operationProps.getIn(["op"])
|
||||
let responses = operation.get("responses")
|
||||
let produces = operation.get("produces")
|
||||
let parameters = getList(operation, ["parameters"])
|
||||
let operationScheme = specSelectors.operationScheme(path, method)
|
||||
let isShownKey = ["operations", tag, operationId]
|
||||
@@ -216,7 +215,7 @@ export default class Operation extends PureComponent {
|
||||
specSelectors={ specSelectors }
|
||||
oas3Actions={oas3Actions}
|
||||
specActions={ specActions }
|
||||
produces={ produces }
|
||||
produces={specSelectors.producesOptionsFor([path, method]) }
|
||||
producesValue={ specSelectors.currentProducesFor([path, method]) }
|
||||
specPath={specPath.push("responses")}
|
||||
path={ path }
|
||||
|
||||
@@ -129,7 +129,7 @@ export default class ParameterRow extends Component {
|
||||
: <ParamBody getComponent={getComponent}
|
||||
fn={fn}
|
||||
param={param}
|
||||
consumes={ specSelectors.operationConsumes(pathMethod) }
|
||||
consumes={ specSelectors.consumesOptionsFor(pathMethod) }
|
||||
consumesValue={ specSelectors.contentTypeValues(pathMethod).get("requestContentType") }
|
||||
onChange={this.onChangeWrapper}
|
||||
onChangeConsumes={onChangeConsumes}
|
||||
|
||||
Reference in New Issue
Block a user