Commit Graph
1 Commits
Author SHA1 Message Date
Lauri Ojansivu 9c79602b64 Let the OpenAPI generator survive declarations without an initializer.
The release-all bump job stopped in openapi/generate_openapi.py with
"AttributeError: 'NoneType' object has no attribute 'type'": a REST
handler declares `let x;`, and the req.body walker read the declarator's
absent init. The walker now returns early on an absent node, and walks
the branches of a `?:` so fields read there (the board copy title,
among others) are documented again. downlevel_js also rewrites `||=`
and `&&=`, which esprima cannot parse and which made the generator skip
models/lib/importedAttachmentsByCard.js.

tests/openapiReqBodyWalker.test.cjs pins the guard, the ternary walk and
the rewrite, drives the walker on the shapes that broke it, and runs the
whole generator asserting no file is skipped.

Thanks to xet7 !
2026-09-29 22:45:14 +03:00