fix: openapi docs for get object - #1350
Conversation
Signed-off-by: Ferhat Elmas <elmas.ferhat@gmail.com>
There was a problem hiding this comment.
Looks good, straightforward OpenAPI documentation fix. Reviewed: the change only adds querystring: getObjectQuerySchema to the public /:bucketName/* route (matching the schema already used by the authenticated route and already consumed by the shared requestHandler), and replaces a duplicate 'Get object' string with the shared summary constant. No behavioral or validation logic changes.
Extended reasoning...
Overview
The diff touches a single file, src/http/routes/object/getObject.ts, and consists of two one-line changes inside the schema object for the public (/:bucketName/*) route registration: adding querystring: getObjectQuerySchema and replacing the literal string 'Get object' with the already-declared summary variable ('Retrieve an object').
Security risks
None. getObjectQuerySchema (properties download and versionId, both optional strings, no additionalProperties: false) was already defined and already used identically by the authenticated route in the same file. Adding it to the public route's schema is purely additive documentation/validation metadata for Fastify's OpenAPI generation — it does not restrict or loosen any existing behavior, since requestHandler (shared by both routes) already destructures download and versionId from request.query regardless of whether a query schema was declared. There is no auth, injection, or data-exposure surface introduced.
Level of scrutiny
Low. This is a mechanical, self-contained documentation alignment fix with no logic or control-flow changes, matching an existing pattern already present in the sibling authenticated route in the very same file.
Other factors
The bug hunter reported no findings, and my own reading of the full file confirms the change is limited to schema metadata with no functional impact. The PR description accurately reflects the change (aligning OpenAPI docs), and there's no CODEOWNERS restriction indicated. No outstanding review comments or third-party objections are present in the timeline.
Coverage Report for CI Build 33391477544Coverage decreased (-0.01%) to 81.439%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
Query params are read and handled but not exposed in openapi.
What is the new behavior?
Add query params schema and align its summaary.
Additional context
Related to #1341