smithy-lang / smithy-python

Smithy code generators and core modules for Python (in development)
Apache License 2.0
47 stars 10 forks source link

Collapse member schemas #252

Closed JordonPhillips closed 3 months ago

JordonPhillips commented 3 months ago

This updates schemas in two ways. First, it renames type to shape_type to avoid shadowing the built in, which may be needed for type signatures later. Second, it changes the way members are created. Members now look mostly like their targets, except with different ids and traits. This makes serialization way easier and less prone to errors since implementations no longer have to follow member references to get traits or worry about how to handle overrides.

Since the MEMBER shape type isn't being used, I removed it.

I also moved a test file that was in the wrong package for some reason.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.