chore: Migrate /superset/tables/* to API v1 (#22501)

This commit is contained in:
Diego Medina
2023-02-01 09:45:57 -03:00
committed by GitHub
parent ede18be08e
commit 02cd75be8d
17 changed files with 643 additions and 85 deletions

View File

@@ -43,6 +43,15 @@ database_schemas_query_schema = {
"properties": {"force": {"type": "boolean"}},
}
database_tables_query_schema = {
"type": "object",
"properties": {
"force": {"type": "boolean"},
"schema_name": {"type": "string"},
},
"required": ["schema_name"],
}
database_name_description = "A database name to identify this connection."
port_description = "Port number for the database connection."
cache_timeout_description = (
@@ -573,6 +582,12 @@ class SchemasResponseSchema(Schema):
result = fields.List(fields.String(description="A database schema name"))
class DatabaseTablesResponse(Schema):
extra = fields.Dict(description="Extra data used to specify column metadata")
type = fields.String(description="table or view")
value = fields.String(description="The table or view name")
class ValidateSQLRequest(Schema):
sql = fields.String(required=True, description="SQL statement to validate")
schema = fields.String(required=False, allow_none=True)