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 2 commits into
base: develop
Choose a base branch
from
Open

Enable shapes-only codegen #373

wants to merge 2 commits 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.

@JordonPhillips JordonPhillips requested a review from a team as a code owner January 29, 2025 14:47
This adds an alternative generation mode that only generates "data
shapes".
@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)

@@ -5,6 +5,11 @@
"service": "example.weather#Weather",
"module": "weather",
"moduleVersion": "0.0.1"
},
"python-shape-codegen": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent with smithy-java, let's call it python-type-codegen?

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