mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
chore: remove RemovedInMarshmallow4 warnings (#23704)
This commit is contained in:
committed by
GitHub
parent
295975d16b
commit
b31efbae7c
@@ -57,22 +57,24 @@ def validate_json(value: Union[bytes, bytearray, str]) -> None:
|
||||
|
||||
class AnnotationPostSchema(Schema):
|
||||
short_descr = fields.String(
|
||||
description=annotation_short_descr,
|
||||
metadata={"description": annotation_short_descr},
|
||||
required=True,
|
||||
allow_none=False,
|
||||
validate=[Length(1, 500)],
|
||||
)
|
||||
long_descr = fields.String(description=annotation_long_descr, allow_none=True)
|
||||
long_descr = fields.String(
|
||||
metadata={"description": annotation_long_descr}, allow_none=True
|
||||
)
|
||||
start_dttm = fields.DateTime(
|
||||
description=annotation_start_dttm,
|
||||
metadata={"description": annotation_start_dttm},
|
||||
required=True,
|
||||
allow_none=False,
|
||||
)
|
||||
end_dttm = fields.DateTime(
|
||||
description=annotation_end_dttm, required=True, allow_none=False
|
||||
metadata={"description": annotation_end_dttm}, required=True, allow_none=False
|
||||
)
|
||||
json_metadata = fields.String(
|
||||
description=annotation_json_metadata,
|
||||
metadata={"description": annotation_json_metadata},
|
||||
validate=validate_json,
|
||||
allow_none=True,
|
||||
)
|
||||
@@ -80,15 +82,21 @@ class AnnotationPostSchema(Schema):
|
||||
|
||||
class AnnotationPutSchema(Schema):
|
||||
short_descr = fields.String(
|
||||
description=annotation_short_descr, required=False, validate=[Length(1, 500)]
|
||||
metadata={"description": annotation_short_descr},
|
||||
required=False,
|
||||
validate=[Length(1, 500)],
|
||||
)
|
||||
long_descr = fields.String(
|
||||
description=annotation_long_descr, required=False, allow_none=True
|
||||
metadata={"description": annotation_long_descr}, required=False, allow_none=True
|
||||
)
|
||||
start_dttm = fields.DateTime(
|
||||
metadata={"description": annotation_start_dttm}, required=False
|
||||
)
|
||||
end_dttm = fields.DateTime(
|
||||
metadata={"description": annotation_end_dttm}, required=False
|
||||
)
|
||||
start_dttm = fields.DateTime(description=annotation_start_dttm, required=False)
|
||||
end_dttm = fields.DateTime(description=annotation_end_dttm, required=False)
|
||||
json_metadata = fields.String(
|
||||
description=annotation_json_metadata,
|
||||
metadata={"description": annotation_json_metadata},
|
||||
validate=validate_json,
|
||||
required=False,
|
||||
allow_none=True,
|
||||
|
||||
Reference in New Issue
Block a user