In src/http/routes/object/getSignedURLs.ts (line 38), the error property in the response schema uses error: as the JSON Schema keyword instead of type::
error: {
error: ['string', 'null'], // not a valid JSON Schema keyword
examples: ['Either the object does not exist or you do not have access to it'],
},
The sibling signedURL property in the same schema object (line 46) correctly uses type: ['string', 'null'].
Because error: is not a recognized JSON Schema keyword, @fastify/swagger ignores it when generating the OpenAPI spec. The published API spec ends up with no type information for the error field, which affects anyone generating typed clients from it.
No runtime serialization impact since fast-json-stringify falls back to JSON.stringify for properties without a valid type, but the OpenAPI spec is incorrect.
Introduced in #106 (Feb 2022).
In
src/http/routes/object/getSignedURLs.ts(line 38), theerrorproperty in the response schema useserror:as the JSON Schema keyword instead oftype::The sibling
signedURLproperty in the same schema object (line 46) correctly usestype: ['string', 'null'].Because
error:is not a recognized JSON Schema keyword,@fastify/swaggerignores it when generating the OpenAPI spec. The published API spec ends up with no type information for theerrorfield, which affects anyone generating typed clients from it.No runtime serialization impact since fast-json-stringify falls back to JSON.stringify for properties without a valid type, but the OpenAPI spec is incorrect.
Introduced in #106 (Feb 2022).