diff --git a/state-manager/app/models/graph_models.py b/state-manager/app/models/graph_models.py index a4617e92..d7ce5e36 100644 --- a/state-manager/app/models/graph_models.py +++ b/state-manager/app/models/graph_models.py @@ -6,14 +6,10 @@ class UpsertGraphTemplateRequest(BaseModel): - name: str = Field(..., description="The name of the graph template") - namespace: str = Field(..., description="The namespace where the graph template will be stored") nodes: List[NodeTemplate] = Field(..., description="List of node templates that define the graph structure") class UpsertGraphTemplateResponse(BaseModel): - name: str = Field(..., description="The name of the graph template") - namespace: str = Field(..., description="The namespace where the graph template is stored") nodes: List[NodeTemplate] = Field(..., description="List of node templates that define the graph structure") created_at: datetime = Field(..., description="Timestamp when the graph template was created") updated_at: datetime = Field(..., description="Timestamp when the graph template was last updated") diff --git a/state-manager/app/routes.py b/state-manager/app/routes.py index 3f77ae79..dc799f0b 100644 --- a/state-manager/app/routes.py +++ b/state-manager/app/routes.py @@ -107,7 +107,7 @@ async def errored_state_route(namespace_name: str, state_id: str, body: ErroredR @router.put( "/graph-templates/{graph_name}", response_model=UpsertGraphTemplateResponse, - status_code=status.HTTP_200_OK, + status_code=status.HTTP_201_CREATED, response_description="Graph template upserted successfully" ) async def upsert_graph_template(namespace_name: str, graph_name: str, body: UpsertGraphTemplateRequest, request: Request, api_key: str = Depends(check_api_key)):