加入webargs验证扩展,分区用于验证的inschema和用户序列化的outschema

This commit is contained in:
mkg
2021-11-17 18:07:36 +08:00
parent fba22bbcbf
commit cdea48c7d4
21 changed files with 96 additions and 74 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ from applications.extensions import ma
from marshmallow import fields
class DictTypeSchema(ma.Schema):
class DictTypeOutSchema(ma.Schema):
id = fields.Str(attribute="id")
typeName = fields.Str(attribute="type_name")
typeCode = fields.Str(attribute="type_code")
@@ -13,7 +13,7 @@ class DictTypeSchema(ma.Schema):
enable = fields.Str()
class DictDataSchema(ma.Schema):
class DictDataOutSchema(ma.Schema):
dataId = fields.Str(attribute="id")
dataLabel = fields.Str(attribute="data_label")
dataValue = fields.Str(attribute="data_value")