A one-fix patch release: a file model now parses with its shape exactly as written. Update packages to 3.0.1, not 3.0.0.
Highlights
- A file model follows the shape you write. A
z.looseObjectshape keeps the keys it doesn't declare; az.objectshape deletes them on the nextmerge(),write()orupdate(). Az.discriminatedUnionkeeps the variant its discriminator names.
Full changelog for v3.0.1 — every change in this release.
Important
- Never use
z.objectin a file model. Build every file-model shape withz.looseObject, at every nesting level. Usez.objectonly for a file you have fully modeled and will always keep fully modeled — any key it doesn't declare is deleted without warning.