Repository navigation
Release v22.86.0
Summary
The Screenplay generator recovers how concepts generate their values. Concepts whose factory uses a Cratis Fundamentals generation strategy get a matching generate line, and [GeneratedValue] parameters of those concepts become generated properties, so generated models describe the identifiers and tokens the application actually creates.
Added
- The Screenplay generator states a concept's generation strategy from its
New()factory:GenerateValue.UuidV7()andGuid.CreateVersion7()becomegenerate uuidv7,Ulid()becomesgenerate ulid,TypeId("p")becomesgenerate typeid "p",NanoId(size, alphabet)becomesgenerate nanoidwith its size and alphabet,Bytes(count, encoding)becomesgenerate byteswith its encoding, andRandomNumberGenerator.GetHexString(n, lowercase)becomesgenerate bytes n/2 hexwith its case. Plain UUID factories keep nogenerateline (part of #3116) [GeneratedValue]parameters of concepts with a recovered strategy, including string-backed concepts, becomegeneratedproperties, and scenarios can pin them with text values that match the strategy's shape (part of #3116)
Changed
- Generation strategies need Screenplay ESM v15: models that use them select ESM v15, and a
MaximumExecutableModelVersionbelow v15 keeps the previous output and reports the withheld strategy. In a v15 model, UUID pins must be version 4 UUIDs; other pins are left out withSP0039(part of #3116) - Factories the generator cannot read as one strategy call, generation that uses the generation context's time or tenant, and concepts with validation rules keep their legacy command and are reported with
SP0073(part of #3116) - The Screenplay generator uses Cratis Screenplay 4.148.0 (part of #3116)