Skip to content

Commit bed78be

Browse files
committed
Hide HEAD method for /api/jobs/{job_id}/files in API docs
Including both GET and HEAD in the API schema for the same endpoint is redundant.
1 parent 0c22d44 commit bed78be

File tree

2 files changed

+2
-65
lines changed

2 files changed

+2
-65
lines changed

client/src/api/schema/schema.ts

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3157,14 +3157,7 @@ export interface paths {
31573157
post: operations["create_api_jobs__job_id__files_post"];
31583158
delete?: never;
31593159
options?: never;
3160-
/**
3161-
* Get a file required to staging a job.
3162-
* @description Get a file required to staging a job (proper datasets, extra inputs, task-split inputs, working directory
3163-
* files).
3164-
*
3165-
* This API method is intended only for consumption by job runners, not end users.
3166-
*/
3167-
head: operations["index_api_jobs__job_id__files_head"];
3160+
head?: never;
31683161
patch?: never;
31693162
trace?: never;
31703163
};
@@ -33251,62 +33244,6 @@ export interface operations {
3325133244
};
3325233245
};
3325333246
};
33254-
index_api_jobs__job_id__files_head: {
33255-
parameters: {
33256-
query: {
33257-
/** @description Path to file. */
33258-
path: string;
33259-
/** @description A key used to authenticate this request as acting on behalf or a job runner for the specified job. */
33260-
job_key: string;
33261-
};
33262-
header?: {
33263-
/** @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. */
33264-
"run-as"?: string | null;
33265-
};
33266-
path: {
33267-
/** @description Encoded id string of the job. */
33268-
job_id: string;
33269-
};
33270-
cookie?: never;
33271-
};
33272-
requestBody?: never;
33273-
responses: {
33274-
/** @description Contents of file. */
33275-
200: {
33276-
headers: {
33277-
[name: string]: unknown;
33278-
};
33279-
content: {
33280-
"application/octet-stream": unknown;
33281-
};
33282-
};
33283-
/** @description File not found, path does not refer to a file, or input dataset(s) for job have been purged. */
33284-
400: {
33285-
headers: {
33286-
[name: string]: unknown;
33287-
};
33288-
content?: never;
33289-
};
33290-
/** @description Request Error */
33291-
"4XX": {
33292-
headers: {
33293-
[name: string]: unknown;
33294-
};
33295-
content: {
33296-
"application/json": components["schemas"]["MessageExceptionModel"];
33297-
};
33298-
};
33299-
/** @description Server Error */
33300-
"5XX": {
33301-
headers: {
33302-
[name: string]: unknown;
33303-
};
33304-
content: {
33305-
"application/json": components["schemas"]["MessageExceptionModel"];
33306-
};
33307-
};
33308-
};
33309-
};
3331033247
get_inputs_api_jobs__job_id__inputs_get: {
3331133248
parameters: {
3331233249
query?: never;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class FastAPIJobFiles:
136136
)
137137
),
138138
)
139-
@router.head(*_args, **_kwargs) # type: ignore[name-defined]
139+
@router.head(*_args, **_kwargs, include_in_schema=False) # type: ignore[name-defined]
140140
# remove `@router.head(...)` when ALL endpoints have been migrated to FastAPI
141141
def index(
142142
self,

0 commit comments

Comments
 (0)