from apiflask import Schema from apiflask.fields import String, Float, URL, Boolean, Integer class UserInfoIn(Schema): nickname = String() gender = String() age = Integer() height = Float() is_hidden_weight = Boolean() class UserIdIn(Schema): user_id = String() class UserInfoOut(Schema): user_id = String(attribute='_id') nickname = String() gender = String() age = Integer() avatar_id = String() avatar_url = URL() height = Float(allow_nan=True) is_hidden_weight = Boolean()