mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: remove RemovedInMarshmallow4 warnings (#23704)
This commit is contained in:
committed by
GitHub
parent
295975d16b
commit
b31efbae7c
@@ -21,31 +21,35 @@ from superset.utils.core import DatasourceType
|
||||
|
||||
class FormDataPostSchema(Schema):
|
||||
datasource_id = fields.Integer(
|
||||
required=True, allow_none=False, description="The datasource ID"
|
||||
required=True, allow_none=False, metadata={"description": "The datasource ID"}
|
||||
)
|
||||
datasource_type = fields.String(
|
||||
required=True,
|
||||
allow_none=False,
|
||||
description="The datasource type",
|
||||
metadata={"description": "The datasource type"},
|
||||
validate=validate.OneOf(choices=[ds.value for ds in DatasourceType]),
|
||||
)
|
||||
chart_id = fields.Integer(required=False, description="The chart ID")
|
||||
chart_id = fields.Integer(required=False, metadata={"description": "The chart ID"})
|
||||
form_data = fields.String(
|
||||
required=True, allow_none=False, description="Any type of JSON supported text."
|
||||
required=True,
|
||||
allow_none=False,
|
||||
metadata={"description": "Any type of JSON supported text."},
|
||||
)
|
||||
|
||||
|
||||
class FormDataPutSchema(Schema):
|
||||
datasource_id = fields.Integer(
|
||||
required=True, allow_none=False, description="The datasource ID"
|
||||
required=True, allow_none=False, metadata={"description": "The datasource ID"}
|
||||
)
|
||||
datasource_type = fields.String(
|
||||
required=True,
|
||||
allow_none=False,
|
||||
description="The datasource type",
|
||||
metadata={"description": "The datasource type"},
|
||||
validate=validate.OneOf(choices=[ds.value for ds in DatasourceType]),
|
||||
)
|
||||
chart_id = fields.Integer(required=False, description="The chart ID")
|
||||
chart_id = fields.Integer(required=False, metadata={"description": "The chart ID"})
|
||||
form_data = fields.String(
|
||||
required=True, allow_none=False, description="Any type of JSON supported text."
|
||||
required=True,
|
||||
allow_none=False,
|
||||
metadata={"description": "Any type of JSON supported text."},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user