Relationships
#4517 Cloudflare codegen: a nested properties-beside-oneOf required list can be read as the PUT body's complete required list
Opened by stack72 · 11/8/2026· Shipped 11/8/2026
codegen/cloudflare/pipeline.ts (after swamp-club#4436): extractRequestBody reports requiredDeclared from the flattened body, and flattenSchema marks a schema with properties beside a oneOf/anyOf as x-swamp-required-incomplete. Two nested shapes miss the marker: (1) flattenDisjunction reads the flag from resolveSchema(branch), not from flattenSchema(branch), so oneOf[{properties, required, oneOf:[{required:[a]}, ...]}, ...] is reported complete; (2) distributeAllOf leaves members that have both properties and oneOf/anyOf to mergeAllOf, which drops the inner oneOf without marking. In both, the PUT update guard (extensionModelGenerator) can stop demanding a create-required field every inner branch requires; it is still filled from the live resource, so it only matters when the field is missing from both globalArgs and the live resource. No model generated from the 2026-11-08 spec has either shape. Raised as low findings by verify-reviews on PR #670. Fix: read the flag from the flattened branch in flattenDisjunction, and mark incomplete in mergeAllOf when a member with properties also has oneOf/anyOf.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.