mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-29 03:00:12 +00:00
14 lines
262 B
Python
14 lines
262 B
Python
"""OpenAPI core schemas util module"""
|
|
from distutils.util import strtobool
|
|
from json import dumps
|
|
|
|
|
|
def forcebool(val):
|
|
if isinstance(val, str):
|
|
val = strtobool(val)
|
|
|
|
return bool(val)
|
|
|
|
|
|
def dicthash(d):
|
|
return hash(dumps(d, sort_keys=True))
|