Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: array initial value to be undefined on try it out #9258

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/core/components/parameter-row.jsx
Expand Up @@ -134,6 +134,8 @@ export default class ParameterRow extends Component {
? paramWithMeta.getIn(["content", parameterMediaType, "example"])
: paramWithMeta.get("example") !== undefined
? paramWithMeta.get("example")
: (schema && schema.get("type") === "array" && schema.get("example"))
? undefined // when type is array, it starts with 0 items, so skip initial value
: (schema && schema.get("example")) !== undefined
? (schema && schema.get("example"))
: (schema && schema.get("default")) !== undefined
Expand Down