Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable shapes-only codegen #373

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Enable shapes-only codegen #373

wants to merge 1 commit into from

Conversation

JordonPhillips
Copy link
Contributor

This adds an alternative generation mode that only generates "data shapes". It's a widely requested feature for both this code generator (I can't tell you how many DMs about this I've received) and for other Smithy generators.

These generated types could still be used in a rich way thanks to the schemas backing them - they could still be plugged into any ShapeSerializer or ShapeDeserializer

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

nateprewitt
nateprewitt previously approved these changes Feb 12, 2025
@nateprewitt
Copy link
Contributor

Changes look good, looks like we have a test failing with the changes though.

E ImportError: cannot import name 'ALL_QUERY_STRING_TYPES_INPUT' from 'restjson._private.schemas' (/home/runner/work/smithy-python/smithy-python/codegen/smithy-python-protocol-test/build/smithyprojections/smithy-python-protocol-test/rest-json-1/python-client-codegen/restjson/_private/schemas.py)

@JordonPhillips
Copy link
Contributor Author

I refactored this after all the repo structure changes. I made it so that the new plugin is a separate package and abstracted out some of the functionality that was being done by the client's directed codegen so that it could be shared.

This adds an alternative generation mode that only generates "data
shapes".
@JordonPhillips
Copy link
Contributor Author

Note that that number of added lines is scarier than reality as I had to copy over a bunch of smithy IDL files for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants