From 4538e2e6474da1fe1ad3893eef799b6dd861cbac Mon Sep 17 00:00:00 2001 From: markstuart-oai <323302876+markstuart-oai@users.noreply.github.com> Date: Fri, 25 Sep 2026 05:51:38 +0000 Subject: [PATCH] chore(api): document files and uploads error responses Castiron-Internal-PR: https://github.com/openai/openai-java-internal/pull/152 Castiron-Source-SHA: 902e85b2629f307f607c44981cbaec8bd83e2dbf Castiron-Public-Base-SHA: e8cbf5d732d4f5acf7cc455ff2dc75ce91377800 --- .castiron.stats.yml | 10 +- api_reference/openapi.transformed.yml | 180 ++++++++++++++++++++++++++ 2 files changed, 185 insertions(+), 5 deletions(-) diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 5f369796e..eb4b1aff3 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: 9c868fe3-bcdb-4f56-b703-f0ecd4f57241 -openapi_spec_hash: 4a3994062d4771af43c5efbb678f9170 -openapi_transformed_spec_hash: a33da3aea89bbb02769dc2a50aadfa2a +generation_id: c1754b41-544d-480c-abd6-e2022e1ddc77 +openapi_spec_hash: bb469f23f08c100a03c17492316aa293 +openapi_transformed_spec_hash: ef5f8b66c6500379cb50ef2d4f65cf20 config_hash: 18f602826c88bad76c6fdf08ab67247a -codegen_sha: 23b66854d91a261c00c2827ad1478be0da0de42a +codegen_sha: 1378cb044f8ddb5c03ee71b616bd722b8a03e629 codegen_hash: bd90f346225585f82779b8977366279b0cd8860f848989fa782346e095684baa -public_codegen_sha: fe756fd4d8c5cbef5e7c686522f94b132bdaf509 +public_codegen_sha: 5f571658842f42475960f2cc5413fef76b6140ad diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index dbe7c2bfd..1d9bc89d6 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -6025,6 +6025,24 @@ paths: application/json: schema: $ref: '#/components/schemas/ListFilesResponse' + '400': + description: The file listing parameters are invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The file specified by the after cursor was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -6122,6 +6140,24 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIFile' + '400': + description: The file upload request is invalid or exceeds a file size or storage quota limit. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: The file could not be uploaded because of a server error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -6196,6 +6232,18 @@ paths: application/json: schema: $ref: '#/components/schemas/DeleteFileResponse' + '404': + description: The file was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -6247,6 +6295,18 @@ paths: application/json: schema: $ref: '#/components/schemas/OpenAIFile' + '404': + description: The file was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -6302,6 +6362,30 @@ paths: application/json: schema: type: string + '400': + description: The file cannot be downloaded for its purpose or the account does not have permission to download it. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The file was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many file requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: The file could not be downloaded because of a server error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: files examples: @@ -20865,6 +20949,18 @@ paths: application/json: schema: $ref: '#/components/schemas/Upload' + '400': + description: The upload request is invalid or exceeds a file size or storage quota limit. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many upload requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: uploads examples: @@ -20919,6 +21015,30 @@ paths: application/json: schema: $ref: '#/components/schemas/Upload' + '400': + description: The upload is no longer pending or is already being completed and cannot be cancelled. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The upload was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '410': + description: The upload has expired. Create a new upload before adding parts or completing it. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many upload requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: uploads examples: @@ -20973,6 +21093,36 @@ paths: application/json: schema: $ref: '#/components/schemas/Upload' + '400': + description: The upload cannot be completed in its current state, the parts are invalid, or the uploaded size does not match the specified size. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The upload was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '410': + description: The upload has expired. Create a new upload before adding parts or completing it. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many upload requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: The upload could not be completed. Retry the same request, preserving the part order and MD5 value. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: uploads examples: @@ -21036,6 +21186,36 @@ paths: application/json: schema: $ref: '#/components/schemas/UploadPart' + '400': + description: The upload cannot accept more parts, or the part exceeds an upload size limit. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: The upload was not found. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '410': + description: The upload has expired. Create a new upload before adding parts or completing it. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '429': + description: Too many upload requests. Reduce the request rate and try again later. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: The part could not be uploaded. Try the request again. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' x-oaiMeta: group: uploads examples: