Skip to content

Commit 7a11519

Browse files
kysrpexmvdbeek
authored andcommitted
Fix OpenAPI docs for path and job_key as form parameters for POST requests to /api/jobs/{job_id}/files
FastAPI will not use the parameter aliases of form parameters in the OpenAPI docs, but the name of their Python variables. Therefore, the API docs show `path_form` and `job_key_form`. Rename them so that the API docs show the correct parameter names.
1 parent 7b2af8a commit 7a11519

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

client/src/api/schema/schema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6785,15 +6785,15 @@ export interface components {
67856785
*/
67866786
file?: string;
67876787
/**
6788-
* Job Key Form
6788+
* Job Key
67896789
* @description A key used to authenticate this request as acting on behalf or a job runner for the specified job.
67906790
*/
6791-
job_key_form?: string | null;
6791+
job_key?: string | null;
67926792
/**
6793-
* Path Form
6793+
* Path
67946794
* @description Path to file to create.
67956795
*/
6796-
path_form?: string | null;
6796+
path?: string | null;
67976797
/** Session Id */
67986798
session_id?: string;
67996799
};

lib/galaxy/webapps/galaxy/api/job_files.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
def path_query_or_form(
5454
request: Request,
5555
path_query: Annotated[Optional[str], Query(alias="path", description="Path to file to create.")] = None,
56-
path_form: Annotated[Optional[str], Form(alias="path", description="Path to file to create.")] = None,
56+
path: Annotated[Optional[str], Form(alias="path", description="Path to file to create.")] = None,
5757
):
5858
"""
5959
Accept `path` parameter both in query and form format.
@@ -63,7 +63,7 @@ def path_query_or_form(
6363
`path: str = Depends(path_query_or_form)` so that FastAPI responds with status code 500 when the parameter is not
6464
provided.
6565
"""
66-
return path_query or path_form
66+
return path_query or path
6767

6868

6969
def job_key_query_or_form(
@@ -77,7 +77,7 @@ def job_key_query_or_form(
7777
),
7878
),
7979
] = None,
80-
job_key_form: Annotated[
80+
job_key: Annotated[
8181
Optional[str],
8282
Form(
8383
alias="job_key",
@@ -95,7 +95,7 @@ def job_key_query_or_form(
9595
`job_key: str = Depends(job_key_query_or_form)` so that FastAPI responds with status code 500 when the parameter is
9696
not provided.
9797
"""
98-
return job_key_query or job_key_form
98+
return job_key_query or job_key
9999

100100

101101
@router.cbv

0 commit comments

Comments
 (0)