Skip to content

Commit d7623ea

Browse files
committed
Change 307 response description to fix OpenAPI error
During creation of the java script client from the OpenAPI file an error was thrown because the unsupported field "message" was set for the 307 response: ``` Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI). | Error count: 4, Warning count: 0 Errors: -attribute paths.'/projects/{project_id}/jobs/{job_id}/actions/{action_id}'(get).responses.307.message is unexpected -attribute paths.'/projects/{project_id}/jobs'(post).responses.307.message is unexpected -attribute paths.'/projects/{project_id}/services/{service_id}/actions/{action_id}'(get).responses.307.message is unexpected -attribute paths.'/projects/{project_id}/files/{file_key}/actions/{action_id}'(get).responses.307.message is unexpected ``` This is fixed by using the field "description" instead of "message" which is part of the OpenAPI spec.
1 parent 002e0a7 commit d7623ea

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

backend/openapi-spec.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

backend/src/contaxy/schema/shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class ExtensibleOperations(str, Enum):
136136
# }
137137
# TODO: evaluate status codes: 302,303,...
138138
OPEN_URL_REDIRECT: Mapping[Union[int, str], Dict[str, Any]] = {
139-
status.HTTP_307_TEMPORARY_REDIRECT: {"message": "Redirecting to another URL"}
139+
status.HTTP_307_TEMPORARY_REDIRECT: {"description": "Redirecting to another URL"}
140140
}
141141

142142

0 commit comments

Comments
 (0)