You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Fastify version
3.29.0
Plugin version
6.1.0
Node.js version
16.13.0
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10 Build 19044.1706
Description
allOf keyword put in query or headers schema causes Fastify to crash with this error
/app/node_modules/@fastify/swagger/lib/util/common.js:187
return resolveLocalRef(externalSchemas[localRef], externalSchemas)
^
TypeError: Cannot read properties of undefined (reading 'schemas')
at resolveLocalRef (/app/node_modules/@fastify/swagger/lib/util/common.js:187:41)
at /app/node_modules/@fastify/swagger/lib/util/common.js:180:20
at Array.reduce (<anonymous>)
at resolveLocalRef (/app/node_modules/@fastify/swagger/lib/util/common.js:179:20)
at plainJsonObjectToOpenapi3 (/app/node_modules/@fastify/swagger/lib/spec/openapi/utils.js:133:41)
at resolveCommonParams (/app/node_modules/@fastify/swagger/lib/spec/openapi/utils.js:237:15)
at prepareOpenapiMethod (/app/node_modules/@fastify/swagger/lib/spec/openapi/utils.js:339:29)
at Object.swagger (/app/node_modules/@fastify/swagger/lib/spec/openapi/index.js:46:29)
at prepare (/app/index.js:44:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Prerequisites
Fastify version
3.29.0
Plugin version
6.1.0
Node.js version
16.13.0
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10 Build 19044.1706
Description
allOf
keyword put inquery
orheaders
schema causes Fastify to crash with this errorSteps to Reproduce
Expected Behavior
No error should occur.
The text was updated successfully, but these errors were encountered: