Skip to content

Commit c84fdcf

Browse files
authored
fix: rectify "GET .../files" response schema (#249)
Fixes #248 ### Description Replaced response schema for [`GET .../files`](https://github.com/ga4gh/tool-registry-service-schemas/blob/1dd4bf806f98fa2e3d224d1976f6179de5cd46d6/openapi/openapi.yaml#L322-L370) with content type 'application/zip`. Previously: ```yaml application/zip: schema: type: array items: $ref: "#/components/schemas/ToolFile" ``` Proposed: ```yaml application/zip: schema: type: string format: binary ``` ### Motivation From the [Swagger UI documentation] on file uploads: > Files use a `type: string` schema with `format: binary` or `format: base64`, depending on how the file contents will be encoded. Some other references to relevant discussions and uses of `type: string` and `format: binary` for representing binary file objects in request body or response schemas: - https://spec.openapis.org/oas/v3.0.3#considerations-for-file-uploads - swagger-api/swagger-ui#5636 - https://azure.github.io/autorest/openapi/howto/binary-payload.html - https://docs.visionlabs.ai/luna/v.5.24.1/ServiceManuals/APIDevelopmentManual/openapi_spec.html - https://hyperfoil.io/docs/restapi.html
1 parent ee0afe9 commit c84fdcf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

openapi/openapi.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,8 @@ paths:
357357
$ref: "#/components/schemas/ToolFile"
358358
application/zip:
359359
schema:
360-
type: array
361-
items:
362-
$ref: "#/components/schemas/ToolFile"
360+
type: string
361+
format: binary
363362
"404":
364363
description: The tool can not be output in the specified type.
365364
content:

0 commit comments

Comments
 (0)