prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [BUG] ResourceTemplates have properties - should be parameters
  Rename properties to parameters
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `management_api_app/models/domain/resource_template.py`
  Content:
  ```
  1 from typing import List, Optional, Any
  2 
  3 from pydantic import Field
  4 
  5 from models.domain.azuretremodel import AzureTREModel
  6 from models.domain.resource import ResourceType
  7 
  8 
  9 class Parameter(AzureTREModel):
  10     name: str = Field(title="Parameter name")
  11     type: str = Field(title="Parameter type")
  12     default: Any = Field(title="Default value for the parameter")
  13     applyTo: str = Field("All Actions", title="The actions that the parameter applies to e.g. install, delete etc")
  14     description: Optional[str] = Field(title="Parameter description")
  15     required: bool = Field(False, title="Is the parameter required")
  16 
  17 
  18 class ResourceTemplate(AzureTREModel):
  19     id: str
  20     name: str = Field(title="Unique template name")
  21     description: str = Field(title="Template description")
  22     version: str = Field(title="Template version")
  23     properties: List[dict] = Field(title="Template parameters")
  24     resourceType: ResourceType = Field(title="Type of resource this template is for (workspace/service)")
  25     current: bool = Field(title="Is this the current version of this template")
  26
  ```
  
  Path: `management_api_app/models/schemas/workspace_template.py`
  Content:
  ```
  1 from typing import List
  2 from pydantic import BaseModel, Field
  3 
  4 from models.domain.resource import ResourceType
  5 from models.domain.resource_template import ResourceTemplate, Parameter
  6 
  7 
  8 def get_sample_workspace_template_object(template_name: str = "tre-workspace-vanilla") -> ResourceTemplate:
  9     return ResourceTemplate(
  10         id="a7a7a7bd-7f4e-4a4e-b970-dc86a6b31dfb",
  11         name=template_name,
  12         description="vanilla workspace bundle",
  13         version="0.1.0",
  14         properties=[
  15             Parameter(name="azure_location", type="string"),
  16             Parameter(name="tre_id", type="string"),
  17             Parameter(name="workspace_id", type="string"),
  18             Parameter(name="address_space", type="string", default="10.2.1.0/24", description="VNet address space for the workspace services")
  19         ],
  20         resourceType=ResourceType.Workspace,
  21         current=True,
  22     )
  23 
  24 
  25 def get_sample_workspace_template() -> dict:
  26     return get_sample_workspace_template_object().dict()
  27 
  28 
  29 class WorkspaceTemplateNamesInList(BaseModel):
  30     templateNames: List[str]
  31 
  32     class Config:
  33         schema_extra = {
  34             "example": {
  35                 "templateNames": ["tre-workspace-vanilla", "tre-workspace-base"]
  36             }
  37         }
  38 
  39 
  40 class WorkspaceTemplateInCreate(BaseModel):
  41 
  42     name: str = Field(title="Name of workspace template")
  43     version: str = Field(title="Version of workspace template")
  44     description: str = Field(title=" Description of workspace template")
  45     properties: List[dict] = Field([{}], title="Workspace template properties",
  46                                    description="Values for the properties required by the workspace template")
  47     resourceType: str = Field(title="Type of workspace template")
  48     current: bool = Field(title="Mark this version as current")
  49 
  50     class Config:
  51         schema_extra = {
  52             "example": {
  53                 "name": "my-tre-workspace",
  54                 "version": "0.0.1",
  55                 "description": "workspace template for great product",
  56                 "properties": [{
  57                     "name": "azure_location",
  58                     "type": "string"
  59                 }],
  60                 "resourceType": "workspace",
  61                 "current": "true"
  62             }
  63         }
  64 
  65 
  66 class WorkspaceTemplateInResponse(BaseModel):
  67     workspaceTemplate: ResourceTemplate
  68 
  69     class Config:
  70         schema_extra = {
  71             "example": {
  72                 "resourceTemplateId": "49a7445c-aae6-41ec-a539-30dfa90ab1ae",
  73                 "workspaceTemplate": get_sample_workspace_template()
  74             }
  75         }
  76
  ```
  
  Path: `management_api_app/db/repositories/workspace_templates.py`
  Content:
  ```
  1 import uuid
  2 from typing import List
  3 
  4 from azure.cosmos import CosmosClient
  5 
  6 from core import config
  7 from db.errors import EntityDoesNotExist
  8 from db.repositories.base import BaseRepository
  9 from models.domain.resource_template import ResourceTemplate
  10 from models.schemas.workspace_template import WorkspaceTemplateInCreate
  11 
  12 
  13 class WorkspaceTemplateRepository(BaseRepository):
  14     def __init__(self, client: CosmosClient):
  15         super().__init__(client, config.STATE_STORE_RESOURCE_TEMPLATES_CONTAINER)
  16 
  17     @staticmethod
  18     def _workspace_template_by_name_query(name: str) -> str:
  19         return f'SELECT * FROM c WHERE c.resourceType = "workspace" AND c.name = "{name}"'
  20 
  21     def get_workspace_templates_by_name(self, name: str) -> List[ResourceTemplate]:
  22         query = self._workspace_template_by_name_query(name)
  23         return self.query(query=query)
  24 
  25     def get_current_workspace_template_by_name(self, name: str) -> ResourceTemplate:
  26         query = self._workspace_template_by_name_query(name) + ' AND c.current = true'
  27         workspace_templates = self.query(query=query)
  28         if len(workspace_templates) != 1:
  29             raise EntityDoesNotExist
  30         return workspace_templates[0]
  31 
  32     def get_workspace_template_by_name_and_version(self, name: str, version: str) -> ResourceTemplate:
  33         query = self._workspace_template_by_name_query(name) + f' AND c.version = "{version}"'
  34         workspace_templates = self.query(query=query)
  35         if len(workspace_templates) != 1:
  36             raise EntityDoesNotExist
  37         return workspace_templates[0]
  38 
  39     def get_workspace_template_names(self) -> List[str]:
  40         query = 'SELECT c.name FROM c'
  41         workspace_templates = self.query(query=query)
  42         print(workspace_templates)
  43         workspace_template_names = [template["name"] for template in workspace_templates]
  44         return list(set(workspace_template_names))
  45 
  46     def create_workspace_template_item(self, workspace_template_create: WorkspaceTemplateInCreate):
  47         item_id = str(uuid.uuid4())
  48         resource_template = ResourceTemplate(
  49             id=item_id,
  50             name=workspace_template_create.name,
  51             description=workspace_template_create.description,
  52             version=workspace_template_create.version,
  53             properties=workspace_template_create.properties,
  54             resourceType=workspace_template_create.resourceType,
  55             current=workspace_template_create.current
  56         )
  57         self.create_item(resource_template)
  58         return resource_template
  59 
  60     def update_item(self, resource_template: ResourceTemplate):
  61         self.container.upsert_item(resource_template)
  62
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/management_api_app/db/repositories/workspace_templates.py b/management_api_app/db/repositories/workspace_templates.py
  --- a/management_api_app/db/repositories/workspace_templates.py
  +++ b/management_api_app/db/repositories/workspace_templates.py
  @@ -50,7 +50,7 @@
               name=workspace_template_create.name,
               description=workspace_template_create.description,
               version=workspace_template_create.version,
  -            properties=workspace_template_create.properties,
  +            parameters=workspace_template_create.parameters,
               resourceType=workspace_template_create.resourceType,
               current=workspace_template_create.current
           )
  diff --git a/management_api_app/models/domain/resource_template.py b/management_api_app/models/domain/resource_template.py
  --- a/management_api_app/models/domain/resource_template.py
  +++ b/management_api_app/models/domain/resource_template.py
  @@ -20,6 +20,6 @@
       name: str = Field(title="Unique template name")
       description: str = Field(title="Template description")
       version: str = Field(title="Template version")
  -    properties: List[dict] = Field(title="Template parameters")
  +    parameters: List[dict] = Field(title="Template parameters")
       resourceType: ResourceType = Field(title="Type of resource this template is for (workspace/service)")
       current: bool = Field(title="Is this the current version of this template")
  diff --git a/management_api_app/models/schemas/workspace_template.py b/management_api_app/models/schemas/workspace_template.py
  --- a/management_api_app/models/schemas/workspace_template.py
  +++ b/management_api_app/models/schemas/workspace_template.py
  @@ -11,7 +11,7 @@
           name=template_name,
           description="vanilla workspace bundle",
           version="0.1.0",
  -        properties=[
  +        parameters=[
               Parameter(name="azure_location", type="string"),
               Parameter(name="tre_id", type="string"),
               Parameter(name="workspace_id", type="string"),
  @@ -42,8 +42,8 @@
       name: str = Field(title="Name of workspace template")
       version: str = Field(title="Version of workspace template")
       description: str = Field(title=" Description of workspace template")
  -    properties: List[dict] = Field([{}], title="Workspace template properties",
  -                                   description="Values for the properties required by the workspace template")
  +    parameters: List[dict] = Field([{}], title="Workspace template parameters",
  +                                   description="Values for the parameters required by the workspace template")
       resourceType: str = Field(title="Type of workspace template")
       current: bool = Field(title="Mark this version as current")
   
  @@ -53,7 +53,7 @@
                   "name": "my-tre-workspace",
                   "version": "0.0.1",
                   "description": "workspace template for great product",
  -                "properties": [{
  +                "parameters": [{
                       "name": "azure_location",
                       "type": "string"
                   }],
  
verification_info: {"golden_diff": "diff --git a/management_api_app/db/repositories/workspace_templates.py b/management_api_app/db/repositories/workspace_templates.py\n--- a/management_api_app/db/repositories/workspace_templates.py\n+++ b/management_api_app/db/repositories/workspace_templates.py\n@@ -50,7 +50,7 @@\n             name=workspace_template_create.name,\n             description=workspace_template_create.description,\n             version=workspace_template_create.version,\n-            properties=workspace_template_create.properties,\n+            parameters=workspace_template_create.parameters,\n             resourceType=workspace_template_create.resourceType,\n             current=workspace_template_create.current\n         )\ndiff --git a/management_api_app/models/domain/resource_template.py b/management_api_app/models/domain/resource_template.py\n--- a/management_api_app/models/domain/resource_template.py\n+++ b/management_api_app/models/domain/resource_template.py\n@@ -20,6 +20,6 @@\n     name: str = Field(title=\"Unique template name\")\n     description: str = Field(title=\"Template description\")\n     version: str = Field(title=\"Template version\")\n-    properties: List[dict] = Field(title=\"Template parameters\")\n+    parameters: List[dict] = Field(title=\"Template parameters\")\n     resourceType: ResourceType = Field(title=\"Type of resource this template is for (workspace/service)\")\n     current: bool = Field(title=\"Is this the current version of this template\")\ndiff --git a/management_api_app/models/schemas/workspace_template.py b/management_api_app/models/schemas/workspace_template.py\n--- a/management_api_app/models/schemas/workspace_template.py\n+++ b/management_api_app/models/schemas/workspace_template.py\n@@ -11,7 +11,7 @@\n         name=template_name,\n         description=\"vanilla workspace bundle\",\n         version=\"0.1.0\",\n-        properties=[\n+        parameters=[\n             Parameter(name=\"azure_location\", type=\"string\"),\n             Parameter(name=\"tre_id\", type=\"string\"),\n             Parameter(name=\"workspace_id\", type=\"string\"),\n@@ -42,8 +42,8 @@\n     name: str = Field(title=\"Name of workspace template\")\n     version: str = Field(title=\"Version of workspace template\")\n     description: str = Field(title=\" Description of workspace template\")\n-    properties: List[dict] = Field([{}], title=\"Workspace template properties\",\n-                                   description=\"Values for the properties required by the workspace template\")\n+    parameters: List[dict] = Field([{}], title=\"Workspace template parameters\",\n+                                   description=\"Values for the parameters required by the workspace template\")\n     resourceType: str = Field(title=\"Type of workspace template\")\n     current: bool = Field(title=\"Mark this version as current\")\n \n@@ -53,7 +53,7 @@\n                 \"name\": \"my-tre-workspace\",\n                 \"version\": \"0.0.1\",\n                 \"description\": \"workspace template for great product\",\n-                \"properties\": [{\n+                \"parameters\": [{\n                     \"name\": \"azure_location\",\n                     \"type\": \"string\"\n                 }],\n", "issue": "[BUG] ResourceTemplates have properties - should be parameters\nRename properties to parameters\r\n\n", "before_files": [{"content": "from typing import List, Optional, Any\n\nfrom pydantic import Field\n\nfrom models.domain.azuretremodel import AzureTREModel\nfrom models.domain.resource import ResourceType\n\n\nclass Parameter(AzureTREModel):\n    name: str = Field(title=\"Parameter name\")\n    type: str = Field(title=\"Parameter type\")\n    default: Any = Field(title=\"Default value for the parameter\")\n    applyTo: str = Field(\"All Actions\", title=\"The actions that the parameter applies to e.g. install, delete etc\")\n    description: Optional[str] = Field(title=\"Parameter description\")\n    required: bool = Field(False, title=\"Is the parameter required\")\n\n\nclass ResourceTemplate(AzureTREModel):\n    id: str\n    name: str = Field(title=\"Unique template name\")\n    description: str = Field(title=\"Template description\")\n    version: str = Field(title=\"Template version\")\n    properties: List[dict] = Field(title=\"Template parameters\")\n    resourceType: ResourceType = Field(title=\"Type of resource this template is for (workspace/service)\")\n    current: bool = Field(title=\"Is this the current version of this template\")\n", "path": "management_api_app/models/domain/resource_template.py"}, {"content": "from typing import List\nfrom pydantic import BaseModel, Field\n\nfrom models.domain.resource import ResourceType\nfrom models.domain.resource_template import ResourceTemplate, Parameter\n\n\ndef get_sample_workspace_template_object(template_name: str = \"tre-workspace-vanilla\") -> ResourceTemplate:\n    return ResourceTemplate(\n        id=\"a7a7a7bd-7f4e-4a4e-b970-dc86a6b31dfb\",\n        name=template_name,\n        description=\"vanilla workspace bundle\",\n        version=\"0.1.0\",\n        properties=[\n            Parameter(name=\"azure_location\", type=\"string\"),\n            Parameter(name=\"tre_id\", type=\"string\"),\n            Parameter(name=\"workspace_id\", type=\"string\"),\n            Parameter(name=\"address_space\", type=\"string\", default=\"10.2.1.0/24\", description=\"VNet address space for the workspace services\")\n        ],\n        resourceType=ResourceType.Workspace,\n        current=True,\n    )\n\n\ndef get_sample_workspace_template() -> dict:\n    return get_sample_workspace_template_object().dict()\n\n\nclass WorkspaceTemplateNamesInList(BaseModel):\n    templateNames: List[str]\n\n    class Config:\n        schema_extra = {\n            \"example\": {\n                \"templateNames\": [\"tre-workspace-vanilla\", \"tre-workspace-base\"]\n            }\n        }\n\n\nclass WorkspaceTemplateInCreate(BaseModel):\n\n    name: str = Field(title=\"Name of workspace template\")\n    version: str = Field(title=\"Version of workspace template\")\n    description: str = Field(title=\" Description of workspace template\")\n    properties: List[dict] = Field([{}], title=\"Workspace template properties\",\n                                   description=\"Values for the properties required by the workspace template\")\n    resourceType: str = Field(title=\"Type of workspace template\")\n    current: bool = Field(title=\"Mark this version as current\")\n\n    class Config:\n        schema_extra = {\n            \"example\": {\n                \"name\": \"my-tre-workspace\",\n                \"version\": \"0.0.1\",\n                \"description\": \"workspace template for great product\",\n                \"properties\": [{\n                    \"name\": \"azure_location\",\n                    \"type\": \"string\"\n                }],\n                \"resourceType\": \"workspace\",\n                \"current\": \"true\"\n            }\n        }\n\n\nclass WorkspaceTemplateInResponse(BaseModel):\n    workspaceTemplate: ResourceTemplate\n\n    class Config:\n        schema_extra = {\n            \"example\": {\n                \"resourceTemplateId\": \"49a7445c-aae6-41ec-a539-30dfa90ab1ae\",\n                \"workspaceTemplate\": get_sample_workspace_template()\n            }\n        }\n", "path": "management_api_app/models/schemas/workspace_template.py"}, {"content": "import uuid\nfrom typing import List\n\nfrom azure.cosmos import CosmosClient\n\nfrom core import config\nfrom db.errors import EntityDoesNotExist\nfrom db.repositories.base import BaseRepository\nfrom models.domain.resource_template import ResourceTemplate\nfrom models.schemas.workspace_template import WorkspaceTemplateInCreate\n\n\nclass WorkspaceTemplateRepository(BaseRepository):\n    def __init__(self, client: CosmosClient):\n        super().__init__(client, config.STATE_STORE_RESOURCE_TEMPLATES_CONTAINER)\n\n    @staticmethod\n    def _workspace_template_by_name_query(name: str) -> str:\n        return f'SELECT * FROM c WHERE c.resourceType = \"workspace\" AND c.name = \"{name}\"'\n\n    def get_workspace_templates_by_name(self, name: str) -> List[ResourceTemplate]:\n        query = self._workspace_template_by_name_query(name)\n        return self.query(query=query)\n\n    def get_current_workspace_template_by_name(self, name: str) -> ResourceTemplate:\n        query = self._workspace_template_by_name_query(name) + ' AND c.current = true'\n        workspace_templates = self.query(query=query)\n        if len(workspace_templates) != 1:\n            raise EntityDoesNotExist\n        return workspace_templates[0]\n\n    def get_workspace_template_by_name_and_version(self, name: str, version: str) -> ResourceTemplate:\n        query = self._workspace_template_by_name_query(name) + f' AND c.version = \"{version}\"'\n        workspace_templates = self.query(query=query)\n        if len(workspace_templates) != 1:\n            raise EntityDoesNotExist\n        return workspace_templates[0]\n\n    def get_workspace_template_names(self) -> List[str]:\n        query = 'SELECT c.name FROM c'\n        workspace_templates = self.query(query=query)\n        print(workspace_templates)\n        workspace_template_names = [template[\"name\"] for template in workspace_templates]\n        return list(set(workspace_template_names))\n\n    def create_workspace_template_item(self, workspace_template_create: WorkspaceTemplateInCreate):\n        item_id = str(uuid.uuid4())\n        resource_template = ResourceTemplate(\n            id=item_id,\n            name=workspace_template_create.name,\n            description=workspace_template_create.description,\n            version=workspace_template_create.version,\n            properties=workspace_template_create.properties,\n            resourceType=workspace_template_create.resourceType,\n            current=workspace_template_create.current\n        )\n        self.create_item(resource_template)\n        return resource_template\n\n    def update_item(self, resource_template: ResourceTemplate):\n        self.container.upsert_item(resource_template)\n", "path": "management_api_app/db/repositories/workspace_templates.py"}], "after_files": [{"content": "from typing import List, Optional, Any\n\nfrom pydantic import Field\n\nfrom models.domain.azuretremodel import AzureTREModel\nfrom models.domain.resource import ResourceType\n\n\nclass Parameter(AzureTREModel):\n    name: str = Field(title=\"Parameter name\")\n    type: str = Field(title=\"Parameter type\")\n    default: Any = Field(title=\"Default value for the parameter\")\n    applyTo: str = Field(\"All Actions\", title=\"The actions that the parameter applies to e.g. install, delete etc\")\n    description: Optional[str] = Field(title=\"Parameter description\")\n    required: bool = Field(False, title=\"Is the parameter required\")\n\n\nclass ResourceTemplate(AzureTREModel):\n    id: str\n    name: str = Field(title=\"Unique template name\")\n    description: str = Field(title=\"Template description\")\n    version: str = Field(title=\"Template version\")\n    parameters: List[dict] = Field(title=\"Template parameters\")\n    resourceType: ResourceType = Field(title=\"Type of resource this template is for (workspace/service)\")\n    current: bool = Field(title=\"Is this the current version of this template\")\n", "path": "management_api_app/models/domain/resource_template.py"}, {"content": "from typing import List\nfrom pydantic import BaseModel, Field\n\nfrom models.domain.resource import ResourceType\nfrom models.domain.resource_template import ResourceTemplate, Parameter\n\n\ndef get_sample_workspace_template_object(template_name: str = \"tre-workspace-vanilla\") -> ResourceTemplate:\n    return ResourceTemplate(\n        id=\"a7a7a7bd-7f4e-4a4e-b970-dc86a6b31dfb\",\n        name=template_name,\n        description=\"vanilla workspace bundle\",\n        version=\"0.1.0\",\n        parameters=[\n            Parameter(name=\"azure_location\", type=\"string\"),\n            Parameter(name=\"tre_id\", type=\"string\"),\n            Parameter(name=\"workspace_id\", type=\"string\"),\n            Parameter(name=\"address_space\", type=\"string\", default=\"10.2.1.0/24\", description=\"VNet address space for the workspace services\")\n        ],\n        resourceType=ResourceType.Workspace,\n        current=True,\n    )\n\n\ndef get_sample_workspace_template() -> dict:\n    return get_sample_workspace_template_object().dict()\n\n\nclass WorkspaceTemplateNamesInList(BaseModel):\n    templateNames: List[str]\n\n    class Config:\n        schema_extra = {\n            \"example\": {\n                \"templateNames\": [\"tre-workspace-vanilla\", \"tre-workspace-base\"]\n            }\n        }\n\n\nclass WorkspaceTemplateInCreate(BaseModel):\n\n    name: str = Field(title=\"Name of workspace template\")\n    version: str = Field(title=\"Version of workspace template\")\n    description: str = Field(title=\" Description of workspace template\")\n    parameters: List[dict] = Field([{}], title=\"Workspace template parameters\",\n                                   description=\"Values for the parameters required by the workspace template\")\n    resourceType: str = Field(title=\"Type of workspace template\")\n    current: bool = Field(title=\"Mark this version as current\")\n\n    class Config:\n        schema_extra = {\n            \"example\": {\n                \"name\": \"my-tre-workspace\",\n                \"version\": \"0.0.1\",\n                \"description\": \"workspace template for great product\",\n                \"parameters\": [{\n                    \"name\": \"azure_location\",\n                    \"type\": \"string\"\n                }],\n                \"resourceType\": \"workspace\",\n                \"current\": \"true\"\n            }\n        }\n\n\nclass WorkspaceTemplateInResponse(BaseModel):\n    workspaceTemplate: ResourceTemplate\n\n    class Config:\n        schema_extra = {\n            \"example\": {\n                \"resourceTemplateId\": \"49a7445c-aae6-41ec-a539-30dfa90ab1ae\",\n                \"workspaceTemplate\": get_sample_workspace_template()\n            }\n        }\n", "path": "management_api_app/models/schemas/workspace_template.py"}, {"content": "import uuid\nfrom typing import List\n\nfrom azure.cosmos import CosmosClient\n\nfrom core import config\nfrom db.errors import EntityDoesNotExist\nfrom db.repositories.base import BaseRepository\nfrom models.domain.resource_template import ResourceTemplate\nfrom models.schemas.workspace_template import WorkspaceTemplateInCreate\n\n\nclass WorkspaceTemplateRepository(BaseRepository):\n    def __init__(self, client: CosmosClient):\n        super().__init__(client, config.STATE_STORE_RESOURCE_TEMPLATES_CONTAINER)\n\n    @staticmethod\n    def _workspace_template_by_name_query(name: str) -> str:\n        return f'SELECT * FROM c WHERE c.resourceType = \"workspace\" AND c.name = \"{name}\"'\n\n    def get_workspace_templates_by_name(self, name: str) -> List[ResourceTemplate]:\n        query = self._workspace_template_by_name_query(name)\n        return self.query(query=query)\n\n    def get_current_workspace_template_by_name(self, name: str) -> ResourceTemplate:\n        query = self._workspace_template_by_name_query(name) + ' AND c.current = true'\n        workspace_templates = self.query(query=query)\n        if len(workspace_templates) != 1:\n            raise EntityDoesNotExist\n        return workspace_templates[0]\n\n    def get_workspace_template_by_name_and_version(self, name: str, version: str) -> ResourceTemplate:\n        query = self._workspace_template_by_name_query(name) + f' AND c.version = \"{version}\"'\n        workspace_templates = self.query(query=query)\n        if len(workspace_templates) != 1:\n            raise EntityDoesNotExist\n        return workspace_templates[0]\n\n    def get_workspace_template_names(self) -> List[str]:\n        query = 'SELECT c.name FROM c'\n        workspace_templates = self.query(query=query)\n        print(workspace_templates)\n        workspace_template_names = [template[\"name\"] for template in workspace_templates]\n        return list(set(workspace_template_names))\n\n    def create_workspace_template_item(self, workspace_template_create: WorkspaceTemplateInCreate):\n        item_id = str(uuid.uuid4())\n        resource_template = ResourceTemplate(\n            id=item_id,\n            name=workspace_template_create.name,\n            description=workspace_template_create.description,\n            version=workspace_template_create.version,\n            parameters=workspace_template_create.parameters,\n            resourceType=workspace_template_create.resourceType,\n            current=workspace_template_create.current\n        )\n        self.create_item(resource_template)\n        return resource_template\n\n    def update_item(self, resource_template: ResourceTemplate):\n        self.container.upsert_item(resource_template)\n", "path": "management_api_app/db/repositories/workspace_templates.py"}]}