middleware and respnse models updated
This commit is contained in:
@@ -20,14 +20,17 @@ class CreateEndpointFromCluster:
|
||||
|
||||
def attach_router(self):
|
||||
method = getattr(self.router, self.method_endpoint.METHOD.lower())
|
||||
|
||||
|
||||
# Create a unique operation ID based on the endpoint path, method, and a unique identifier
|
||||
kwargs = {
|
||||
"path": self.method_endpoint.URL,
|
||||
"summary": self.method_endpoint.SUMMARY,
|
||||
"description": self.method_endpoint.DESCRIPTION,
|
||||
}
|
||||
if hasattr(self.method_endpoint, 'RESPONSE_MODEL') and self.method_endpoint.RESPONSE_MODEL is not None:
|
||||
if (
|
||||
hasattr(self.method_endpoint, "RESPONSE_MODEL")
|
||||
and self.method_endpoint.RESPONSE_MODEL is not None
|
||||
):
|
||||
kwargs["response_model"] = self.method_endpoint.RESPONSE_MODEL
|
||||
|
||||
|
||||
method(**kwargs)(self.method_endpoint.endpoint_callable)
|
||||
|
||||
@@ -2,4 +2,3 @@ from Services.Redis import RedisActions, AccessToken
|
||||
from Services.Redis.Models.cluster import RedisList
|
||||
|
||||
redis_list = RedisList(redis_key="test")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user