mirror of
https://github.com/correl/openapi-core.git
synced 2025-01-01 11:03:19 +00:00
25 lines
489 B
Python
25 lines
489 B
Python
|
def get_aslist(param):
|
||
|
return (
|
||
|
param.get('schema', None) and
|
||
|
param['schema']['type'] in ['array', 'object']
|
||
|
)
|
||
|
|
||
|
|
||
|
def get_style(param):
|
||
|
if 'style' in param:
|
||
|
return param['style']
|
||
|
|
||
|
# determine default
|
||
|
return (
|
||
|
'simple' if param['in'] in ['path', 'header'] else 'form'
|
||
|
)
|
||
|
|
||
|
|
||
|
def get_explode(param):
|
||
|
if 'explode' in param:
|
||
|
return param['explode']
|
||
|
|
||
|
#determine default
|
||
|
style = get_style(param)
|
||
|
return style == 'form'
|