smithy-lang / smithy-python

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

Add serailze methods to documents #253

Closed JordonPhillips closed 3 months ago

JordonPhillips commented 3 months ago

This adds a serialize method to documents and fixes a few small issues that cropped up when testing those changes. Notably an is_null method was added since it became apparent that otherwise there's no way to tell. More importantly though, document members no longer resolve to their target shapes, but rather the proper member shapes. This necessitated some changes to setitem. Lastly, some improvements were added to shape type inference that leave the result as document only when the value is null.

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

JordonPhillips commented 3 months ago

Hold up on reviewing this, I need to make changes