mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-28 19:19:52 +00:00
11 lines
224 B
Python
11 lines
224 B
Python
|
"""OpenAPI core casting schemas util module"""
|
||
|
from distutils.util import strtobool
|
||
|
from six import string_types
|
||
|
|
||
|
|
||
|
def forcebool(val):
|
||
|
if isinstance(val, string_types):
|
||
|
val = strtobool(val)
|
||
|
|
||
|
return bool(val)
|