diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index e2e579704b10..b83b7ada5d58 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -321,7 +321,7 @@ export interface paths { "/api/file_source_instances": { /** Get a list of persisted file source instances defined by the requesting user. */ get: operations["file_sources__instances_index"]; - /** Create a user-bound object store. */ + /** Create a user-bound file source. */ post: operations["file_sources__create_instance"]; }; "/api/file_source_instances/{user_file_source_id}": { @@ -2672,7 +2672,7 @@ export interface components { * Documentation * @description Documentation or extended description for this plugin. */ - doc: string; + doc?: string | null; /** * ID * @description The `FilesSource` plugin identifier @@ -5302,7 +5302,7 @@ export interface components { * Documentation * @description Documentation or extended description for this plugin. */ - doc: string; + doc?: string | null; /** * ID * @description The `FilesSource` plugin identifier @@ -14967,7 +14967,7 @@ export interface operations { }; }; file_sources__create_instance: { - /** Create a user-bound object store. */ + /** Create a user-bound file source. */ parameters?: { /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ header?: { @@ -15070,11 +15070,7 @@ export interface operations { }; responses: { /** @description Successful Response */ - 200: { - content: { - "application/json": Record; - }; - }; + 204: never; /** @description Validation Error */ 422: { content: { @@ -20951,11 +20947,7 @@ export interface operations { }; responses: { /** @description Successful Response */ - 200: { - content: { - "application/json": Record; - }; - }; + 204: never; /** @description Validation Error */ 422: { content: { diff --git a/client/src/components/FilesDialog/utilities.ts b/client/src/components/FilesDialog/utilities.ts index 21aff76122a0..68f1dfd76eac 100644 --- a/client/src/components/FilesDialog/utilities.ts +++ b/client/src/components/FilesDialog/utilities.ts @@ -18,7 +18,7 @@ export function fileSourcePluginToItem(plugin: BrowsableFilesSourcePlugin): Sele const result = { id: plugin.id, label: plugin.label, - details: plugin.doc, + details: plugin.doc || "", isLeaf: false, url: plugin.uri_root, }; diff --git a/lib/galaxy/webapps/galaxy/api/file_sources.py b/lib/galaxy/webapps/galaxy/api/file_sources.py index bf0862661a3a..eaac53e924eb 100644 --- a/lib/galaxy/webapps/galaxy/api/file_sources.py +++ b/lib/galaxy/webapps/galaxy/api/file_sources.py @@ -4,6 +4,8 @@ from fastapi import ( Body, Path, + Response, + status, ) from galaxy.files.templates import FileSourceTemplateSummaries @@ -48,7 +50,7 @@ def index_templates( @router.post( "/api/file_source_instances", - summary="Create a user-bound object store.", + summary="Create a user-bound file source.", operation_id="file_sources__create_instance", ) def create( @@ -98,10 +100,12 @@ def update_instance( "/api/file_source_instances/{user_file_source_id}", summary="Purge user file source instance.", operation_id="file_sources__instances_purge", + status_code=status.HTTP_204_NO_CONTENT, ) def purge_instance( self, trans: ProvidesUserContext = DependsOnTrans, user_file_source_id: str = UserFileSourceIdPathParam, - ) -> None: + ): self.file_source_instances_manager.purge_instance(trans, user_file_source_id) + return Response(status_code=status.HTTP_204_NO_CONTENT) diff --git a/lib/galaxy/webapps/galaxy/api/object_store.py b/lib/galaxy/webapps/galaxy/api/object_store.py index 62890b8c0736..177d5866a7ef 100644 --- a/lib/galaxy/webapps/galaxy/api/object_store.py +++ b/lib/galaxy/webapps/galaxy/api/object_store.py @@ -12,6 +12,8 @@ Body, Path, Query, + Response, + status, ) from galaxy.exceptions import ( @@ -147,13 +149,15 @@ def update_instance( "/api/object_store_instances/{user_object_store_id}", summary="Purge user object store instance.", operation_id="object_stores__instances_purge", + status_code=status.HTTP_204_NO_CONTENT, ) def purge_instance( self, trans: ProvidesUserContext = DependsOnTrans, user_object_store_id: str = UserObjectStoreIdPathParam, - ) -> None: + ): self.object_store_instance_manager.purge_instance(trans, user_object_store_id) + return Response(status_code=status.HTTP_204_NO_CONTENT) @router.get( "/api/object_store_templates",