12
12
13
13
14
14
@template_manager_api .route ("/" , methods = ["GET" ])
15
+ @chalice_util .api_gateway_desc (
16
+ summary = "List template manager services" ,
17
+ description = "List all template manager services" ,
18
+ )
15
19
@chalice_util .exception_catcher
16
20
def list_template_manager_services () -> list [dict [str , str ]]:
17
21
return [
@@ -25,6 +29,7 @@ def list_template_manager_services() -> list[dict[str, str]]:
25
29
26
30
27
31
@template_manager_api .route ("/{service_name}" , methods = ["GET" ])
32
+ @chalice_util .api_gateway_desc (summary = "List templates" , description = "List all templates in the service" )
28
33
@chalice_util .exception_catcher
29
34
def list_templates (service_name : str ) -> list [dict [str , str ]]:
30
35
if service_name not in template_manager .template_managers :
@@ -33,6 +38,7 @@ def list_templates(service_name: str) -> list[dict[str, str]]:
33
38
34
39
35
40
@template_manager_api .route ("/{service_name}/{template_code}" , methods = ["GET" , "POST" , "PUT" , "DELETE" ])
41
+ @chalice_util .api_gateway_desc (summary = "CRUD template" , description = "Create, Read, Update, Delete template" )
36
42
@chalice_util .exception_catcher
37
43
def crud_template (service_name : str , template_code : str ) -> dict [str , str ]:
38
44
request : chalice .app .Request = template_manager_api .current_request
@@ -62,6 +68,7 @@ def crud_template(service_name: str, template_code: str) -> dict[str, str]:
62
68
63
69
64
70
@template_manager_api .route ("/{service_name}/{template_code}/render" , methods = ["POST" ])
71
+ @chalice_util .api_gateway_desc (summary = "Render template" , description = "Render template with given context" )
65
72
@chalice_util .exception_catcher
66
73
def render_template (service_name : str , template_code : str ) -> dict [str , str ]:
67
74
request : chalice .app .Request = template_manager_api .current_request
0 commit comments