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've traced the issue and it seems to be in the buildCodeWithAllOfs function. There, in case the inner allOf is immediate, it loops, otherwise it calls buildCode. The buildCode function then unpacks the $ref and handles it, but it doesn't take into account it could include another allOf inside.
Adding the following lines at the end of the buildCode function seems to solve it:
Prerequisites
Fastify version
3.24.0
Plugin version
No response
Node.js version
14.17.3
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Description
When trying to use an
allOf
within a$ref
which is itself within anallOf
, the innerallOf
is simply ignored.Steps to Reproduce
I've traced the issue and it seems to be in the
buildCodeWithAllOfs
function. There, in case the innerallOf
is immediate, it loops, otherwise it callsbuildCode
. ThebuildCode
function then unpacks the$ref
and handles it, but it doesn't take into account it could include anotherallOf
inside.Adding the following lines at the end of the
buildCode
function seems to solve it:Expected Behavior
Should not ignore the inner
allOf
.The text was updated successfully, but these errors were encountered: