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

Support traits #346

Closed
Tenischev opened this issue Oct 22, 2023 · 5 comments
Closed

Support traits #346

Tenischev opened this issue Oct 22, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@Tenischev
Copy link
Member

Reason/Context

This is long missed feature of template to support traits.

Description

Support of operation and message trait is required.
According to Spec, trait applied as JSON Patch.

Probably, the better way to apply trait, is to create generator:before hook and compute result operation and message, so all other template generation will not be affected.

@Tenischev Tenischev added the enhancement New feature or request label Oct 22, 2023
@AayushSaini101
Copy link

Hi @Tenischev For this issue, Do we need to generate the result the result in the particular file, or just need to update the java-spring-template to accept the fields for operation and message trait.

For example:

operationTraits: bindings: amqp: ack: false

Do we need to generate the result somewhere in the src folder or just make the generator accept all these parameters? Thanks

@Tenischev
Copy link
Member Author

@AayushSaini101 both. Template should support traits by means, handle data from traits correctly and generate output files taking into account data from traits.

@AayushSaini101
Copy link

@AayushSaini101 both. Template should support traits by means, handle data from traits correctly and generate output files taking into account data from traits.

Thanks for the explanation

@jonaslagoni
Copy link
Member

@Tenischev is this a bug you have found? In theory, generator should already have applied traits for you right? 🤔

@Tenischev
Copy link
Member Author

@jonaslagoni you are right, it's my mistake I used a bit wrong API and encounter other not realized functionality of template and interpret it like a trait problem. My bad, this issue is not valid.

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

No branches or pull requests

3 participants