From 56882f98af3478c109f94293ec0a9fe4309fabe6 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Thu, 24 Aug 2023 19:35:35 -0400 Subject: [PATCH 1/4] changing type and default of history_id for legacy update and delete endpoints --- lib/galaxy/webapps/galaxy/api/history_contents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/history_contents.py b/lib/galaxy/webapps/galaxy/api/history_contents.py index 6deec3f66493..2aafe380b79d 100644 --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -787,7 +787,7 @@ def validate( def update_typed( self, trans: ProvidesHistoryContext = DependsOnTrans, - history_id: DecodedDatabaseIdField = HistoryIDPathParam, + history_id: str = "", id: DecodedDatabaseIdField = HistoryItemIDPathParam, type: HistoryContentType = ContentTypePathParam, serialization_params: SerializationParams = Depends(query_serialization_params), @@ -824,7 +824,7 @@ def delete_typed( self, response: Response, trans: ProvidesHistoryContext = DependsOnTrans, - history_id: DecodedDatabaseIdField = HistoryIDPathParam, + history_id: str = "", id: DecodedDatabaseIdField = HistoryItemIDPathParam, type: HistoryContentType = ContentTypePathParam, serialization_params: SerializationParams = Depends(query_serialization_params), From a6327a528575795ceec581b8bd069f1d0b5c8c7d Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Thu, 24 Aug 2023 20:02:09 -0400 Subject: [PATCH 2/4] changeing put type and default back, since it is not the problem once visualization PR gets merged --- lib/galaxy/webapps/galaxy/api/history_contents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/api/history_contents.py b/lib/galaxy/webapps/galaxy/api/history_contents.py index 2aafe380b79d..798be47b0cd3 100644 --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -787,7 +787,7 @@ def validate( def update_typed( self, trans: ProvidesHistoryContext = DependsOnTrans, - history_id: str = "", + history_id: DecodedDatabaseIdField = HistoryIDPathParam, id: DecodedDatabaseIdField = HistoryItemIDPathParam, type: HistoryContentType = ContentTypePathParam, serialization_params: SerializationParams = Depends(query_serialization_params), From 7bdae4d68c39c11cf13b501c12beee8a18a2e6ec Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Fri, 25 Aug 2023 10:56:43 -0400 Subject: [PATCH 3/4] Annotate the history_id paramter --- client/src/schema/schema.ts | 2 +- lib/galaxy/webapps/galaxy/api/history_contents.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/schema/schema.ts b/client/src/schema/schema.ts index 1f9989c5deee..a2e73ca439cf 100644 --- a/client/src/schema/schema.ts +++ b/client/src/schema/schema.ts @@ -10621,7 +10621,7 @@ export interface operations { header?: { "run-as"?: string; }; - /** @description The ID of the History. */ + /** @description History ID or any string. */ /** @description The ID of the item (`HDA`/`HDCA`) contained in the history. */ path: { history_id: string; diff --git a/lib/galaxy/webapps/galaxy/api/history_contents.py b/lib/galaxy/webapps/galaxy/api/history_contents.py index 798be47b0cd3..22ef957997fe 100644 --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -824,7 +824,7 @@ def delete_typed( self, response: Response, trans: ProvidesHistoryContext = DependsOnTrans, - history_id: str = "", + history_id: str = Path(..., description="History ID or any string."), id: DecodedDatabaseIdField = HistoryItemIDPathParam, type: HistoryContentType = ContentTypePathParam, serialization_params: SerializationParams = Depends(query_serialization_params), From 2dc9f01378111d520d19020741211138f5c4c228 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Mon, 28 Aug 2023 14:56:37 -0400 Subject: [PATCH 4/4] running openapi schema update --- client/src/schema/schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/schema/schema.ts b/client/src/schema/schema.ts index a2e73ca439cf..a508b702b9f0 100644 --- a/client/src/schema/schema.ts +++ b/client/src/schema/schema.ts @@ -10621,7 +10621,7 @@ export interface operations { header?: { "run-as"?: string; }; - /** @description History ID or any string. */ + /** @description The ID of the History. */ /** @description The ID of the item (`HDA`/`HDCA`) contained in the history. */ path: { history_id: string; @@ -10979,7 +10979,7 @@ export interface operations { header?: { "run-as"?: string; }; - /** @description The ID of the History. */ + /** @description History ID or any string. */ /** @description The ID of the item (`HDA`/`HDCA`) contained in the history. */ /** * @description The type of the target history element.