middleware and respnse models updated
This commit is contained in:
@@ -62,7 +62,7 @@ class Event:
|
||||
return self.NAME
|
||||
|
||||
@property
|
||||
def key(self):
|
||||
def key(self) -> str:
|
||||
return str(self.KEY_)
|
||||
|
||||
@abstractmethod
|
||||
@@ -156,8 +156,8 @@ class CategoryCluster:
|
||||
PREFIX: str
|
||||
PAGEINFO: PageInfo
|
||||
DESCRIPTION: str
|
||||
ENDPOINTS: dict[str, MethodToEvent] # {"MethodToEvent": MethodToEvent, ...}
|
||||
SUBCATEGORY: Optional[List["CategoryCluster"]] # [CategoryCluster, ...]
|
||||
ENDPOINTS: dict[str, MethodToEvent] # {"MethodToEvent": MethodToEvent, ...}
|
||||
SUBCATEGORY: Optional[List["CategoryCluster"]] # [CategoryCluster, ...]
|
||||
INCLUDE_IN_SCHEMA: Optional[bool] = True
|
||||
|
||||
def __init__(
|
||||
@@ -189,7 +189,9 @@ class CategoryCluster:
|
||||
RedisCategoryKeys.CLUSTER_2_METHOD_EVENT
|
||||
Returns the class name and function codes for the class.
|
||||
"""
|
||||
dict_cluster_2_method, list_endpoints = {}, [i.name for i in self.ENDPOINTS.values()]
|
||||
dict_cluster_2_method, list_endpoints = {}, [
|
||||
i.name for i in self.ENDPOINTS.values()
|
||||
]
|
||||
for endpoint_name in list_endpoints:
|
||||
dict_cluster_2_method[endpoint_name] = self.name
|
||||
dict_cluster_2_method[self.name] = list_endpoints
|
||||
@@ -201,7 +203,9 @@ class CategoryCluster:
|
||||
"""
|
||||
all_function_codes = []
|
||||
for event_method in self.ENDPOINTS.values():
|
||||
all_function_codes.extend([str(event_key) for event_key in event_method.EVENTS.keys()])
|
||||
all_function_codes.extend(
|
||||
[str(event_key) for event_key in event_method.EVENTS.keys()]
|
||||
)
|
||||
return all_function_codes
|
||||
|
||||
def retrieve_redis_value(self) -> Dict:
|
||||
|
||||
Reference in New Issue
Block a user