Skip to content

Commit 071d2d5

Browse files
committed
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 d17002d commit 071d2d5

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
@@ -6682,15 +6682,15 @@ export interface components {
66826682
*/
66836683
file?: string;
66846684
/**
6685-
* Job Key Form
6685+
* Job Key
66866686
* @description A key used to authenticate this request as acting on behalf or a job runner for the specified job.
66876687
*/
6688-
job_key_form?: string | null;
6688+
job_key?: string | null;
66896689
/**
6690-
* Path Form
6690+
* Path
66916691
* @description Path to file to create.
66926692
*/
6693-
path_form?: string | null;
6693+
path?: string | null;
66946694
/** Session Id */
66956695
session_id?: string;
66966696
};

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)