def _from_python_type(field, pytype):
json_schema = {
'title': field.attribute or field.name,
}
for key, val in TYPE_MAP[pytype].items():
json_schema[key] = val
if field.default is not missing:
json_schema['default'] = field.default
return json_schema
评论列表
文章目录