Skip to content

Commit

Permalink
keep default as initial fallback (+1 squashed commit)
Browse files Browse the repository at this point in the history
Squashed commits:
[038efa5] use display_default instead of default
Ref: #8593
`display_default` should now be used to generate defaults file
  • Loading branch information
ian28223 committed Jul 23, 2021
1 parent 207ba57 commit 457f83f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def example_looks_informative(example):


def get_default_value(type_data):
if 'default' in type_data:
if 'display_default' in type_data:
return type_data['display_default']
elif 'default' in type_data:
return type_data['default']
elif 'type' not in type_data or type_data['type'] in ('array', 'object'):
return NO_DEFAULT
Expand Down

0 comments on commit 457f83f

Please sign in to comment.