smithy-lang / smithy-dafny

Apache License 2.0
7 stars 8 forks source link

Add TestModel for recursive shapes (add to Aggregate) #373

Open robin-aws opened 1 month ago

robin-aws commented 1 month ago

Create a TestModel that uses a "recursive" union or structure; e.g.

structure RecursiveStructure {
    structureMember: RecursiveStructure
}

union RecursiveUnion {
    unionMember: RecursiveUnion
}

(Or, augment the Aggregate TestModel.)

This is not validated in the TestModels, but is used in the MPL/DBESDK. This is particularly important for codegens that are built on other Smithy code generators. Those code generators push developers toward tools that do not handle this at all.

robin-aws commented 1 month ago

Note AggregateReferences has some similar shapes, but that test model is mostly aimed at exercising the generation of Dafny specifications.

robin-aws commented 1 week ago

Another thing Aggregate doesn't have coverage for is @required aggregate members.