You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, the CodegenConfigLoader just returns the first Config for a given name. This limits the ability for users to extend a provided code generator (the ServiceLoader as far as I can tell loads Services in arbitrary order).
Describe the solution you'd like
The name for this method could probably be more descriptive. The basic solution is this:
Add a method Boolean overridesEmbedded() to the CodegenConfig.
Add a method String overridesDir() to the CodegenConfig which defines the root of the set of templates to overlay on top of the embedded-dir.
Update [AbstractGenerator.getFullTemplateFile] to check overridesDirafter<template-folder>/*, but before<embedded-folder>/* which should avoid breaking changes for users of the templateDir commandline parameter.
Update documentation to tell users who wish to customize existing Code Generators to override the overridesParent and overridesDir methods in their custom code generator.
Describe alternatives you've considered
An alternative way to do this would be to add a priority field instead. This would let users extend other overrides by setting their priority above the defined priority of their override.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, the CodegenConfigLoader just returns the first Config for a given name. This limits the ability for users to extend a provided code generator (the
ServiceLoader
as far as I can tell loads Services in arbitrary order).Describe the solution you'd like
The name for this method could probably be more descriptive. The basic solution is this:
Boolean overridesEmbedded()
to theCodegenConfig
.String overridesDir()
to theCodegenConfig
which defines the root of the set of templates to overlay on top of theembedded-dir
.overridesDir
after<template-folder>/*
, but before<embedded-folder>/*
which should avoid breaking changes for users of thetemplateDir
commandline parameter.DefaultCodegenConfig
:overridesParent
andoverridesDir
methods in their custom code generator.Describe alternatives you've considered
An alternative way to do this would be to add a
priority
field instead. This would let users extend other overrides by setting their priority above the defined priority of their override.The text was updated successfully, but these errors were encountered: