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

Add initial implementation of Trait initializers #27

Closed
wants to merge 2 commits into from

Conversation

hpmellema
Copy link
Contributor

@hpmellema hpmellema commented Apr 12, 2024

Description of changes:
Adds a core integration with a TraitInitializerInterceptor that injects trait Initializer definitions into the TraitSection on Schemas. Trait initializers are defined with the TraitInitializer interface. Users can use the static implementations provided by that class for simple trait or implement more complex initializers by implementing this interface.

Trait initializers are defined as a list on JavaCodegenIntegrations to allow users to add their own custom trait implementations.

Prelude trait initializers will eventually all be supplied by the core integration, however the trait initializer list added so far is not exhaustive.

Example Generated Classes

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

@@ -6,6 +6,7 @@ namespace smithy.example
blob Stream

@sensitive
@timestampFormat("date-time")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added because it exists in the examples, but wasnt in the model.

@hpmellema
Copy link
Contributor Author

Cancelling in favor of a different approach. Will open a new PR for that.

@hpmellema hpmellema closed this Apr 16, 2024
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.

1 participant