chore: add statsd support to base API and refactor (#22887)

This commit is contained in:
Daniel Vaz Gaspar
2023-01-27 17:52:08 +00:00
committed by GitHub
parent bed10a0e2b
commit d00ba15c78
18 changed files with 167 additions and 138 deletions

View File

@@ -21,7 +21,6 @@ from typing import Any
from apispec import APISpec
from apispec.exceptions import DuplicateComponentNameError
from flask import request, Response
from flask_appbuilder.api import BaseApi
from marshmallow import ValidationError
from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP, RouteMethod
@@ -34,12 +33,12 @@ from superset.temporary_cache.schemas import (
TemporaryCachePostSchema,
TemporaryCachePutSchema,
)
from superset.views.base_api import requires_json
from superset.views.base_api import BaseSupersetApi, requires_json
logger = logging.getLogger(__name__)
class TemporaryCacheRestApi(BaseApi, ABC):
class TemporaryCacheRestApi(BaseSupersetApi, ABC):
add_model_schema = TemporaryCachePostSchema()
edit_model_schema = TemporaryCachePutSchema()
method_permission_name = MODEL_API_RW_METHOD_PERMISSION_MAP