fix: parameterMacro functionality for OAS3 (via #5617)

* #5282 - Correct parameterMacro for OAS3

* Update parameter-row.jsx
This commit is contained in:
Matt Traynham
2019-09-26 22:27:41 -04:00
committed by kyle
parent 89dbf0a36c
commit dd6cdf1a48

View File

@@ -129,6 +129,7 @@ export default class ParameterRow extends Component {
|| paramWithMeta.get("example")
|| schema.get("example")
|| schema.get("default")
|| paramWithMeta.get("default") // ensures support for `parameterMacro`
}
//// Process the initial value
@@ -245,6 +246,9 @@ export default class ParameterRow extends Component {
// Default and Example Value for readonly doc
if ( param !== undefined ) {
paramDefaultValue = schema.get("default")
if (paramDefaultValue === undefined) {
paramDefaultValue = param.get("default")
}
paramExample = param.get("example")
if (paramExample === undefined) {
paramExample = param.get("x-example")