Skip to content

Commit

Permalink
fix: parameterMacro functionality for OAS3 (via #5617)
Browse files Browse the repository at this point in the history
* #5282 - Correct parameterMacro for OAS3

* Update parameter-row.jsx
  • Loading branch information
mtraynham authored and shockey committed Sep 27, 2019
1 parent 89dbf0a commit dd6cdf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/components/parameter-row.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit dd6cdf1

Please sign in to comment.