Replies: 1 comment 2 replies
-
Hey ShahOdin, you aren't going to be able to generate something exactly like this. The primary reason is that what you want isn't even expressible in smithy. For example, structure Bar {
internal_id: String = "1"
} this structure does not represent an instance of a class, but rather a definition of a class. This means that the final case class Bar(internal_id: String = "1") So you definitely can get close to what you want with mixins (though mixins do not generate sealed traits, but rather open traits) and unions, but not exactly. I hope this helps, but feel free to follow up with any questions! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to end up generating the following scala code:
as closely as possible. What would be the cleanest/preferred way of achieving this in smithy? Think both
union types
and mixins would give me something close enough 🤔ideally, It'd be nice if we can have an enumeratum style
Foo.all
method generated for us as well. that would returnSeq(Bar, Baz)
Beta Was this translation helpful? Give feedback.
All reactions