-
Notifications
You must be signed in to change notification settings - Fork 70
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
CobiGen pipeline for reducing templates #676
Comments
As discussed with @maybeec we have devised some ideas that I would like to reflect:
<gen-pipeline>
<incrementRef ref="crud_openapi_java_server_app"/>
<incrementRef ref="crud_java_server_app::inc21" use-input="${variables.entityName}Entity.java"/>
</gen-pipline> This configuration means that from an OpenAPI file we will generate the
Although this issue is tricky, it will highly improve maintainability of the templates and reduce the development time for the next plug-ins templates. |
it should be <gen-pipeline>
<incrementRef ref="crud_java_server_app"/>
<incrementRef ref="crud_openapi_angular_client_app::inc21" use-input="${variables.entityName}Entity.java"/>
</gen-pipline> for a correct example, as the entity is generated by crud_java_server_app. |
You are right, I misspelled it. I meant generating from an OpenAPI file the entity infrastructure, and then with I have already edited my comment. |
DescriptionWith our new CobiGen refactoring, where we will facilitate the creation of new plugins for very different languages, we will have a lot of new templates coming. Currently, is already hard to maintain our templates. For instance, we generate the same Angular client from different inputs:
And the same applies to Ionic:
Unfortunately, our models are slightly different between plugins, but my proposal is the following:
|
After a short discussion in comparison to #1125 with @jdiazgon and @lilliCao , we identified the need to specify the pipeline node within the templates xml and structure it like this: <pipeline>
<incrementRef ref="dataaccess_infrastructure" use-input="${variables.entityName}Entity.java">
<inrementRef ref="crud_java_server_app::inc32"/>
</triggerRef>
</pipeline> |
Currently, one of our major issues is that we have to maintain several plug-ins which make use of similar templates.
For example, the OpenAPI plug-in contains increments/templates like TOs or CRUD REST services which are very similar to the ones used in the Java plug-in.
We could only have templates for the Entity infrastructure and then, using the generated entities as input, generate with them the rest of increments.
Therefore, we must implement some kind of logic inside the CobiGen core to create like a generation pipeline for being able to generate in multiple steps.
The text was updated successfully, but these errors were encountered: